Update query to use a UNION for built in de-duping
There wasn’t a vulnerability, but because the query was stored in an
interim variable sobelow was marking it as a potential problem. While
troubleshooting, we updated the query to a UNION since it reads a little
Better while maintaining the same performance gain as the subselects.
Co-authored-by: stamates <stamates@hotmail.com>