Afficher un message
Vieux 19/09/2007, 22h45   #1
Terry Olsen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut How to select count records that "contain" data?

I have a table in SQL Server that looks like this:

Name Status
---------------------------
Steve Complete
Steve In Queue
John Pending
John Complete
John Complete
Tim In Queue

I need to throw a query at this that will return the number of
"Complete"'s that each person has. So the result would look like:

Name Completed
----------------------------
Steve 1
John 2
Tim 0

Can anyone out with what a query statement would look like to get
the desired output?


*** Sent via Developersdex http://www.developersdex.com ***
  Réponse avec citation
 
Page generated in 0,05279 seconds with 9 queries