Je hoeft alleen maar GROUP BY . te gebruiken in plaats van DISTINCT . Dus probeer deze zoekopdracht:
SELECT personid, COUNT(msg)
FROM mytable
GROUP BY personid
ORDER BY personid;
Je hoeft alleen maar GROUP BY . te gebruiken in plaats van DISTINCT . Dus probeer deze zoekopdracht:
SELECT personid, COUNT(msg)
FROM mytable
GROUP BY personid
ORDER BY personid;