SQL Taskbook Level 7.1
Given a table:
| id | user_id | amount | payment_type | bonuses_increases | bonuses_decreases | created_at |
| 1 | 3 | 80.50 | CARD | 0.85 | 0.00 | 2023-09-10 |
| 2 | 2 | 1700.13 | CARD | 17.00 | 1000.00 | 2023-09-27 |
| 3 | 5 | 214.34 | CARD | 2.14 | 50.00 | 2023-09-01 |
| 4 | 1 | 596.00 | CASH | 5.96 | 0.00 | 2023-10-08 |
| 5 | 3 | 800.18 | CASH | 8.00 | 0.00 | 2023-09-30 |
| 6 | 3 | 120.18 | CARD | 1.20 | 50.18 | 2023-10-03 |
| 7 | 2 | 1000.12 | CASH | 10.00 | 0.00 | 2023-09-20 |
| 8 | 1 | 81.78 | CASH | 8.17 | 0.00 | 2023-09-25 |
| 9 | 4 | 509.12 | CARD | 5.91 | 100.12 | 2023-10-07 |
| 10 | 5 | 100.50 | CASH | 1.00 | 0.00 | 2023-10-08 |
Solve the following tasks for it:
Find the transaction that has the highest cost using subqueries.
Find the transaction that has the minimum cost using subqueries.
Find the first transaction. Using subqueries.
Find the last transaction. Using subqueries.
Find the last transaction. Using subqueries.