Using aggregate function and group by , Having clause you can get the students who are in more than one group
SQL
SELECT COUNT(*) AS cnt,student_id FROM student_groups GROUP BY student_id HAVING COUNT(*)>1
Learn to Develop an iPhone or iPad App in 4 Weeks Learn the latest and greatest markup language in the market with Robin Nixon(HTML & HTML5) Now $29 Only(75% Off)
Using aggregate function and
Fri, 09/03/2010 - 13:47 — shashiUsing aggregate function and group by , Having clause you can get the students who are in more than one group
SQL
SELECT
COUNT(*) AS cnt,student_id
FROM
student_groups
GROUP BY
student_id HAVING COUNT(*)>1