SQL Trends in Startup Question 9

Hello all!

Hope you are well. I had a simple question.

for the first line of code, why do we also have to select category?

thanks in advance for the help.

Additionally, I am having a bit of trouble differentiating between the clause of WHERE and HAVING. May someone also explain this to me?

I believe the question wants to know the average value of each startup in each company category. Right?

Sometimes questions can be confusing (I totally get that!). But, if you break it down or draw out what the question is asking, maybe that would help(?) (The question pretty much highlights/states what columns to use in the SELECT statement)


WHERE filters rows and HAVING filters groups.

This is another explanation if what is in the lesson isn’t clear.


You have to select category because you want the categories to be displayed in the table that this query returns, alongside the rounded, averaged valuations. This way, you’ll be able to see the average valuations beside the categories with which they’re associated.

Which is what I said above… :upside_down_face: