Du skal bare bruge GROUP BY
i stedet for DISTINCT
. Så prøv denne forespørgsel:
SELECT personid, COUNT(msg)
FROM mytable
GROUP BY personid
ORDER BY personid;
Du skal bare bruge GROUP BY
i stedet for DISTINCT
. Så prøv denne forespørgsel:
SELECT personid, COUNT(msg)
FROM mytable
GROUP BY personid
ORDER BY personid;