Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you GROUP BY some column, do you want the rows where the column is NULL to get grouped together? They're probably all distinct things.

For example, if your items represent tags, and you're grouping by parent_id to find subtags, the ones without parents (parent_id IS NULL) aren't all subtags of some root of a tag tree; they're all distinct root tags in a tag forest.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: