Posted by: sukuti July 7, 2004
SQL HelpII
Login in to Rate this Post:     0       ?        
I was trying to create a view. I got it working now. Thanks a lot guys... select count(dns_name) as units_completed_today, count(distinct store_number) as stores_completed_today, (select count(distinct store_number) from asda.stores where scheduled_on = '2004-07-07') as stores_scheduled_today, (select count(dns_name) from asda.dns_names where replaced ='Yes' and serviced = '2004-07-07') as units_replaced_today, (select count(distinct store_number) from asda.dns_names where serviced is not NULL ) as total_stores_completed, (select count(dns_name) from asda.dns_names where serviced is not NULL) as total_units_completed, (select count(dns_name) from asda.dns_names where replaced = 'Yes') as total_units_replaced from asda.dns_names where serviced = '2004-07-07'
Read Full Discussion Thread for this article