Having clause - output mismatches

Hello, Mosh. I have restored the databases after introductory topics. AND still, your and my outputs are not matching with exactly similar queries. I think in the ZIP file that you provided there is no entry for order_id 11 in order table of SQL store but your queries in the videos are showing that. Similarly, there is only one entry in the customer’s table having state Virginia…But you have two…I am really confused…Whether I have the wrong databases or is it correct with errors?

Welcome to the forums ! Mosh does not read these posts, but I have taken a look for you. I also do not have the data that you’re missing.
How far did you come in the course ? I’m at 37% (essential mySQL functions), but haven’t noticed any inconsistencies so far.

Hi Anton2021, I am in summarizing data section. I had a mismatch when I performed the exercise of The Group by clause and then mismatch in having clause video. Could you please confirm me below queries?

  1. Does the orders table in sql_store contain order id 11? ( I don’t have after I restored the databases also mosh had in having clause video)
  2. What is the state of customer_id 1 in customers? ( It’s showing MA in the table but Mosh had VA in his having caluse video).

Hello!

I completed this course a month ago, and I recall 2 cases in which my results and Mosh’s didn’t match. On the first case, I think he changed something and I din’t realize… and the second case is related to your question…

He stated in the video that he made a test before recording… that’s why he got order_id 11, but I got order_id 10 :sunglasses:

So, what I did was to check visually (I counted the rows, or data manually) that my results matched the tables I was querying… I know it’s not the best way to do it, but it was good enough for me to check that my results were correct. Fortunately, the tables are short and I could do that.

So, no problem if your results don’t match Mosh’s. Look for a specific information, write the query and check manually that your results are correct. It may not be the best way, but it’ll be enough as we learn SQL.

2 Likes

I vote this to be best answer, the minor inconsistencies in the database have not stopped me from learning mySQL with the course.

1 Like