I have a table "records"
where dateoftrans = '2016-11-22'
group by typeofservice with rollup;
If only for second image's result, you can try
sum(expensecost) like this:
SELECT typeofservice, Coalesce(SUM(incomecost), 0) AS incomecost, Coalesce(SUM(expensecost), 0) AS expensecost FROM records GROUP BY typeofservice WITH ROLLUP