SQL Practice Problems - Day 12 Focus: Delta Lake Operations (Databricks Specific) 1 - Merge new products from a source table into the target Delta table. Input Tables: products_delta (target), products_staging (source) Output: Updated products_delta table 2 - Upsert sales transactions from a daily batch into the main sales table. Input Tables: sales_delta (target), sales_daily (source) Output: Updated sales_delta table 3 - Handle schema evolution by adding new columns during merge operations. Input Tables: customers_delta (target), customers_enriched (source) Output: customers_delta with new columns 4 - Implement SCD Type 1 for customer dimension updates. Input Tables: dim_customers_delta (target), stg_customers (source) Output: Updated dim_customers_delta table 5 - Merge inventory updates while handling quantity adjustments. Input Tables: inventory_delta (target), inventory_updates (source) Output: Updated inventory_delta table 6 - Use MERGE with conditional updates based on business rules. Input Tables: pricing_delta (target), pricing_updates (source) Output: Updated pricing_delta table 7 - Implement incremental load with version tracking for audit purposes. Input Tables: sales_delta (target), sales_incremental (source) Output: Updated sales_delta with version metadata 8 - Handle soft deletes using MERGE operations with is_deleted flag. Input Tables: products_delta (target), products_deletes (source) Output: products_delta with soft-deleted records 9 - Merge data from multiple source tables into a single Delta table. Input Tables: consolidated_sales_delta (target), online_sales, store_sales Output: Updated consolidated_sales_delta table 10 - Use MERGE with complex join conditions and multiple match clauses. Input Tables: customer_orders_delta (target), order_updates (source) Output: Updated customer_orders_delta table 11 - Implement data quality checks during merge operations using constraints. Input Tables: products_delta (target), products_updates (source) Output: Validated products_delta updates 12 - Handle late-arriving facts using MERGE with historical data. Input Tables: sales_delta (target), late_arriving_sales (source) Output: Updated sales_delta with late data 13 - Use MERGE with time travel to correct historical data issues. Input Tables: sales_delta (target), data_corrections (source) Output: Corrected sales_delta table 14 - Implement CDC (Change Data Capture) pattern using MERGE operations. Input Tables: cdc_target_delta (target), cdc_stream (source) Output: Synchronized cdc_target_delta table 15 - Optimize Delta table performance during merge operations with Z-order. Input Tables: large_sales_delta (target), daily_sales (source) Output: Optimized large_sales_delta table