Untitled

From Alex, 4 Months ago, written in Plain Text, viewed 49 times. This paste will check out in 1 Second.
URL http://codebin.org/view/7abb683e Embed
Download Paste or View Raw
  1. SELECT f.name AS fund_name,
  2.        c.name AS company_name,
  3.        frq.raised_amount AS attracted_investment
  4. FROM investment as i
  5. LEFT JOIN company AS c ON i.company_id=c.id
  6. LEFT JOIN fund AS f ON i.fund_id=f.id
  7. INNER JOIN (SELECT *
  8.             FROM funding_round
  9.             WHERE EXTRACT(YEAR from funded_at) IN ('2012','2013')
  10.            ) AS frq ON i.company_id=frq.company_id
  11. WHERE c.milestones >6

Reply to "Untitled"

Here you can reply to the paste above