Created
December 24, 2016 09:46
-
-
Save gotascii/18796a34ea6170ca25f924a8848a3c91 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 friends.id from friends | |
left join line_items on (friends.id = line_items.friend_id and line_items.deleted_at is null) | |
where | |
friends.status != 'Deleted' | |
# MORE | |
select friends.id from friends | |
left join line_items on (friends.id = line_items.friend_id) | |
where | |
friends.status != 'Deleted' | |
and line_items.deleted_at is null | |
# LESS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment