Resort with Least Capacity in SQL

Question:

Resort with Least Capacity

Write to query to display the name and town name of the resort that has least bed room count. Sort the output on the resort name.

Resort with Least Capacity

Code:

Main.sql

select rs.resortname, rs.townname
from resort rs left join cabin c
    on rs.resortid = c.resortid
    where c.bedroomcount = (select min(bedroomcount) from cabin)
    order by 1;

Recommended:

Leave a Comment

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

x