Ik denk dat je groepen wilde filteren. Gebruik HAVING COUNT(*)
in plaats van WHERE
:
SELECT Id, QId, UName, Ans, Date, Count(*) * 10 as Total
FROM question
GROUP BY UName
HAVING Count(*)
Als u groepen wilt sorteren op aantal elementen, gebruik dan ORDER BY
:
SELECT Id, QId, UName, Ans, Date, Count(*) * 10 as Total
FROM question
GROUP BY UName
ORDER BY Count(*) DESC