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.
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."
|