SELECT
supplierid,
SUM(if(paid=1,total,0))+SUM(if(paid=1,tax,0))+SUM(if(paid=1,shipping,0)) AS Paid,
SUM(if(paid=0,total,0))+SUM(if(paid=0,tax,0))+SUM(if(paid=0,shipping,0)) AS Unpaid
FROM poreceived
GROUP BY supplierid