-
-
Save mattm/1a6d7c93d7f6eddbe8147df9e9abb8ee to your computer and use it in GitHub Desktop.
Implicit vs Explicit INNER
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: Specifying INNER | |
... | |
select a.email | |
, a.created_at as expressed_interest_at | |
from helpscout.conversation a | |
INNER JOIN | |
helpscout.conversation_tag b | |
ON a.id = b.conversation_id | |
where b.tag = ‘beacon-interest’ | |
... | |
# Good: Omitting INNER | |
... | |
SELECT HC.`email`, DATE_FORMAT(HC.`created_at`, '%Y-%m-%e %T UTC') AS expressed_interest_at | |
FROM `helpscout.conversation` AS HC | |
JOIN `helpscout.conversation_tag` AS HCT ON HC.`id`=HCT.`conversation_id` WHERE HCT.`tag`='beacon-interest' | |
ORDER BY expressed_interest_at | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment