Using DISTINCT and COUNT in a query
count (distinct item_id)



SELECT
  FORMAT_TIMESTAMP('%Y-%m', Sell_Date) AS Sell_Date,
  count(*) Total_Sold,
  count (distinct item_id) as distinct_item_id 

FROM
  `project.dataset.items`
GROUP BY
  FORMAT_TIMESTAMP('%Y-%m', Sell_Date) AS Sell_Date
ORDER BY
  Sell_Date