Last active
August 29, 2015 14:17
-
-
Save nicolasiensen/69a0294882065e9d8ac9 to your computer and use it in GitHub Desktop.
Most engaged users
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT first_name, last_name, email, count(*) AS activities_count | |
FROM users | |
JOIN activities | |
ON activities.user_id = users.id | |
GROUP BY users.id, users.first_name, users.last_name, users.email | |
HAVING count(*) > 4 | |
LIMIT 750 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment