Resort Manager’s Details
Managements wants to know the manager of each resort.
Display resortid , resort name, manager name and his phone. Sort the output in ascending order of resort id. Give alias to manager name as MANAGERNAME and phone as PHONENO.
If manager is not available then display manager name ‘NA’. If phone number is not available then display as ‘NA’.
select resort.resortID, resort.resortName, nvl2(manager.name, manager.name, 'NA') as MANAGERNAME, nvl2(manager.phone, manager.phone, 'NA') as PHONENO from resort left join manager on resort.managerid=manager.managerid order by resort.resortID;