Penso che tu volessi filtrare i gruppi. Usa HAVING COUNT(*)
invece di WHERE
:
SELECT Id, QId, UName, Ans, Date, Count(*) * 10 as Total
FROM question
GROUP BY UName
HAVING Count(*)
Se vuoi ordinare i gruppi in base al numero di elementi, usa ORDER BY
:
SELECT Id, QId, UName, Ans, Date, Count(*) * 10 as Total
FROM question
GROUP BY UName
ORDER BY Count(*) DESC