Sql Server Need Help Creating This Aggregate Sql Query

Sql Server Need Help Creating This Aggregate Sql Query