I would like to return the total number of rooms in a hotel, and also provide the total number of rooms in that hotel that have more than 2 bedrooms. My code returns the total number of rooms in each hotel that have more than 2 bedrooms, but it does not return the total number of rooms in the hotel. Instead, it only returns the total number of rooms that have more than 2 bedrooms.
Is there a simple way to modify my code to resolve this issue?
I have the following code:
SELECT
hotel.hotel_id,
hotel.hotel_name,
COUNT(room.room_no) || ' total rooms ' || COUNT(room.room_no)
|| ' have more than 2 bedrooms ' AS ACCOMODATION_AVAILABLE
FROM
hotel
INNER JOIN
room
ON
hotel.hotel_id = room.hotel_id
WHERE
room_bedrooms > 2
GROUP BY
hotel.hotel_id, hotel.hotel_name;