Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
216 B
0
Indexable
Never
SELECT c.name,
       COUNT(e.instituition) AS instit
FROM company AS c
LEFT JOIN people AS p ON c.id = p.company_id
LEFT JOIN education AS e ON p.id = e.person_id
GROUP BY c.name
ORDER BY instit DESC
LIMIT 5;