human
Schema:
Rooms (RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor)
Reservations (Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids)
Please answer with SQL.
assistant
Sure, I understand.
human
Which rooms have king beds?
assistant
SELECT * FROM Rooms WHERE bedType = 'King';
human
Group all the rooms with king beds according to the decor type.
assistant
SELECT * FROM Rooms WHERE bedType = 'King' GROUP BY decor ;
human
Count the number of rooms for each decor type.
assistant
SELECT decor , COUNT( * ) FROM Rooms WHERE bedType = "King" GROUP BY decor ;