This seems like a simple join in amazon redshift that I have done countless times, but it gives me the following error:
'No results were returned by the query. [SQL State=02000]'
Here is the sql:
select campaign_id as product_campaign_id, count(*) as sends into table_1 from customer_to_product_campaign group by product_campaign_id ; select product_campaign_id, count(*) as opens_total into table_2 from product_action_oc where product_action_type_paid = 'open' group by product_campaign_id ; select t1.product_campaign_id, t1.sends, t2.opens_total into table_3 from table_1 t1 left join table_2 t2 on t1.product_campaign_id = t2.product_campaign_id ;
-table 1 (which is created without error) is ~ 6K rows
-table 2 (which is created without error) is ~ 10K rows
-the tables do have common product_campaign_id's, not that it should matter