Grouping by PO_NUMBER is causing your problem. You want something more like the code below. You can change the order and format to suit your needs.select year(date_created) as Year, datename(mm,date_created) as month, count(po_number) as total_pofrom po_filegroup by year(date_created), month(date_created), datename(mm,date_created)order by by year(date_created), month(date_created), datename(mm,date_created)
CODO ERGO SUM