Question : "select where count" Access SQL query

Ok, this is driving me crazy. Either i don't have enough parin's or too many or my comma isn't in the right place... ANYWAY...

I need to say in my query something like:

Wins: select [trainer] from [trainer table] where [fin_pos] = 1
and then count the total of all races that that trainer had a fin_pos of 1

The faster the correct response, the more points!

Answer : "select where count" Access SQL query

If I understand right, the following query should work:


SELECT [trainer table].trainer, Count([trainer table].trainer) AS CountOfRacesWon
FROM [trainer table]
WHERE ((([trainer table].fin_pos)=1))
GROUP BY [trainer table].trainer;


We just pitch all the records where the fin_pos isn't equal to one, then count how many records each trainer has.
Random Solutions  
 
programming4us programming4us