This situation is a little specific so bear with me.
I have a (very) large table with many users (from a sync server). The users are stored by a hash identifier "username". Each user has many rows in the table where data is stored for them with a common username field.
I can get the total size used per user with the following (example) query:
select username,round(sum(length(payload))/1024) from wbo where username = 's5i7goejhuxdfhulhpdqjubxgkskfdve';
This gives me the output I'm looking for for a single, known user.
What I'm looking for is a way to get a similar output, but then listing the users that have a total data (payload) size larger than a certain amount, so I can find the username IDs of all large data users, so they can be addressed. What query would I need for this?