✔️✔️✔️easy solution - MySQL || PostgreSQL || MS SQL Server⚡⚡⚡
Code - MySQL\n\nSELECT p.product_id, p.product_name\nFROM Product p\nLEFT JOIN Sales s\nON p.product_id = s.product_id\nGROUP BY s.product_id\nHAVING MIN(s.sale
# Code - MySQL\n```\nSELECT p.product_id, p.product_name\nFROM Product p\nLEFT JOIN Sales s\nON p.product_id = s.product_id\nGROUP BY s.product_id\nHAVING MIN(s.sale_date) > \'2018-12-31\' AND MAX(s.sale_date) < \'2019-04-01\'\n```\n\n# Code - MS SQL Server | PostgreSQL\n```\nSELECT p.product_id, p.product_name\nFROM Product p\nLEFT JOIN Sales s\nON p.product_id = s.product_id\nGROUP BY p.product_id, p.product_name\nHAVING MIN(s.sale_date) > \'2018-12-31\' AND MAX(s.sale_date) < \'2019-04-01\'\n```
['MySQL', 'MS SQL Server']