SELECT Project.PrjStartDay ,Project.PrjEndDay ,SUM(Updateuid) OVER (PARTITIONBY PrjStatus) AS'Total' ,AVG(Updateuid) OVER (PARTITIONBY PrjStatus) AS'Avg' ,COUNT(Updateuid) OVER (PARTITIONBY PrjStatus) AS'Count' ,MIN(Updateuid) OVER (PARTITIONBY PrjStatus) AS'Min' FROM dbo.Project WHERE Project.PrjStatus = 1