SQL Practice Problems - Day 7 Focus: Window Functions and Ranking 1 - Rank products by weight within each category. Input Table: Products Output: SKU_Code, Category, Weight, Weight_Rank 2 - Assign row numbers to sales transactions by date. Input Table: Sales_Transactions Output: Row_Num, Sale_ID, Date, Gross_Amount 3 - Show dense rank of customers by total spending. Input Tables: Customers, Sales_Transactions Output: Customer_ID, Customer_Name, Total_Spent, Spend_Rank 4 - Find top 3 heaviest products in each category. Input Table: Products Output: Category, SKU_Code, Weight, Weight_Rank 5 - Number warehouse operations sequentially within each operation type. Input Table: Warehouse_Ops Output: Operation_ID, Operation_Type, Seq_Num 6 - Rank sales transactions by amount within each month. Input Table: Sales_Transactions Output: Sale_ID, Month, Gross_Amount, Monthly_Rank 7 - Calculate cumulative sales by product over time. Input Tables: Products, Sales_Transactions Output: SKU_Code, Date, Daily_Sales, Running_Total 8 - Identify products in the top 10% of inventory value by category. Input Tables: Inventory, Pricing, Products Output: Category, SKU_Code, Inventory_Value, Value_Percentile 9 - Show customers with their highest single purchase amount and rank. Input Tables: Customers, Sales_Transactions Output: Customer_ID, Customer_Name, Max_Purchase, Purchase_Rank 10 - Find months with the largest sales drop from previous month. Input Table: Sales_Transactions Output: Month, Monthly_Sales, Previous_Month_Sales, Sales_Drop 11 - Assign percentile ranks to products by sales volume. Input Tables: Products, Sales_Transactions Output: SKU_Code, Design_No, Total_Sold, Sales_Percentile 12 - Identify consecutive sales days for each customer. Input Tables: Customers, Sales_Transactions Output: Customer_ID, Consecutive_Days 13 - Rank product categories by average sales price. Input Tables: Products, Sales_Transactions Output: Category, Avg_Sale_Price, Category_Rank 14 - Find customers who are consistently in the top 25% spenders each month. Input Tables: Customers, Sales_Transactions Output: Customer_ID, Customer_Name, Top_Months 15 - Calculate 7-day moving average of daily sales. Input Table: Sales_Transactions Output: Date, Daily_Sales, Moving_Avg_7day