Question: What's wrong with my SQL code? _________________ select invoice_number, invoice_total, (payment_total + credit_total) as 'payment_credit_total', (invoice_total - payment_total - credit_total) as 'balance_due' having (balance_due >

What's wrong with my SQL code?

_________________

select invoice_number, invoice_total, (payment_total + credit_total) as 'payment_credit_total', (invoice_total - payment_total - credit_total) as 'balance_due'

having (balance_due > 50) order by balance_due desc limit 5;

_____________________________

I'm getting a syntax error and I'm not sure what I'm doing wrong.

Thanks.

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!