Skip to content

List the Products Ordered in a Period #42

Answered by iamAntimPal
Antim-IWP asked this question in Q&A
Discussion options

You must be logged in to vote
# Write your MySQL query statement below
SELECT P.PRODUCT_NAME, SUM(O.UNIT) AS UNIT  
FROM PRODUCTS P  
INNER JOIN ORDERS O  
ON P.PRODUCT_ID = O.PRODUCT_ID  
WHERE O.ORDER_DATE BETWEEN '2020-02-01' AND '2020-02-29'  
GROUP BY P.PRODUCT_NAME  
HAVING SUM(O.UNIT) >= 100;

FOR EPLAIN CLICK ON ME

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Antim-IWP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants