SQL · Amazon · Easy
You are given a table purchases that records every purchase transaction. order_id is the primary key. Each row captures a single purchase, where quantity tells how many items were bought in that transaction. Write a query that computes the running total quantity purchased for each product type. For every row in the table, your result set must contain these columns: product_type order_date quantity cum_purchased The column cum_purchased is the cumulative sum of quantity for…
Checking your access…