I have looked at this code for an hour and can not figure out what is wrong. I am following along with the course, and as far as I can see, my code is the same as Mosh’s, yet my code has errors.
Also, the SUM command is not blue in my code, but it is in Mosh’s. Does anyone know why?
There are a couple of missing commas
WHERE client_id = c.client_id) AS total_sales,
(SELECT AVG(invoice_total) FROM invoices) AS average,
I looked so hard I was blind to it! Thank you so much for helping me!!
could u please let me know what do u want from this code ,so that i can better help u
It’s code from the SQL course. I was just following along with Mosh, his code worked but mine didn’t and I could not see the difference between the two. It’s amazing how a comma can cause so much confusion.
Hello Gary, put a comma after after ''AS total sales" and after ''AS AVERAGE"