Skip to content

Instantly share code, notes, and snippets.

@ghazel
Created March 25, 2011 04:07
Show Gist options
  • Save ghazel/886347 to your computer and use it in GitHub Desktop.
Save ghazel/886347 to your computer and use it in GitHub Desktop.
SELECT groups.name, count(distinct group_memberships.id) as count_id FROM groups INNER JOIN group_memberships ON group_memberships.group_id = groups.id LIMIT 3;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment