psandler wrote:
Quick question:
Any way to get the DISTINCT keyword into the subquery of a compare set predicate? Do I need to use group by instead (should be the same execution plan)?
DISTINCT in a subquery isn't really needed, as you compare to a set, so if that set contains duplicates, that's not a problem. DISTINCT often is slower in that situation. Could you give an example where you do need it?