I want to select from my products table so that I can display the total count of rows for each product status. Here are the columns:
productID - product number (not needed for this)
category - category number
inventory - how many in stock
status - product status: Yes, No or Pre
I want a query that will group by category number and show the sum of Inventory in that group for each of the 3 product status. So, it would show each row:
category#, total inventory with status=Yes, total inventory with status=No, total inventory with status=Pre
I can easily do this with 3 separate queries, but I would like to do it with a single query. Can this be done?