Description
Support the following case:
SELECT f.store_id, f.date_id, s.state_province FROM (SELECT 4 AS store_id, date_id, product_id FROM fact_sk WHERE date_id >= 1300 UNION ALL SELECT store_id, date_id, product_id FROM fact_stats WHERE date_id <= 1000) f JOIN dim_store s ON f.store_id = s.store_id WHERE s.country IN ('US', 'NL')