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

I’m having the same problem (number 2) when calling customers located in VA, while Mosh’s output has 2 costumers, mine has only 1 and I simply can not go on, mind everyone that this was the answer of an exercise that we should have finished under 15 mins :slight_smile: been half an hour I’m on it lol

you can find this at 27% complete, Mysql Mastery, 3- The HAVING Clause, 4:14

here is the link:

I too can confirm the data Mosh is getting is not matching what I get. In his result set he has order_id: 11 and 13 from Babara MacCaffery but on my orders table there is no order_id: 11 and 13. I too only get Ines Brushfield for customers in ‘VA’.

@codewithmosh can you please change the create-databases.sql file so the data is consistent with Mosh, it is hard to follow along and do the exercises when we are getting different results

Hello coders, school mates #codewithmosh.
I think this debate of insignificant difference in results is trivial ;
Most especially when you have more records or less to those you see in the video.
The concept is about understanding not copy pasting, that way you be training your brains to be more creative in terms of relating,
As long as you didn’t receive an error