Sie müssen nur GROUP BY
verwenden statt DISTINCT
. Versuchen Sie also diese Abfrage:
SELECT personid, COUNT(msg)
FROM mytable
GROUP BY personid
ORDER BY personid;
Sie müssen nur GROUP BY
verwenden statt DISTINCT
. Versuchen Sie also diese Abfrage:
SELECT personid, COUNT(msg)
FROM mytable
GROUP BY personid
ORDER BY personid;