SQL Taskbook Level 1.5
Given a table:
| id | user_id | product_id | amount | date |
|---|---|---|---|---|
| 1 | 2 | 2 | 150.50 | 2020-03-17 |
| 2 | 3 | 2 | 200.60 | 2017-08-31 |
| 3 | 4 | 4 | 700.10 | 2011-05-03 |
| 4 | 5 | 3 | 300.40 | 2005-12-31 |
| 5 | 5 | 3 | 650.70 | 2000-12-02 |
Solve the following tasks for it:
Задание 1
Select all records from this table where user_id is equal to 5.
Задание 2
Select only the amount field from this table where user_id equals 5.
Задание 3
Select only the amount field from this table where product_id equals 2.
Задание 4
Select all records from this table where amount is greater than 200.
Задание 5
Select all records from this table where amount is less than 500.
Задание 6
Select all records from this table where amount is greater than or equal to 500.
Задание 7
Select all records from this table where date is equal to '2005-12-31'.
Задание 8
Select all records from this table where date is greater than '2003-12-31'.
Задание 9
Select all records from this table where date is less than '2005-12-31'.