GithubHelp home page GithubHelp logo

lesiaukr / goit-rdb-hw-07 Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 890 KB

Master's degree. Relational databases: Working with time | Additional built-in SQL functions

goit-rdb-hw-07 sql date-add unix-timestamp json-object

goit-rdb-hw-07's Introduction

goit-rdb-hw-07

Working with time. Additional built-in SQL functions.

TASKS

  1. Write an SQL query that selects the year, month, and day from the date attribute in the orders table. Display them as three separate attributes alongside the id attribute and the original date attribute (total of 5 attributes).

  2. Write an SQL query that adds one day to the date attribute in the orders table. Display the id attribute, the original date attribute, and the result of the addition.

  3. Write an SQL query that displays the number of seconds from the start of the epoch for the date attribute in the orders table (showing its timestamp value). Find and apply the necessary function. Display the id attribute, the original date attribute, and the result of the function.

  4. Write an SQL query that counts the rows in the orders table with a date attribute between '1996-07-10 00:00:00' and '1996-10-08 00:00:00'.

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

goit-rdb-hw-07's People

Contributors

lesiaukr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.