Sorry to have to ask this as it's a frequent subject but I'm struggling to add ranking by Total for each Company in each Category in this query.
What I want is this, etc
Using other posts I've tried this SQL, amongst others, but am not getting what I want.
It just counts the number of Judges for each Company and adds 1.
What I want is this, etc
Using other posts I've tried this SQL, amongst others, but am not getting what I want.
Code:
SELECT s1.Category, s1.Company, s1.EntryID, s1.Judge, s1.Total, Count(s2.Total)+1 AS Rank
FROM qryPoints AS s1 INNER JOIN qryPoints AS s2 ON s1.EntryID = s2.EntryID
GROUP BY s1.Category, s1.Company, s1.EntryID, s1.Judge, s1.Total;
It just counts the number of Judges for each Company and adds 1.