Question: I need help with this question ... a. In My SQL write a SELECT statement that returns these columns from the Invoices table: - invoice_number

I need help with this question ...

a. In My SQL write a SELECT statement that returns these columns from the Invoices table:

- invoice_number (the invoice_number column)

- invoice_total (the invoice_total column)

- payment_credit_total (sum of the payment_total and credit_total columns)

- balance_due (the invoice_total column minus the payment_total and credit_total columns)

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

c. Sort the result set by balance due in descending sequence

three(3) SQL statements - they build on each other (meaning create and run a, then add b and run, then add c and run)

submit screenshots for each or submit just the SQL for each

I tried running it but I keep getting errors ...

1. Select * from invoices;

2. Select * from invoices where balance_due > 50;

3. Select * from invoices order by balance_due desc;

three(3) SQL statements - they build on each other (meaning create and run a, then add b and run, then add c and run)

for this, the SQL query is:-

select * from invoices where balance_due>50 order by balance_due desc;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!