Skip to content

Instantly share code, notes, and snippets.

@valericus
Created January 22, 2016 01:34
Show Gist options
  • Save valericus/cd54208b5622680dd361 to your computer and use it in GitHub Desktop.
Save valericus/cd54208b5622680dd361 to your computer and use it in GitHub Desktop.
SELECT
users.name as name, count(*) as counter
FROM
messages
JOIN users
ON users.uid = messages.uid
GROUP BY messages.uid;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment