Page is a not externally linkable
- Code, Content, and Presentation
-- Databases
---- Merging 3 Queries Into One


Dijkgraaf - 3:06 am on Aug 30, 2011 (gmt 0)


Not quite sure what you are aiming for, but you can combine the three as below.

SELECT COUNT(*) FROM sales WHERE dnucxtype='Digital' AND dnuinstall in ('Retail Pick-up','Tech Install',Direct Fullfill') AND dnuoutcome='Accepted';


SELECT COUNT(*) FROM sales WHERE dnucxtype='Analog' AND dnuinstall in ('Retail Pick-up','Tech Install',Direct Fullfill') AND dnuoutcome='Accepted';


Thread source:: http://www.webmasterworld.com/databases_sql_mysql/4356477.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com