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

How many times the number of adults and kids staying in a room reached the maximum capacity of the room?
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"