Subquery and JOIN

From SQLZOO
Revision as of 11:42, 21 March 2014 by 27.251.109.28 (Talk)

Jump to: navigation, search

SELECT cfu.* , ccd.*,count(*) as countt FROM (Select * from crm_follow_up ORDER BY follow_id DESC) as cfu left join crm_call_data as ccd

ON(cfu.sr_no=ccd.sr_no) WHERE ccd.assignto='neha' and ccd.data_mode=0 
GROUP BY ccd.name ORDER BY cfu.follow_id DESC
Personal tools
Namespaces

Variants
Actions
Reference
Toolbox
Google AdSense