Created
January 24, 2018 21:44
-
-
Save mikepaszkiewicz/13fcfb104ba6f52ec0c6e16b35b1c80a to your computer and use it in GitHub Desktop.
get uniq runner ids that don't exist
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
with x as (select users.id, transactions.runner_id, transactions.runner_obj, transactions.created_at from transactions | |
left outer join users | |
on users.id = transactions.runner_id | |
where transactions.runner_id is not null | |
and users.id is null) | |
select distinct runner_id from x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment