SQL select statement to find ID's that occur the most
sql
Solution
select UserID, count(UserID)
from myUsers
group by UserID
order by count(UserID) desc
Problem
Basic SQL statement question - I have a table (myUsers) that contains the column "UserID." The same UserID can appear one to many times in these rows. I'm looking for a query that will give me back the specific userIDs that appear the most in this table, and also with their count. Any thoughts? Thanks in advance!