I have run the below query for my data:-
SELECT CONTRACTNAME,
AccountNo,
TransDate,
JournalNo,
AuditTrail,
Description,
CONTRACTNUMBER,
GROUPING(CONTRACTNUMBER) as CONTRACTNUMBER,
SUM(PAFeebillamount)as Total
FROM SRVS.dbo.BTQGLDistributionsWithProjectCodesHM
WHERE TransDate > '2012' AND CONTRACTNUMBER <> '00900'
GROUP BY CONTRACTNAME,
AccountNo,
TransDate,
JournalNo,
AuditTrail,
Description,
CONTRACTNUMBER with rollup
ORDER BY GROUPING (CONTRACTNUMBER)
this gives me the results:-

how can I change this so I get a single line Total for each contract number. So it looks like the below example:-

at this moment in time I am not bothered about the accnt no / journal no etc as it is only going to be a summary.
Just looking for advice on best way to sum up my groups by contract number?
1 Answer