Computer Science, asked by clnixon38, 1 month ago

Write a SELECT statement that returns these columns from the Invoices

table:
invoice_number invoice_total payment_credit_total

The invoice_number column The invoice_total column

Sum of the payment_total and credit total columns

The invoice_total column minus the payment_total and credit_total columns

balance due
Return only invoices that have a balance due that's greater than $50.

Sort the result set by balance due in descending sequence.

Use the LIMIT clause so the result set contains only the rows with the 5 largest balances.

Answers

Answered by KesavanCSE
1

Answer:

SELECT payment_total as pay, payment_credit_total as credit,(pay + credit) as tot,invoice_total as invoice,(tot -invoice) as res WHERE res >50 ORDER BY res DESC;

Similar questions