Bikash Kumar Ray

SQL and ASP.net Related Practical Problems

Friday, April 10, 2009

for a city having multiple count

select x.city,(select count(*)from dmslocation ywhere y.city = x.city) as "Total Count",(select count(*)from dmslocation ywhere y.city = x.cityand y.validated = 'No') as "Count of No",(select count(*)from dmslocation ywhere y.city = x.cityand y.validated = 'Yes') as "Count of yes" from dmslocation xgroup by city
Posted by Unknown at 4:13 AM

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

About Me

Unknown
View my complete profile

Blog Details

  • ►  2013 (6)
    • ►  November (1)
    • ►  June (1)
    • ►  February (4)
  • ►  2012 (4)
    • ►  October (1)
    • ►  May (1)
    • ►  February (1)
    • ►  January (1)
  • ►  2011 (9)
    • ►  December (1)
    • ►  November (1)
    • ►  September (1)
    • ►  July (1)
    • ►  May (1)
    • ►  April (4)
  • ►  2010 (13)
    • ►  September (1)
    • ►  August (5)
    • ►  July (2)
    • ►  May (1)
    • ►  February (4)
  • ▼  2009 (38)
    • ►  December (5)
    • ►  November (4)
    • ►  October (2)
    • ►  September (3)
    • ►  August (4)
    • ►  July (5)
    • ►  June (6)
    • ►  May (3)
    • ▼  April (6)
      • Reduce Size of Database
      • Transaction Log is full
      • Upload Large files using asp.net
      • Avoid execution of code while refresh Page
      • for a city having multiple count
      • Select State of different Case

Worked Websites

  • eDMS
  • Plyreporter
  • Tour and Travel Website
  • Tradeget
Ethereal theme. Powered by Blogger.