Display Cabin Types and its Charges in SQL

Question:

Display Cabin Types and its Charges

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.

Display Cabin Types and its Charges

Code:

Main.sql

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

Recommended:

Leave a Comment

Your email address will not be published. Required fields are marked *