SELECT *, if(results.L > 0,(results.L * prices.L),0) AS priceL, if(results.M > 0,(results.M * prices.M),0) AS priceM, if(results.N > 0,(results.N * prices.N),0) AS priceN FROM results LEFT JOIN prices ON (prices.insert_date = '2012-04-15') WHERE results.create_date = '2011-12-15' GROUP BY results.ID LIMIT 0,15
Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.