Never forget the power of the conditional SUM() ... :select p.pid, p.propertyname as property, sum(case when type='I' then Amount else 0 end) as income, sum(case when type='E' and categoryID=2 then Amount else 0 end) as Mortgage, sum(case when type='E' and categoryID<>2 then amount else 0 End) as Expense, sum(Amount) as Totalfrom property pinner join ledgeron p.pID = ledger.propertyIDwhere ledger.Type in ('I','E')group by p.pid, p.propertyname- Jeff