Last active
August 29, 2015 14:04
-
-
Save leafo/4ea297e6c0016daba6c0 to your computer and use it in GitHub Desktop.
This file contains 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 username, email, games_count, user_data.data from users | |
inner join user_data on user_data.user_id = users.id | |
where ( | |
select count(*) from games | |
where | |
games.user_id = users.id and | |
paid_status > 1 and published and | |
not deleted and classification = 0 and purchases_count > 0 | |
) > 1 order by games_count desc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment