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

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" AS "T1" JOIN "rooms" AS "T2" ON "T1"."room" = "T2"."roomid" AND "T2"."maxoccupancy" = "T1"."adults" + "T1"."kids"