Myslím, že jste chtěli filtrovat skupiny. Použijte HAVING COUNT(*)
místo WHERE
:
SELECT Id, QId, UName, Ans, Date, Count(*) * 10 as Total
FROM question
GROUP BY UName
HAVING Count(*)
Pokud chcete třídit skupiny podle počtu prvků, použijte ORDER BY
:
SELECT Id, QId, UName, Ans, Date, Count(*) * 10 as Total
FROM question
GROUP BY UName
ORDER BY Count(*) DESC