Forum

Write a query to di...
 
Share:
Notifications
Clear all

Write a query to display the Cabin ID, Cabin Type, Cabin Description and The Number or Bedroom


Posts: 17
Topic starter
(@rahul)
Active Member
Joined: 4 years ago

Write a query to display the cabin id, cabin type, cabin description, number or bedroom, sleep capacity, and its cost. O/p should be sorted on cabin id.

 
1 Reply
Posts: 16
Admin
(@sql-admin)
Eminent Member
Joined: 4 years ago

Hi Rahul,

Please try this one.

Query: 

Write a query to display the cabin id , cabin type, cabin description , number of bedroom, sleep capacity , and its cost. Output should be sorted on cabin id.

select cbn.cabinid, cbn.cabintype, cbn.describe, cbn.bedroomcount,
cbn.sleepcapacity, (select rate from cabincost where
cabinid=cbn.cabinid) as rate
from cabin cbn
order by 1;
Reply

Self Learning Video Tutorials - Software Course

Leave a reply

Author Name

Author Email

Title *

 
Preview 0 Revisions Saved
Share: