From Alex, 4 Months ago, written in Plain Text, viewed 47 times. This paste will join the choir invisible in 1 Second.
URL http://codebin.org/view/b4043783 Embed
Download Paste or View Raw
  1. SELECT name,
  2.        count(DISTINCT e.instituition) as univ_qty
  3. FROM people as p
  4. JOIN education AS e ON p.id=e.person_id
  5. JOIN company AS c ON c.id=p.id
  6. GROUP by name
  7. ORDER BY univ_qty DESC
  8. LIMIT 5

Reply to "Untitled"

Here you can reply to the paste above