LEFT JOIN hubspot_account ha1 ON ea1.user_account_id = ua1.id
Nitpick - surely it’s meant to say ... on ha1.user_account_id ...
the query will start returning a random HubSpot account for each user account.
Will it, though ? I thought distinct operated on the whole result set. To me, it looks weird to write it on the line with the column, and not next to select. It’ll start duplicating/multiplying rows is my thought. I could be wrong.
Nitpick - surely it’s meant to say
... on ha1.user_account_id ...Will it, though ? I thought
distinctoperated on the whole result set. To me, it looks weird to write it on the line with the column, and not next toselect. It’ll start duplicating/multiplying rows is my thought. I could be wrong.I agree with the idea, though.
Corrected. Thanks!
I was hoping for SQL Assertions, which are constraints but on a whole table instead of a single row.