okay, you already have two WHERE clauses in there, one for each of the subqueries in your UNION
however, the specific request that you mentioned -- "just the apple row" -- takes a bit of finagling, if you're trying to put your query together in a scripting language
what you have to do is add this --to the second subquery's WHERE clause, and, as well, discard the entire first subquery of the UNION, because its job is to return the categories only, and 'Apple' is not a category, it's a subcategoryCode:AND subcat.category_name = 'Apple'









Bookmarks