Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a SQL query to find the sum of sales of current row and previous 2 rows in a product group? Sample outcome of the
- Write a SQL query to find the sum of sales of current row and previous 2 rows in a product group? Sample outcome of the SQL statement is given below.
PRODUCT_ID QUANTITY CALC_SALES
------------------------------------------------------------
100 25 25
100 16 41
100 12 53
200 20 20
200 15 35
200 14 49
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started