TDCustmerSupportJP Aug 1st, 2017 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT master_brand.code AS brand_code, AS brand_name, AS body_name, model, COUNT(1) AS cnt
  2. FROM usedcar raw
  3. JOIN
  4. ( SELECT code, name, country_name FROM brand_master ) master_brand
  5. ON
  6. raw.code = master_brand.code
  7. JOIN
  8. ( SELECT code, name FROM body_master ) master_body
  9. ON
  10. raw.body_code = master_body.code
  11. WHERE = 'ポルシェ' AND = 'オープン'
  12. GROUP BY master_brand.code,,, model
  13. ORDER BY model
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand