Created
May 29, 2020 17:40
-
-
Save dupsykool/f87570c81aea5cfb7b566a2202c37b9c to your computer and use it in GitHub Desktop.
Omnib-queries
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 count(*) from (select a.* from (select * from auth_user where created_by_user_id in (select id from auth_user where user_type <> 'ADMIN')) a left join agent on a.id = agent.user_id where a.id in (select id from auth_user where user_type = 'AGENT')) t where id in (select user_id from agent); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment