Question

Write a SELECT statement that returns these columns from the INVOICES table: the invoice_total column, a...

Write a SELECT statement that returns these columns from the INVOICES table: the invoice_total column, a column that uses the ROUND function to return the invoice_total column with 1 decimal digit, a column that uses the ROUND function to return the invoice_total column with no decimal digits, a column that uses TRUNCATE function tom return the invoice_total column with no decimal digits.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Query:

SELECT invoice_total, ROUND(invoice_total, 1), ROUND(invoice_total, 0), TRUNC(invoice_total, 0) FROM

INVOICES

--> ROUND(column, n) for n decimal places

--> TRUNC(column, n) for n decimal places

Add a comment
Know the answer?
Add Answer to:
Write a SELECT statement that returns these columns from the INVOICES table: the invoice_total column, a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • and blankS iI a SELECT statement that returns these columns from the Invoices Write table 4....

    and blankS iI a SELECT statement that returns these columns from the Invoices Write table 4. The invoice number column The invoice date column The invoice_date column plus 30 days The payment_date column A column named days_to_pay that shows the number of days between the invoice date and the payment date The number of the invoice date's month The four-digit year of the invoice date When you have this working, add a WHERE clause that retrieves just the invoices for...

  • 2) Write a SELECT statement that returns these columns from the DATE_SAMPLE table int EX database....

    2) Write a SELECT statement that returns these columns from the DATE_SAMPLE table int EX database. The start_date column. A column that uses the DATE_FORMAT function to return the start_date column with its month name abbreviated and its month, day and two-digit year separated by slashes. A column that uses the DATE_FORMAT function to return the start_date column with its month and day returned as integers with no leading zeros, a two-digit year and all date parts separated by slashes....

  • 5. Write a SELECT statement that returns these columns from the Orders table: OrderID OrderDate ShipDate...

    5. Write a SELECT statement that returns these columns from the Orders table: OrderID OrderDate ShipDate Return only the rows where the ShipDate column contains a null value. 6. Write a SELECT statement that returns all columns from the Addresses table State is equal to CA 7. Write a SELECT statement that returns all columns from the Products table Product name has a "ru" in its name 8. Write a SELECT statement that returns these columns from the Customers table...

  • Write a select statement that returns all columns from the orders table, but only returns the...

    Write a select statement that returns all columns from the orders table, but only returns the five newest (most recent) orders in the orders table as shown by the order_date column

  • #6 Write a SELECT statement that returns these columns: The count of the number of orders...

    #6 Write a SELECT statement that returns these columns: The count of the number of orders in the Orders table The sum of the tax_amount columns in the Orders table Write a SELECT statement that returns one row for each category that has products with these columns: The category_name column from the Categories table The count of the products in the Products table The list price of the most expensive product in the Products table Sort the result set so...

  • Can I get screenshots of the output. 1. SELECT a character string composed of the last...

    Can I get screenshots of the output. 1. SELECT a character string composed of the last two digits of the year of a title's pubdate, the pub_id, and the first ten characters of the title. 2. Display in one query output table the “id”, “name”, city, and state of both publishers and stores. 3. Write a SELECT statement that returns these columns from the Titles table: The price column A column that uses the CAST function to return the price...

  • WRITE A SQL QUERY SQL SERVER Write a SELECT statement that returns one column from the...

    WRITE A SQL QUERY SQL SERVER Write a SELECT statement that returns one column from the Customers table named FullName that joins the LastName and FirstName columns. --       Format this column with the last name, a comma, a space, and the first name like this: --       Doe, John --       Sort the result set by last name in ascending sequence. --       Return only the contacts whose last name begins with a letter from M to Z. --  ...

  • Function. 12. Write a SELECT statement without a FROM clause that creates a row with these column...

    function. 12. Write a SELECT statement without a FROM clause that creates a row with these columns: starting_principal interest principal_plus_interest Starting principal of $50,000 65% of the principal The principal plus the interest To calculate the third column, add the expressions you used for the first two columns. function. 12. Write a SELECT statement without a FROM clause that creates a row with these columns: starting_principal interest principal_plus_interest Starting principal of $50,000 65% of the principal The principal plus the...

  • SQL - write a select statement that returns four columns: vendorName, invoiceNumber, invoiceDate, and invoiceTotal. Return...

    SQL - write a select statement that returns four columns: vendorName, invoiceNumber, invoiceDate, and invoiceTotal. Return ONE ROW per vendor, representing the vendors invoice with the earliest date.

  • 13. Write a SELECT statement without a FROM clause that uses the CURRENT_DATE function to return...

    13. Write a SELECT statement without a FROM clause that uses the CURRENT_DATE function to return the current date in its default format. Use the DATE_FORMAT function to format the current date in this format: mm-dd-yyyy This displays the month, day, and four-digit year of the current date. Give this column an alias of current_date. To do that, you must enclose the alias in quotes since that name is already used by the CURRENT_DATE function.

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT