Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

**** Using Mysql, my_guitar_shop.sql Chapter 8: How to Work with Data Types Write a SELECT statement that returns these columns from the Products table: The

**** Using Mysql, my_guitar_shop.sql

Chapter 8: How to Work with Data Types

  1. Write a SELECT statement that returns these columns from the Products table:

The list_price column

A column that uses the FORMAT function to return the list_price column with 1 digit to the right of the decimal point

A column that uses the CONVERT function to return the list_price column as an integer

A column that uses the CAST function to return the list_price column as an integer

  1. Write a SELECT statement that returns these columns from the Products table:

The date_added column

A column that uses the CAST function to return the date_added column with its date only (year, month, and day)

A column that uses the CAST function to return the date_added column with just the year and the month

A column that uses the CAST function to return the date_added column with its full time only (hour, minutes, and seconds)

Chapter 9: How to Use Functions

  1. Write a SELECT statement that returns these columns from the Products table:

The list_price column

The discount_percent column

A column named discount_amount that uses the previous two columns to calculate the discount amount and uses the ROUND function to round the result so it has 2 decimal digits

  1. Write a SELECT statement that returns these columns from the Orders table:

The order_date column

A column that uses the DATE_FORMAT function to return the four-digit year thats stored in the order_date column

A column that uses the DATE_FORMAT function to return the order_date column in this format: Mon-DD-YYYY. In other words, use abbreviated months and separate each date component with dashes.

A column that uses the DATE_FORMAT function to return the order_date column with only the hours and minutes on a 12-hour clock with an am/pm indicator

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions

Question

Discuss the techniques of job analysis.

Answered: 1 week ago

Question

Explain the guideline for job description.

Answered: 1 week ago

Question

What are the objectives of job evaluation ?

Answered: 1 week ago