CREATE TABLE has_amenity (dormid NUMBER, amenid NUMBER)
CREATE TABLE dorm (dormid NUMBER, dorm_name CLOB, student_capacity NUMBER, gender CLOB)
CREATE TABLE lives_in (stuid NUMBER, dormid NUMBER, room_number NUMBER)
CREATE TABLE dorm_amenity (amenid NUMBER, amenity_name CLOB)
CREATE TABLE student (stuid NUMBER, lname CLOB, fname CLOB, age NUMBER, sex CLOB, major NUMBER, advisor NUMBER, city_code CLOB)

Find the number of amenities for each of the dorms that can accommodate more than 100 students.
SELECT COUNT(*), T1.dormid FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid WHERE T1.student_capacity > 100 GROUP BY T1.dormid
SELECT COUNT(*), "T1"."dormid" FROM "dorm" "T1" JOIN "has_amenity" "T2" ON "T1"."dormid" = "T2"."dormid" WHERE "T1"."student_capacity" > 100 GROUP BY "T1"."dormid"