I’m here working on the CIA Facebook SQL project, and one of the first prompts is to look at minimum/maximum populations:
Ordering by population, I noticed there were a lot of null values that come before an integer value of 0. However, when I query specifically for the minimum value for population, it gives me 0. I’m fine up until this point. My confusion starts here:
When I subquery the data to give me rows that do not contain the max or min population, it removes null values as well. So essentially I am looking for clarification as to what queries will treat null values as values to consider, and what queries will ignore them. And also, why?