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

  Find default amount of time that entry remains in arp cache

Determine the default amount of time that the entry remains in ARP cache before being removed. You can find this empirically (by monitoring the cache contents).

  Types of pre-created objects that can be used on web sites

Types of pre-created objects that can be used on Web sites. Describe the objects you find and what they are used for. Include links to the sites you used in your research.

  An ability to utilise

An ability to utilise sources such as the Internet and University library facilities to search, locate and summarise data relevant to the assignment

  What is the speedup of the system with l2 cache?

computer calculate the following: (a) What is the L2 read miss penalty? (b) What is the L1 read miss penalty? (c) What is the read penalty (L1 and L2 cache)? (d) Assume 33% (1/3) loads, and everything else is ideal. What is the CPI? (e) What would th..

  Best way to multiply a chain

What is the best way to multiply a chain of matrices with dimensions that are 10 x 5, 5 x 2, 2 x 20, 20 x 12, 12 x 4, and 4 x 60? Please show work.

  Determine physical address that code byte fetched

Suppose the same code segment base what physical address will code byte be fetched from if instruction pointer contains 539CH?

  Comparing accuracies using test options

Compare the accuracies obtained using the three "test options": "Use training set", "cross-validation" and "percentage split".

  Memory allocation errors

The application should display all daily. Use a user-defined function as handler of memory allocation errors. The user-defined function should be registered as a default handler of new failures temperatures as well as average weekly temperatures in a..

  Why is it important to educate users about risks

what is a primary security risk that users should acknowledge when using macros? Why is it important to educate users of these risks once their dilemma is resolved?

  Place two three d points a and b in two different locations

Place the two 3d points A and B in two different locations in a simple stereo diagram which demonstrates these two possibilities. Draw a different picture for each situation.

  Drawing class diagram to show instructor serves department

One instructor also serves a department chair. Draw a detailed class diagram to represent the above information.

  Describe tttc management significance of observing user

Using at least two articles for support, describe to TTTC management the significance of observing user reaction, suggestions, and innovations in prototyoping process.

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