i have two queries being combined with a UNION ALL1:
--Query 1
SELECT Flavor, Color
FROM Friends
<
I'm suggesting to create a variable table in the format of the columns you want.
Example:
set nocount on
DECLARE @temp_table TABLE(Flavor varchar(20), Color varchar(20))
insert into @temp_table (Flavor,Color)
/*Apply select query #1 with all filters, joins and sorting */
SELECT Flavor,Color FROM Strangers ORDER BY Wavelength DESC
insert into @temp_table (Flavor,Color)
/*Apply select query #2 with all filters, joins and sorting */
SELECT Flavor, Color FROM Friends
/*Return the results pushed into @variable table */
select * from @temp_table