Can you list the number of amenity ids associated with each distinct dorm id and display both of those results (dorm id and number of amenity ids)?
select t3.dormid, count ( t4.amenid ) from dorm as t3 join has_amenity as t4 on t3.dormid = t4.dormid join dorm_amenity as t5 on t4.amenid = t5.amenid group by t3.dormid
Wonderful, can you remove that information and instead display every student id that has a dorm id of 160?
select t1.stuid from student as t1 join lives_in as t2 on t1.stuid = t2.stuid where t2.dormid = 160
Can you show only the first names?
select t1.fname from student as t1 join lives_in as t2 on t1.stuid = t2.stuid where t2.dormid = 160