Give a table that has two fields; user_id [INT] and user_minutes [INT]. How can I formulate a MySQL query to get the top x of the sum of the user_minutes.
In other words, this table has a bunch of records...a user_id could be repeated many times with an associated number of minutes. I want to find out which user_id has the highest amount of minutes (the sum of minutes in the entire table). Can I do this with MySQL? I'm using PHP as well if that helps.