Guest User

Untitled

a guest
Mar 13th, 2013
22
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT ds.*, dssl.*,dsp.*, tpc.s_name AS s_company_name FROM t_drugstore ds, t_drugstore_shellife dssl, t_drugstore_price dsp, t_pharmacies_companies tpc  WHERE ds.id = dssl.id AND ds.s_company_id=dssl.s_company_id AND ds.s_company_id=dsp.s_company_id  AND ds.id = dsp.id AND dsp.s_datetime=(SELECT MAX(s_datetime) FROM t_drugstore_price) AND dssl.s_datetime=(SELECT MAX(s_datetime) FROM t_drugstore_shellife) AND tpc.id=ds.s_company_id AND (ds.id IN (72793905,72947886,209348) AND ds.s_company_id IN (1)) HAVING dsp.s_price > 0
RAW Paste Data