select companyname,sum(sale) as TotalSale,sum(purchase) as TotalPurchase from invoice group by companyname Having companyname IN (select companyname from invoice)
It returns sum only for those column whose all sum are not blank, how can i show blank sum values
I mean there are 7 companies but only 4 records are shown. I want to display all seven.