Categories: Uncategorized

Write a SELECT statement that returns InvoiceId and Total from the Invoice table

1.Write a SELECT statement that returns InvoiceId and Total from the Invoice table.  Use the CONCAT function to insert a ‘$’ in the front of  the total value

— 2.Write a SELECT statement that returns CustomerId and average Total from the Invoice table grouped by customerId. Use the CONCAT function to insert a ‘$’ in the front of  the average total and the FORMAT function to to display it with commas and 2 decimal places.

Don't use plagiarized sources. Get Your Custom Essay on
Write a SELECT statement that returns InvoiceId and Total from the Invoice table
Just from $13/Page
Order Essay

— 3.  Use the CHAR and CONCAT functions (for the first and last names), to format the the address for each customer in the customer table – the formatted output should look like this

— Gary Hernandez

— 3829 Broadway Ave

— New York, NY 10012

— note ***** the output will not look like this in the workbench the CHAR functions will place columns in each row of the results *****

— 4. Display the first initial, last name, and email address of each customer in the customer table.

— 5. Return these columns from the customer table, customerid, email and Phone. Use the substr and lpad functions to render the phone number like this: ************9999

— 6. use the concat_ws function to render to display the customer lastname and firstname in this manner: Lastname, Firstname. Also display the customer’s email address but only list the customers whose email addresses have more than 20 characters

— 7.Display the customerId and the phone for all customers who live in the USA, format the phone numbers so that they look like this 123-456-7899

— 8. For every track in the track table, return the track name and the album title. The album title should be in all uppercase letters.

— 9. For each track, display the unitprice, unitprice rounded to 1 decimal place, unitprice truncated to 1 decimal place, smallest integer >= unitprice and largest integer <= unitprice.

— 10. For each track, display the trackId and a random number between 1 and 10 using the trackId as a seed.

superadmin

Recent Posts

Consider the following information, and answer the question below. China and England are internation

Consider the following information, and answer the question below. China and England are international trade…

4 years ago

The CPA is involved in many aspects of accounting and business. Let’s discuss some other tasks, othe

The CPA is involved in many aspects of accounting and business. Let's discuss some other…

4 years ago

For your initial post, share your earliest memory of a laser. Compare and contrast your first percep

For your initial post, share your earliest memory of a laser. Compare and contrast your…

4 years ago

2. The Ajax Co. just decided to save $1,500 a month for the next five years as a safety net for rece

2. The Ajax Co. just decided to save $1,500 a month for the next five…

4 years ago

How to make an insertion sort to sort an array of c strings using the following algorithm: * beg, *

How to make an insertion sort to sort an array of c strings using the…

4 years ago

Assume the following Keynesian income-expenditure two-sector model:

Assume the following Keynesian income-expenditure two-sector model:                                                AD = Cp + Ip                                                Cp = Co…

4 years ago