MySQL Forums
Forum List  »  Quality Assurance

Combine 2 queries
Posted by: Dahlia D
Date: February 16, 2011 10:11AM

I would like to combine the 2 queries below as one. How do I do it?


SELECT count(`Lead ID`) AS `Mktg Prospects w Sales Action`, `Region`
FROM `reporting`.`kpi1`
Where `Department` = "Sales" AND `Lead Source` = "Marketing Generated" AND `Status` IN ("Converted to Contact Only","Converted to Opportunity","Dead Lead","Returned to Marketing")
AND `Last modified date` > "2010-08-31"
GROUP BY `Region`

SELECT count(`Lead ID`) AS `Mktg Prospects Accepted by Sales`, `Region`
FROM `reporting`.`kpi1`
Where `Department` = "Sales" AND `Lead Source` = "Marketing Generated" AND `Status` IN ("Converted to Contact Only","Converted to Opportunity")
AND `Last modified date` > "2010-08-31"
GROUP BY `Region`


Thanks for any help

Options: ReplyQuote


Subject
Views
Written By
Posted
Combine 2 queries
2373
February 16, 2011 10:11AM
1192
April 02, 2011 09:17AM


Sorry, you can't reply to this topic. It has been closed.

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.