I’m currently on the Aggrevate Functions Exercise and my results are not same under my “total_payments” and “what_we_expect” column. I restored the databases as instructed yet not all of my numbers the same. Did Mosh recently upload different sql files? Is any one else experiencing the same thing?
I made the query again, and I got different values than Mosh’s… and yours!! Anyway, if you add total_payments and what_to_expect, you get the total_sales… which in my query and Mosh’s agree… but not yours. double check the what_to_expect column query… something may be wrong in that SUM().
My invoice data is the exact same as yours, and the only thing that was different about my query is “(invoice_total - payment_total) AS what_we_expect” without the SUM function. I get the same results with or without it.
Is there anything else you suggest? If not, I guess I’ll continue this course as is, but it is gonna be a little frustrating getting different results.
Would you mind sharing an screeshot of your code and the result?? just like I did in my screenshots. Maybe an addional pair of eyes can help you find the error.
I only found 2 differences… and those 2 make a big difference in the results.
You wrote: WHERE invoice_date BETWEEN '2019-07-01' AND '2019-12-30'
And it should include June 30th… and December 31st. So change the dates to:
WHERE invoice_date BETWEEN '2019-06-30' AND '2019-12-31'
I’m not sure if this is enough for the results to match, but if they don’t, I suggest you create another server download everything again and redo all the database.
Now, consider changing the dates… according to my last post. And again. Post picture of the query and the results. In this query, I’m including JUne 30 and December 31:
Anyone else getting different results to Mosh for this exercise? I restored the db and everything but I got the below results, similar to others in this thread. Used the same code as Mosh