How do I count rows with two properties in one index scan in SQL?
SELECT
    ItemCreationDate
  , SUM(CASE WHEN ItemUnitsCount &lt;&gt; 0 THEN 1 ELSE 0 END) AS CountType1
  , SUM(CASE WHEN ItemUnitsCount = 0 THEN 1 ELSE 0 END) AS CountType2
FROM
    dbo.Items
GROUP BY
    ItemCreationDate