I have a database full of media. For simplicity sake, lets say it has
Table: media
id
college_id
title
shares
I'm trying to get the articles with the most amount of shares from each college. So, in essence, get the top shared article from Cornell, USC, Syracuse.
I have been using this SQL command, but it doesn't return the most shared article from each college.
SELECT *
FROM media
GROUP BY college_id
ORDER BY shares DESC
Anyone have any ideas?
The shares column is an integer indicating the number of shares.