fix(redshift): unit test query wraps UNION ALL in a subquery before ORDER BY