MySQL solution faster than 97.93%
\nSELECT \nDISTINCT # return just once if more than 1 is sold in requested time\nProduct.product_id, Product.product_name\nFROM\nProduct\nINNER JOIN\nSales\nON 
```\nSELECT \nDISTINCT # return just once if more than 1 is sold in requested time\nProduct.product_id, Product.product_name\nFROM\nProduct\nINNER JOIN\nSales\nON Product.product_id = Sales.product_id\nWHERE\nSales.sale_date BETWEEN CAST(\'2019-01-01\' AS DATE) AND CAST(\'2019-03-31\' AS DATE) # sale has to be in requested period\nAND\nProduct.product_id NOT IN # sale MUST NOT BE before OR after requested dates\n(SELECT Product.product_id\nFROM\nProduct\nINNER JOIN\nSales\nON Product.product_id = Sales.product_id\nWHERE\nSales.sale_date < CAST(\'2019-01-01\' AS DATE) \nOR \nSales.sale_date > CAST(\'2019-03-31\' AS DATE))\n```
['MySQL']