Revision history for Practice7Subqueries


Revision [7591]

Last edited on 2013-01-24 13:38:14 by JasonChow
Additions:
JOIN
Deletions:
JOIN


Revision [7590]

Edited on 2013-01-24 12:32:34 by JasonChow
Additions:
JOIN candidate c USING (candidate_id)
LEFT JOIN districtname dn USING (districtname_id)
LEFT JOIN finsource_candidate fsc USING (candidate_id)
WHERE o.officetype_id = 'C' AND oc.officecandidatestatus_id = 1 AND fsc.finsource_id = 1 AND (oc.state_id != 'PR' AND oc.state_id != 'VI' AND oc.state_id != 'GU' AND oc.state_id != 'DC' AND oc.state_id != 'AS')
ORDER BY o.name DESC, oc.state_id, oc.districtname_id
SELECT A.*, B.sr_econ, B.or_econ
FROM (
SELECT candidate_id, sig_rating sr_social, our_rating or_social
FROM rating_candidate WHERE rating_id = 5948
) A
SELECT candidate_id, sig_rating sr_econ, our_rating or_econ
FROM rating_candidate WHERE rating_id = 5952
JOIN
Deletions:
ORDER BY o.name DESC, oc.state_id, oc.districtname_id
SELECT A.*, B.sr_econ, B.or_econ FROM (
SELECT candidate_id, sig_rating sr_social, our_rating or_social
FROM rating_candidate WHERE rating_id = 5948
) A
SELECT candidate_id, sig_rating sr_econ, our_rating or_econ
FROM rating_candidate WHERE rating_id = 5952
JOIN


Revision [7530]

The oldest known version of this page was created on 2013-01-07 11:53:19 by JasonChow
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki