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

  Values referred to by ref-variables

Write expressions to compute the following functions of the values referred to by ref-variables x and y, which we shall assume refer to reals.

  Tools or tactics used by risk assessment team

In your new position at XYZ Corporation, you have been asked to lead risk assessment team. How can you bring everyone to agreement an what are there any tools or tactics you might use to help?

  Explain type to reveal computer to be computer

Explain why you think these questions would be the type to "reveal" the computer to be a computer? Why would these responses have to be given a human begin?

  Impact of meals on world-ecological and economic perspective

Write about the impact that two (2) of your meals have on our world from an ecological and economic perspective.

  Determine independent variable and dependent variable

The length of the string is shortened by 5cm and the time is measured. Determine the independent variable? Determine the dependent variable? What must the controlled variables be?

  Explain hardware implementations of intelligent agents

There are hardware implementations of intelligent agents. Determine the literature instances of intelligent agents as software. Compare and contrast two implementations.

  Describe the five forces model

Describe the Five Forces Model. What role does the Five Forces Model play in decision making? Define a database management system and discuss each of the five important software components of a database management system.

  Describe what is downward solution

The Conflict Resolution Phase can be thought of as control strategy, describe four types of such strategy Describe what is downward solution

  Write a method called median

Write a method called median that accepts an array of integers as its argument and returns the median of the numbers in the array. The median is the number that will appear in the middle if you arrange the elements in order

  Recognize ten different areas where software helps

In spreadsheet, recognize at least 10 different areas where software could help you, like collecting rent, performing tenant background checks, and scheduling building maintenance.

  Explain us supreme court-s reaction bribery of internal

Explain what was U.S. Supreme Court's reaction to case where business executive was found guilty of aiding and abetting in bribery of Internal Revenue Service Agent.

  Using the expand, guess, and verify method find closed

Using the expand, guess, and verify method find closed form solutions for the following recurrence relations.

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