Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
get uniq runner ids that don't exist
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
You can’t perform that action at this time.