Dear All, I am running a query that gives me a result which is not grouped the way I want. Here is the query: SELECT SUM(c.[Duration]) as [Duration],CAST(CAST(SUM(c.[Duration]) As float)/60 as decimal(18,2)) As [Minutes], c.ocn FROM [CDR_Billing_Sonus_' + CONVERT(varchar(10), @date, 120) + '].[dbo].[cdr_main] as c WHERE c.[ocn]IN (''G021'',''IUTC'',''129F'') AND c.[calltype]=''O''GROUP BY c.ocn The result is not getting grouped by ocn?