Excersize

From Ivan Kirilenkov, 10 Months ago, written in SQL, viewed 126 times.
URL http://codebin.org/view/8fb3bb51 Embed
Download Paste or View Raw
  1. SELECT
  2.     p.id,
  3.     COUNT(DISTINCT e.instituition)
  4. FROM company AS c
  5. JOIN funding_round AS fr
  6.     ON c.id = fr.company_id
  7. JOIN people AS p
  8.     ON p.company_id = c.id
  9. JOIN education AS e
  10.     ON p.id = e.person_id
  11. WHERE 1=1
  12.     AND c.status = 'closed'
  13.     AND fr.is_first_round = 1
  14.     AND fr.is_last_round = 1
  15. GROUP BY 1

Reply to "Excersize"

Here you can reply to the paste above