View Full Version : Counting number of occurences in SQL


Quantarama
04-12-2011, 03:15 PM
Hi all,

I was wondering if there was any way to count the number of occurences of any values in SQL ?
Example : In a customer database, counting the number of times the same d.o.b occurs and returning it in a new collumn.
This is working :
SELECT [DOB]
,COUNT([DOB]) AS D

However I want it to also work, when I select all the other fields in the table

Many Thanks