So I have a query that is checking for the count of the items of a certain type with in a certain area of the warehouse. What I now have to check is where we are selling the items -- one of the warehouse managers want to see if there is discontinued stock still out there.
So the two tables that have data on selling the item are cET and cETd, the cET table tells me where the item is selling (field name = SELLING) and the cETd table tells me whether the item is out on the floor (field name = AVAIL). What I was going to use to join the tables is the sku number (field name = SKU) is in the myplay table and that links to the cET field by the same name and that gets you the field name SELLING. The cET is linked to cETd by the fielld name cET_id and that gets you the field name AVAIL.
What I am having problems with is doing the join to check for both conditions. Can someone help?
select tc, jhgh06, COUNT(*) AS OccNum
group by tc, jhgh06
Order by tc, jhgh06