55.9k views
4 votes
Fill in the blanks in the SQL statement below that will list the invoice number, invoice total and credit which is the total sum of the payment_total and credit_total. Format the payment credit to 2 decimal places. SELECT invoice_number, invoice_total________ AS credit FROM invoices.

1 Answer

3 votes

Answer:

Following are the query and its explanation:

Step-by-step explanation:

SELECT invoice_number , invoice_total , FORMAT ((payment_total +credit_total),2) AS Credit FROM invoices;

In the above given select command it selects two columns that are "invoice_number , invoice_total" in which it uses the format method that adds "payment_total and credit_total" parameter value and divides the value, and holds its decimal point value use by the invoices table.

User Free Willaert
by
4.8k points