Code Monkey home page Code Monkey logo

exercise.sql_simple-queries's Introduction

MySQL Hands-On #1: Simple Queries

  • The original .docx version of this assignment can be found here

Prerequisites:

  • Before attempting these exercises, run the script named mysqlsampledatabase.sql found at the root directory of this project

Deliverables:

  • create a respective .sql file as a submission for each Part listed below.
  • The database schema is:

Part 1

  • Write a query to display the name, product line, and buy price of all products.
  • The output columns should display as Name, Product Line, and Buy Price.
  • The output should display the most expensive items first.

Part 2

  • Write a query to display the first name, last name, and city for all customers from Germany.
  • Columns should display as First Name, Last Name, and City.
  • The output should be sorted by the customer’s last name (ascending).

Part 3

  • Write a query to display each of the unique values of the status field in the orders table.
  • The output should be sorted alphabetically increasing.
  • Hint: the output should show exactly 6 rows.

Part 4

  • Select all fields from the payments table for payments made on or after January 1, 2005.
  • Output should be sorted by increasing payment date.

Part 5

  • Write a query to display all Last Name, First Name, Email and Job Title of all employees working out of the San Francisco office.
  • Output should be sorted by last name.

Part 6

  • Write a query to display the Name, Product Line, Scale, and Vendor of all of the car products – both classic and vintage.
  • The output should display all vintage cars first (sorted alphabetically by name), and all classic cars last (also sorted alphabetically by name).

exercise.sql_simple-queries's People

Contributors

git-leon avatar belle-star 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.