Mysql – Exclude rows where column matches another column without subquery
I have a result set of parent categories and subcategories. I want to exclude all parent categories if a subcategory exists in the results. What I would do is using a NOT IN in the query, but that requires a…