Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/dm-zhuk/goit-rdb-hw-07

Additional built-in SQL functions. Time param
https://github.com/dm-zhuk/goit-rdb-hw-07

functions mysql8 time

Last synced: about 6 hours ago
JSON representation

Additional built-in SQL functions. Time param

Awesome Lists containing this project

README

        

# goit-rdb-hw-07 Relationship Databases Topic VII: Additional built-in SQL functions. Time param

-- Task 1. SQL query that extracts the year, month, and date from the date attribute for the orders table. Display them in three separate attributes along with the id attribute and the original date attribute (there will be 5 attributes in total)

![screenshot](./assets/Screenshot%20rdb-hw-07-test-7.1.jpg)

-- Task 2. SQL query that adds one day to the date attribute for the orders table. Display the id attribute, the original date attribute, and the addition result on the screen

![screenshot](./assets/Screenshot%20rdb-hw-07-test-7.2.jpg)

-- Task 3. SQL query that displays the number of seconds since the start of the countdown for the orders table for the date attribute (shows its timestamp value). To do this, you need to find and apply the necessary function. Display the id attribute, the original date attribute and the result of the function on the screen

![screenshot](./assets/Screenshot%20rdb-hw-07-test-7.3.jpg)

-- Task 4: SQL query that counts how many rows in the orders table contain a date attribute between 1996-07-10 00:00:00 and 1996-10-08 00:00:00

![screenshot](./assets/Screenshot%20rdb-hw-07-test-7.4.jpg)

-- Task 5: SQL query that displays the id attribute, the date attribute, and the JSON object {"id": , "date": } for the orders table. Use the function to create a JSON object

![screenshot](./assets/Screenshot%20rdb-hw-07-test-7.5.jpg)

[text](sql_code.txt)