This document describes five SQL practice tasks:
Task 1:
- Select all columns from
products
table. - Select only
name
andphone
columns fromshippers
table.
Task 2:
- Find average, maximum, and minimum values for
price
inproducts
.
Task 3:
- Get unique
category_id
andprice
pairs fromproducts
. - Order by
price
descending (highest first) and limit to 10 rows.
Task 4:
- Count the number of products with price between 20 and 100 (inclusive).
Task 5:
- For each supplier (
supplier_id
), find the number of products and average price.