Back to problems

Design SQL/Pandas aggregations on retail schema

SQL · Amazon · Hard

Part A (SQL) Window: 2025-08-26 through 2025-09-01 inclusive. For the sample rows, this returns: cust_id order_id order_date order_revenue rolling_3_day_rev rank_in_7d_by_revenue C1 101 2025-08-29 20.00 20.00 1 C1 102 2025-08-30 10.00 30.00 2 C2 104 2025-08-31 20.00 20.00 2 C2 105 2025-09-01 40.00 60.00 1 Part B (pandas) Assumes the DataFrames customers, orders, order_items, and products already exist. Output for the sample rows: No Python row-by-row loops are used. The…

Checking your access…