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
