SELECT TJobNumber, TClientCode, TToChargePounds, SUM(TToChargePounds) OVER(PARTITION BY TClientCode) TotalToChargePounds, CAST(TToChargePounds*100/SUM(TToChargePounds) OVER(PARTITION BY TClientCode) ASDECIMAL(5,2)) Percentage, AVG(TToChargePounds) OVER(PARTITION BY TClientCode) AvgToChargePounds, MAX(TToChargePounds) OVER(PARTITION BY TClientCode) MaxToChargePounds, MIN(TToChargePounds) OVER(PARTITION BY TClientCode) MinToChargePounds, COUNT(TToChargePounds) OVER(PARTITION BY TClientCode) CountToChargePounds FROM TaskTransactions WHERE TClientCode IN ('LM1862','L038')