An open API service indexing awesome lists of open source software.

https://github.com/lesiaukr/goit-rdb-hw-03

Master's degree. Relational databases: downloading data | DQL commands
https://github.com/lesiaukr/goit-rdb-hw-03

dql-commands goit-rbd-hw-03 rbd sql workbanch

Last synced: about 2 months ago
JSON representation

Master's degree. Relational databases: downloading data | DQL commands

Awesome Lists containing this project

README

        

# goit-rdb-hw-03

1. Write an SQL command to:

- Select all columns (using wildcard "\*") from the "products" table.
![task 1.1 result](./src/task_1.1.jpg)
- Select only the columns "name" and "phone" from the "shippers" table.
Verify its correctness in MySQL Workbench.
![task 1.1 result](./src/task_1.2.jpg)

2. Write an SQL command to find the average, maximum, and minimum value of the "price" column in the "products" table. Verify its correctness in MySQL Workbench.
![task 2 result](./src/task_2.jpg)

3. Write an SQL command to select unique values of the columns "category_id" and "price". Order the output by descending "price" values and select only 10 rows. Verify its correctness in MySQL Workbench.
![task 3 result](./src/task_3.jpg)

4. Write an SQL command to find the number of products (rows) that have prices within the range from 20 to 100. Verify its correctness in MySQL Workbench.
![task 4 result](./src/task_4.jpg)

5. Write an SQL command to find the number of products (rows) and the average price (price) for each supplier (supplier_id). Verify its correctness in MySQL Workbench.
![task 5 result](./src/task_5.jpg)