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
For each room, count how many times it was booked.
assistant
SELECT COUNT( * ) FROM Reservations GROUP BY Room;
human
Which rooms have been booked more than 60 times?
assistant
SELECT * FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room HAVING COUNT( * ) > 60 ;