Skip to content
Advertisement

Union All with Join

I’m trying to perform a join after Union All. Separately the 2 queries work but I haven’t been able to piece together the join. The Unioned query needs to then be joing by assigned_user_id from the accounts table join

Advertisement

Answer

You need to make them subqueries, like this:

I personally don’t like subqueries this long and would have written it using CTEs:

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement