Formatting a query to count records

supportt

Registered User.
Local time
Today, 13:58
Joined
Nov 21, 2001
Messages
70
I have a query I built from a single table, the data is coming back fine, but I would like to do a little counting of the data. I run the query with a date rangeand it does return all the data corrctly, but I would like to format it a little different. say, for example, I have a column that displays first/lastname, well when I run my query it shows all the records with first and last name. Can I do something to show it ie: First/Lastname (David Jones) called in 23 times. Right now it might show 23 separate records for David Jones. I just want it to tell how records for David Jones, I don't need to see his name listed 23 times. Hope this makes some kind of sence?

David
 
Use the Count Function combined with the GROUP BY component on the First/Lastname column:

SELECT First/Lastname, Count(First/Lastname)
FROM YourTable
GROUP BY First/Lastname

P.S. it's advised to not concatenate First Names and Last Names.
Use separate columns.

RV
 

Users who are viewing this thread

Back
Top Bottom