1. 8
    1. 2

      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.

      I agree with the idea, though.

      1. 1

        Corrected. Thanks!

      2. 2

        I was hoping for SQL Assertions, which are constraints but on a whole table instead of a single row.

      🇬🇧 The UK geoblock is lifted, hopefully permanently.