Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Most engaged users
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
You can’t perform that action at this time.