I have a inner join sql query that gets the count of number of groups that a member is apart of.
The result is
I need to get the rows that have the highest values it can be one row or two rows or more, if it has the same value. I tried to use a max but I dont know were to put it. I want the result to be in this case
the sql query is
SELECT COUNT(traningsgruppid) AS antal, medlem.fornamn
INNER JOIN medlem ON traningsgrupprad.medlemsid = medlem.medlemsid
GROUP BY medlem.fornamn