Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

List the Products Ordered in a Period #42

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

1327. List the Products Ordered in a Period

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

# 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

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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.