Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
set define off
select * from sales;
PRODUCT TYPE SOLD
------------ --------------- ----------
beer hotel 20
beer hotel 30
beer inn 20
beer inn 40
coke b&b 20
coke hotel 40
coke hotel 10
7 rows selected.
select product, nvl(sum(hotel),0) hotel, nvl(sum(inn),0) inn, nvl(sum("B&B"),0) "B&B"
from (select product, sold hotel, null inn, null "B&B" from sales where type = 'hotel'
union
select product, null, sold,null from sales where type = 'inn'
union
select product, null, null, sold from sales where type = 'b&b')
group by product
/
PRODUCT HOTEL INN B&B
------------ ---------- ---------- ----------
beer 50 60 0
coke 50 0 20