Sql select count and distinct...

I have this query which returns car manufacturers...
SELECT DISTINCT [Make] FROM [VehicleSpecs] ORDER BY [Make]

How can I modifiy this query to also return the count for each make?

LVL 2
evo_xAsked:
Who is Participating?
 
derekkrommConnect With a Mentor Commented:
SELECT [Make],count(*) as [MakeCount] FROM [VehicleSpecs] group by [Make] ORDER BY [Make]
0
 
derekkrommCommented:
SELECT [Make],count(*) FROM [VehicleSpecs] group by [Make] ORDER BY [Make]
0
 
evo_xAuthor Commented:
But how can I assign a field name to count ? because this way I can't assign the count field to the asp.net control.
0
 
evo_xAuthor Commented:
Thanks !
0
All Courses

From novice to tech pro — start learning today.