Task: Text to Code
Input (English): Step 1: For each row in Has_amenity table, find corresponding rows in Dorm table and in Dorm_amenity table.
Step 2: find student_capacity, gender of the results of step 1 whose amenity_name contains Donor
Output (English): SELECT T1.student_capacity , T1.gender FROM Dorm AS T1 JOIN Dorm_amenity AS T2 JOIN Has_amenity AS T3 ON T1.dormid = T3.dormid AND T3.amenid = T2.amenid WHERE T2.amenity_name LIKE "Donor"