Course Content
Advanced Techniques in SQL
Advanced Techniques in SQL
Challenge: Query Optimization
Let's discover two tables: bank_accounts
and one additional table named transactions
.
BankAccounts table
account_number | account_holder | balance |
---|---|---|
789 | Alice Johnson | 3500.00 |
101 | Bob Brown | 4500.00 |
202 | Emily Jones | 6000.00 |
303 | Michael Davis | 800.00 |
404 | Sarah Wilson | 12000.00 |
505 | David Taylor | 300.00 |
606 | Emma Thomas | 7500.00 |
707 | Daniel Martinez | 1000.00 |
808 | Olivia Rodriguez | 900.00 |
909 | Sophia Lee | 2500.00 |
123 | John Doe | 5000.00 |
456 | Jane Smith | 2000.00 |
Transactions table
account_from | account_to | amount | timestamp |
---|---|---|---|
789 | 101 | 1000.00 | 2024-05-27 12:00:00 |
101 | 202 | 2000.00 | 2024-05-27 12:05:00 |
202 | 303 | 500.00 | 2024-05-27 12:10:00 |
303 | 404 | 800.00 | 2024-05-27 12:15:00 |
404 | 505 | 1200.00 | 2024-05-27 12:20:00 |