SQL Taskbook Level 2.8
Given a table:
| id | name | total | date |
| 1 | Aaron | 999 | 2023-08-31 |
| 2 | Max | 140 | 2023-09-28 |
| 3 | Catherine | 560 | 2023-05-31 |
| 4 | Catherine | 240 | 2023-03-22 |
| 5 | Aaron | 500 | 2023-01-24 |
Solve the following tasks for it:
Задание 1
List unique customers who have placed orders and display the amount and number of their orders, sorted in ascending order.
Задание 2
Find the total number of orders made by each customer and identify the customers who made less than 3 orders.
Задание 3
List orders made in the current month and indicate the number of products in each order and their total cost.
Задание 4
Find the average order size (amount) for the last 2 months, and identify orders that are below the median amount.
Задание 5
Display orders where the amount is greater than 1000 dollars, and identify the customers who placed such orders.