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
What is the total number of people who could stay in the modern rooms in this inn?
assistant
SELECT sum(maxOccupancy) FROM Rooms WHERE decor = 'modern';
human
How many rooms are there?
assistant
SELECT count(*) FROM Rooms;
human
How many adults stay in the room CONRAD SELBIG checked in on Oct 23, 2010?
assistant
SELECT Adults FROM Reservations WHERE CheckIn = '2010-10-23' AND FirstName = 'CONRAD' AND LastName = 'SELBIG';
human
How many kids stay in the room DAMIEN TRACHSEL checked in on Sep 21, 2010?
assistant
SELECT Kids FROM Reservations WHERE CheckIn = '2010-09-21' AND FirstName = 'DAMIEN' AND LastName = 'TRACHSEL';
human
How many times does ROY SWEAZY has reserved a room.
assistant
SELECT count(*) FROM Reservations WHERE FirstName = 'ROY' AND LastName = 'SWEAZY';
human
How many kids stay in the rooms reserved by ROY SWEAZY?
assistant
SELECT kids FROM Reservations WHERE FirstName = "ROY" AND LastName = "SWEAZY" ;