select dateadd(mi,(datediff(mi,convert(varchar(10),dateadd(ss,-1,CreateOn),120),dateadd(ss,-1,CreateOn))/5)*5,convert(varchar(10),CreateOn,120)) as CreateOnss, count(*) as cnt, MAX(CreateOn),sum(OrderAmt) as OrderAmtdd from SaleOrder where OrderStatu