Unanswered: Can't ORDER BY in Access Group By query
It should be a simple query I've done it on SQL Server db's before but it doesn't work for Access. All I need is the top 10 first names that occur with a last name of X. I am unable to order by the 'itCount' variable so I don't get the most common names. Here is my query hopefully you can help me. Thanks, Luke
SELECT TOP 10 t1.sFName AS sTemp, (SELECT count(*) FROM tblData t2 WHERE t1.sFName = t2.sFName And t2.sSurname Like 'H*') AS itCount
FROM tblData AS t1
WHERE 0=0 And t1.sSurname Like 'H*'
GROUP BY t1.sFName;
'''I would like to add 'ORDER BY itCount' here but it throws an error