EASY  || MYSQL || JOIN || HAVING || WHERE
Intuition\nThe Main Task Is To Get The Range Of Date From FEB 01 - FEB 29\n# Approach\n1. Filter the date based on the condition \n" WHERE order_date BETWEEN \'
# Intuition\nThe Main Task Is To Get The Range Of Date From FEB 01 - FEB 29\n# Approach\n1. Filter the date based on the condition \n" WHERE order_date BETWEEN \'2020-02-01\' AND \'2020-02-29\'"\n2. Get sum greater than 100 \n"HAVING SUM(unit) >= 100"\n\n![image.png](https://assets.leetcode.com/users/images/eeb860e5-06fe-4cdb-9b96-a0808f856367_1725601883.5338802.png)\n\n\n# Code\n```mysql []\nSELECT \n     product_name , \n     SUM(unit) AS unit\nFROM Products AS P\nLEFT JOIN Orders AS O\n     ON P.product_id = O.product_id \n     WHERE order_date BETWEEN \'2020-02-01\' AND \'2020-02-29\'\nGROUP BY product_id, product_name          \nHAVING SUM(unit) >= 100\n\n\n\n```
['Database', 'MySQL']