SELECT J.FLAVOR FROM JULY AS J
LEFT JOIN FIRST_HALF AS F
ON F.SHIPMENT_ID = J.SHIPMENT_ID
GROUP BY J.FLAVOR
ORDER BY SUM(J.TOTAL_ORDER)+F.TOTAL_ORDER DESC
LIMIT 3
select FLAVOR
from
(SELECT *
from FIRST_HALF
union
SELECT *
from JULY) a
group by FLAVOR
order by SUM(TOTAL_ORDER) desc
limit 3