Write a select statement that columns from the products tab

Assignment Help Basic Computer Science
Reference no: EM13166605

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

 

2. 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 that's 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

 

A column that uses the DATE_FORMAT function to return the

order_date column in this format: MM/DD/YY HH:SS. In other

words, use two-digit months, days, and years and separate them by

slashes. Use 2-digit hours and minutes on a 24-hour clock. And use

leading zeros for all date/time components.

 

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

 

The card_number column

 

The length of the card_number column

 

The last four digits of the card_number column

 

When you get that working right, add the columns that follow to the result set. This

is more difficult because these columns require the use of functions within functions.
A column that displays the last four digits of the card_numbercolumn in this format: XXXX-XXXX-XXXX-1234. In other words,use Xs for the first 12 digits of the card number and actual numbersfor the last four digits of the number. 15 Exercises for Murach's MySQL (My Guitar Shop database)
4. Write a SELECT statement that returns these columns from the Orders table:
The order_id column
The order_date column
A column named approx_ship_date that's calculated by adding 2days to the order_date column
The ship_date column
A column named days_to_ship that shows the number of daysbetween the order date and the ship date
When you have this working, add a WHERE clause that retrieves just the orders forMay 2012. 

 

Reference no: EM13166605

Questions Cloud

You should use pure recursive calls : You should use pure recursive calls completely and count the number of calls the program makes. You should count how many times recursive calls were made.
Presume that aspartame is a molecular solid : Assume that aspartame is a molecular solid and does not ionize when it dissolves in water. Kf values are given here.
What value would be returned from call to its size() method : If a collection stores 5 objects, what value would be returned from a call to its size() method?
A company hired 10 temporary workers : A company hired 10 temporary workers who are paid hourly and you are given a data file that contains the last name of the employees, the number of hours each employee worked in a week, and the hourly pay rate of each employee.
Write a select statement that columns from the products tab : Write a SELECT statement that returns these columns from the Products table
Display the date output with each field : How do you display the date output with each field on a separate line? How will you save the last two digits of the year from the date output in a variable?
What these three things(rob, rs, rsr) explain : What these three things(ROB, RS, RSR)  explain  ?
Filling all the positions of his cabinet : How many ways are there of filling all the positions of his cabinet if we assume that each position be filled by a different person and do not take into account which position each been has been assigned?
Modify the btod procedure : Modify the BTOD procedure so that leading zeros are replaced by blanks. For example, if the result is "0" - "5" - "9," the leading 0 in the hundreds position gets replaced by a blank, giving " " - "5" - "9."

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd