Untitled

From Beefy Hedgehog, 10 Months ago, written in SQL, viewed 103 times.
URL http://codebin.org/view/064b3019 Embed
Download Paste or View Raw
  1. SELECT ca.name AS name1,
  2.        a.price_amount AS price,
  3.        cb.name AS name2,
  4.        ca.funding_total AS SUM,
  5.        round(a.price_amount/ca.funding_total)
  6. FROM acquisition AS a
  7. JOIN company AS ca ON a.acquiring_company_id=ca.id
  8. JOIN company AS cb ON a.acquired_company_id=cb.id
  9. WHERE a.price_amount != 0
  10.       AND ca.funding_total != 0
  11. ORDER BY price DESC, name2
  12. LIMIT 10

Reply to "Untitled"

Here you can reply to the paste above