SELECT ItemScanPoint, SUM(CASE ItemType WHEN 1 THEN 1 ELSE 0 END) , SUM(CASE ItemType WHEN 2 THEN 1 ELSE 0 END) FROM ItemsScan GROUP BY ItemScanPoint
Does this work for you?
select count(ItemScanId), itemscanpoint, itemtypefrom itemsscanwhere itemtype in (1,2)group by itemtype, itemscanpoint
Count is a grouping function in oracle. Try this:
select ItemType, count(ItemType)from ItemsScangroup by ItemType