Git Product home page Git Product logo

sql-practice's Introduction

sql-practice

Create a new database called sql_practice and start with this schema:

CREATE TABLE posts (
     id int auto_increment primary key, 
     title varchar(75), 
     body text
);

References:

Use a MySQL Client Query window to complete the following tasks:

  1. Add a column to represent when this post was created
  2. Add a column to represent what the current status is of the post (draft, publish, archive)
  3. Add a column to represent the number of views this post has received
  4. Add a column to represent the subtitle for this post
  5. Insert a published post created yesterday with a title and body of your choosing
  6. Insert a published post created last Tuesday with 100 views and a title/body of your choosing
  7. Insert a post created today (now) that is a draft and a title/body of your choosing
  8. Select all posts that are published
  9. Select the post with id = 2
  10. Select all posts that have more than 1 view
  11. (Black Diamond) Select all posts that were made in the last two days

sql-practice's People

Contributors

cahlan avatar tslater avatar

Watchers

 avatar  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.