CREATE TABLE rooms (roomid CLOB, roomname CLOB, beds NUMBER, bedtype CLOB, maxoccupancy NUMBER, baseprice NUMBER, decor CLOB)
CREATE TABLE reservations (code NUMBER, room CLOB, checkin CLOB, checkout CLOB, rate NUMBER, lastname CLOB, firstname CLOB, adults NUMBER, kids NUMBER)

List how many times the number of people in the room reached the maximum occupancy of the room. The number of people include adults and kids.
SELECT COUNT(*) FROM reservations AS T1 JOIN rooms AS T2 ON T1.room = T2.roomid WHERE T2.maxoccupancy = T1.adults + T1.kids
SELECT COUNT(*) FROM "reservations" "T1" JOIN "rooms" "T2" ON "T1"."room" = "T2"."roomid" AND "T2"."maxoccupancy" = "T1"."adults" + "T1"."kids"