Skip to content

oleksandr-romashko/goit-rdb-hw-03

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

SQL Requests

project thumbnail

goit-rdb-hw-03

SQL basics. DQL queries.

Task description

The initial archive with database dataset data in CSV format is located here.

The list of tasks:

  1. Write an SQL command to:
    • Select all columns (using the wildcard '*') from the products table;
    • Select only the name and phone columns from the shippers table, and check its execution in MySQL Workbench.
  2. Write an SQL command to find the average, maximum, and minimum values of the price column in the products table, and check its execution in MySQL Workbench.
  3. Write an SQL command to select unique values of the category_id and price columns from the products table. Order the output by the price in descending order and select only 10 rows. Check the correctness of the command in MySQL Workbench.
  4. Write an SQL command to find the number of products (rows) that are within the price range of 20 to 100, and check its execution in MySQL Workbench.
  5. Write an SQL command to find the number of products (rows) and the average price (price) for each supplier (supplier_id), and check its execution in MySQL Workbench.

Solution

Solutions are represented in homework folder:

  1. Part 1:

    Part 1.1: SQL | MySQL Workbench screenshot.

    Part 1.2: SQL | MySQL Workbench screenshot.

  2. Part 2: SQL | MySQL Workbench screenshot.

  3. Part 3: SQL | MySQL Workbench screenshot.

  4. Part 4: SQL | MySQL Workbench screenshot.

  5. Part 5: SQL | MySQL Workbench screenshot.

Releases

No releases published