INNER vs LEFT JOIN
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
# Good: INNER JOIN | |
... | |
SELECT a.email AS email, a.created_at AS expressed_interest_at | |
FROM helpscout.conversation AS a | |
INNER JOIN helpscout.conversation AS b ON a.id = b.conversation_id | |
WHERE b.conversation_id = 'beacon-interest' | |
... | |
# Okay: LEFT JOIN | |
... | |
select | |
c.email, | |
c.created_at as expressed_interest_at | |
from hubspot.conversation c | |
left join hubspot.conversation_tag t on c.id = t.conversation_id | |
where t.tag = 'beacon-interest' | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment