Data loading and SQL basics. DQL commands

This document describes five SQL practice tasks:

Task 1:

  • Select all columns from products table.
  • Select only name and phone columns from shippers table.

Task 2:

  • Find average, maximum, and minimum values for price in products.

Task 3:

  • Get unique category_id and price pairs from products.
  • 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.