خرید بک لینک

Vote count: 0

I have two tables 'Student' and 'Team'. i want to display count of student according to Team Name, Team_id from team is primary key.

i tried like this (SELECT(SELECT team,count(*) as team FROM student GROUP BY team) AS total,(SELECT team_name from team WHERE team_id IN (SELECT team FROM student GROUP BY team)) as team)

i want output as

Team Name Total Student

Team 1 25 Team 2 10

asked 1 min ago

برچسب: subquery as alias,subquery as a column,subquery as a table,subquery as a relation,subquery as a column oracle,subquery as an expression,subquery as a table in oracle,subquery as a join,subquery as a table in sql,subquery as a field, نویسنده: استخدام کار تاريخ: شنبه 23 مرداد 1395 ساعت: 2:23

صفحه بندی