Created
March 5, 2015 12:04
-
-
Save rafaeljesus/fb86b29d606480043225 to your computer and use it in GitHub Desktop.
Search all users with alerts qty more then 100
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 u.id, u.login, u.name, p.role | |
| from erm_user u, erm_user_profiles p | |
| where id in (select user_id | |
| from erm_alert | |
| where alert_read = 0 | |
| having count(*) > 100 | |
| group by user_id) | |
| and u.id = p.user_id | |
| order by 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment