Jag tror att du ville filtrera grupper. Använd HAVING COUNT(*)
istället för WHERE
:
SELECT Id, QId, UName, Ans, Date, Count(*) * 10 as Total
FROM question
GROUP BY UName
HAVING Count(*)
Om du vill sortera grupper efter antal element, använd ORDER BY
:
SELECT Id, QId, UName, Ans, Date, Count(*) * 10 as Total
FROM question
GROUP BY UName
ORDER BY Count(*) DESC