WHERE/Filter Question

I had a question in the “Group Summary Stats” Mission on Page 3.
URL: Learn data science with Python and R projects

It says, " Anything you can use in WHERE for filtering, you can also use in place of the conditions above."

I’m confused by this. Could you give me an example of what this is saying?

1 Like

The WHERE clause can be used in different ways,

  • WHERE A > 10
  • WHERE A > 10 OR B < 9

and so on. All those conditions for filtering, like A > 10, A > 10 OR B < 9 etc. can be used with WHEN as well, as part of CASE.

So, we could have

  • WHEN A > 10 THEN <value_1>
  • WHEN (A > 10 or B < 9) THEN <value_2>

and so on.

That’s what they mean. Hopefully this clears this up.


Hi @the_doctor,

Thank you for your reply. I completely understand it now. I just had one other question I was hoping you could answer that’s SQL related?

Below I have some of the vocab with the definitions I’ve been using. Are these correct? If not, could you give me your definition of these? I’m trying to make sense of all these new terms!

statement: the full query
clause: a line of code that allows you to filter/customize how you want data to be queried.
keyword: reserved words that do something (i.e., SELECT)
operators: symbols or words that carry out arithmetic or logical computation.