[Solved] Join with multiple table
[ad_1] I believe here is what you looking for: SELECT SID, SNAME, count(DISTINCT PID) AS `c` FROM PRO_STU INNER JOIN Student USING (SID) GROUP BY SID, SNAME HAVING `c` = (SELECT count(*) FROM Professor) 1 [ad_2] solved Join with multiple table