So here's the code that I'm trying to run
WHEN tim.pick_area = 'CASEMOD' THEN COUNT(DISTINCT ttl.hu_id)
END) AS [CMod_Location],
WHEN tim.pick_area = 'PLTMOD' THEN COUNT(DISTINCT ttl.hu_id_2)
END) AS [PMod_location]
FROM t_tran_log ttl WITH(NOLOCK)
LEFT OUTER JOIN t_item_master tim WITH(NOLOCK) ON ttl.item_number = tim.item_number
WHERE ttl.tran_type = '306' AND tim.pick_area IN ('CASEMOD','PLTMOD')
GROUP BY ttl.end_tran_date, tim.pick_area
ORDER BY ttl.end_tran_date
The problem is that I can't group by just ttl.end_tran_date, it gives me an error when I do because tim.pick_area isn't group by'd anything.
My results from this query look like this
But I want to basically combine it all into the same day with two different columns one for CMod and one for PMod.