As none of the columns of the joined table are used, most probably
this should be re-written as an EXISTS condition.
Then neither GROUP BY nor DISTINCT is needed.
I need the columns from joined tables. To keep it simple, I didn't include them in the query. EXISTS solution won't work for me.