Can someone please advise on the following,
I would like to present two sets of data in separate columns - The total amount for each company.
Currently, the results are displayed in the same column and I cannot find a way to split them, does anyone have any recommendations on this?
I would like the data to be presented as
Select Sum(Amount)
from ServerRoomStock
where CompanyName = 'B'
union all
Select Sum(Amount)
from ServerRoomStock
where CompanyName = 'A'
SELECT B.sum_company_b,A.sum_company_a
FROM
(
Select Sum(Amount) sum_company_b
from ServerRoomStock
where CompanyName = 'B'
)B
cross join
(
Select Sum(Amount) sum_company_a
from ServerRoomStock
where CompanyName = 'A'
)A