Medium SQL
Coding problems · 40 total
Write complex JOIN with multiple tables
Start problem
Use self-join for hierarchical data
Start problem
Implement correlated subquery
Start problem
Use window functions (ROW_NUMBER, RANK)
Start problem
Calculate running totals with window functions
Start problem
Use LAG and LEAD functions
Start problem
Implement pivot table with CASE
Start problem
Use CTE (Common Table Expression)
Start problem
Write recursive CTE
Start problem
Use UNION ALL vs UNION
Start problem
Optimize query with proper indexes
Start problem
Use EXPLAIN to analyze query
Start problem
Implement pagination with LIMIT/OFFSET
Start problem
Use CASE with aggregate functions
Start problem
Filter with complex WHERE conditions
Start problem
Use COALESCE in JOIN conditions
Start problem
Implement data validation with CHECK constraint
Start problem
Use FOREIGN KEY constraints
Start problem
Create view with CREATE VIEW
Start problem
Use stored procedure
Start problem
Implement transaction with BEGIN/COMMIT
Start problem
Handle errors with TRY/CATCH
Start problem
Use MERGE for upsert operations
Start problem
Implement full-text search
Start problem
Use JSON functions for JSON data
Start problem
Parse and query JSON columns
Start problem
Use array functions
Start problem
Implement data archiving strategy
Start problem
Use partitioning for large tables
Start problem
Optimize query with query hints
Start problem
Use materialized views
Start problem
Implement data deduplication
Start problem
Use window frame specification
Start problem
Calculate percentiles with window functions
Start problem
Use FIRST_VALUE and LAST_VALUE
Start problem
Implement gap and island problems
Start problem
Use CROSS JOIN for cartesian product
Start problem
Implement conditional aggregation
Start problem
Use PIVOT and UNPIVOT
Start problem
Optimize subquery performance
Start problem