SQL Practice Problems - Day 9 Focus: Date/Time Functions and Calendar Logic 1 - Extract year, month, and day from sales dates. Input Table: Sales_Transactions Output: Sale_ID, Date, Year, Month, Day 2 - Find sales that occurred on weekends. Input Table: Sales_Transactions Output: Sale_ID, Date, Day_Of_Week 3 - Calculate the number of days between order date and current date. Input Table: Sales_Transactions Output: Sale_ID, Date, Days_Since_Sale 4 - List products sold in Q2 (April-June) of any year. Input Tables: Sales_Transactions, Products Output: SKU_Code, Design_No, Date 5 - Show warehouse operations from the last 30 days. Input Table: Warehouse_Ops Output: Operation_ID, Operation_Type, Date 6 - Calculate average sales by day of week. Input Table: Sales_Transactions Output: Day_Of_Week, Avg_Sales 7 - Find customers who made purchases on consecutive days. Input Tables: Customers, Sales_Transactions Output: Customer_ID, Customer_Name, Purchase_Dates 8 - Identify products with sales peaks in specific months. Input Tables: Products, Sales_Transactions Output: SKU_Code, Peak_Month, Monthly_Sales 9 - Calculate the time between warehouse inbound and outbound operations. Input Table: Warehouse_Ops Output: SKU_Code, Inbound_Date, Outbound_Date, Days_In_Warehouse 10 - Show monthly sales growth percentages year-over-year. Input Table: Sales_Transactions Output: Month, Current_Year_Sales, Previous_Year_Sales, Growth_Pct 11 - Convert all timestamps to UTC timezone for reporting. Input Table: Warehouse_Ops Output: Operation_ID, Original_Timestamp, UTC_Timestamp 12 - Find the busiest hour of day for sales. Input Table: Sales_Transactions Output: Hour_Of_Day, Transaction_Count 13 - Calculate customer purchase frequency in days. Input Tables: Customers, Sales_Transactions Output: Customer_ID, Avg_Days_Between_Purchases 14 - Identify seasonal products with 80% of sales in 3 consecutive months. Input Tables: Products, Sales_Transactions Output: SKU_Code, Seasonal_Months, Pct_Total_Sales 15 - Generate a complete calendar date dimension table for 2021-2023. Input: None Output: Date, Day_Of_Week, Month, Quarter, Year, Is_Weekend