MeetCode - Programming Platform | MeetCode - Programming Solutions Platform
Design for historical salary (slowly changing)
Get Detail
Normalize for reporting and performance
Get Detail
Procedure with cursor-like loop (simple)
Get Detail
Procedure for batch price update with audit
Get Detail
Procedure to detect and return duplicates
Get Detail
Correlated subquery for per-row condition
Get Detail
Find latest order per customer using subquery
Get Detail
NOT IN pitfall with nulls (safe version)
Get Detail
Find products priced above category average
Get Detail
Use transaction block for multiple steps
Get Detail
Detect and prevent phantom reads (concept + SQL)
Get Detail
Use savepoint in a business transaction
Get Detail
Snapshot reporting without blocking writes
Get Detail
Complex trigger with transaction-safe stock check
Get Detail
View combining latest order per customer
Get Detail
Create table from query with constraints afterward
Get Detail
Customers with 3 consecutive buying months
Get Detail
Functional index for case-insensitive search
Get Detail
Find pairs with same salary in same department
Get Detail
Design for a multi-valued dependency (4NF flavor)
Get Detail
Procedure to place an order with items table variable
Get Detail
Customers whose every order is fully paid
Get Detail
Chunked updates with savepoint per batch
Get Detail
Prevent deleting parent rows when children exist
Get Detail
Auto-delete child rows on parent delete
Get Detail
Add a conditional CHECK using two columns
Get Detail
Enforce case-insensitive uniqueness (pattern approach)
Get Detail
Deferred constraint idea using transaction (concept + SQL)
Get Detail
Protect against orphan data during bulk load
Get Detail
Create a strong candidate key with multiple columns
Get Detail
Exactly one payment reference (XOR check)
Get Detail
Audit-friendly approach for sensitive tables
Get Detail
Transfer ownership idea (concept + SQL)
Get Detail
Rebuild a table to remove a column (portable approach)
Get Detail
Create an audit table for triggers later
Get Detail
Insert into two tables with transaction
Get Detail
Detect customers with suspicious refunds
Get Detail
Find first purchase date and latest purchase date
Get Detail
Market basket: products bought together
Get Detail
Partial index workaround using helper column
Get Detail
Find customers who bought from every category
Get Detail
Detect overlapping shifts using self join
Get Detail