JOIN + LEFT JOIN
\nSQL []\nSELECT p.product_id, p.product_name\nFROM product p\nJOIN sales s \n  ON p.product_id = s.product_id AND s.sale_date between \'2019-01-01\' and \'2019
\n```SQL []\nSELECT p.product_id, p.product_name\nFROM product p\nJOIN sales s \n  ON p.product_id = s.product_id AND s.sale_date between \'2019-01-01\' and \'2019-03-31\'\nLEFT JOIN sales s2\n  ON p.product_id = s2.product_id AND s2.sale_date not between \'2019-01-01\' and \'2019-03-31\'\nWHERE s2.product_id is null\nGROUP BY p.product_id, p.product_name\n```\n\n\n\n
['MySQL']