[SQL문제풀기] Number Of Units Per Nationality

silver's avatar
Jan 22, 2026
[SQL문제풀기] Number Of Units Per Nationality

문제

내가 작성한 정답

MySQL, PostgreSQL, Oracle

select h.nationality, count(distinct unit_id) apartment_count from airbnb_hosts h join airbnb_units u on h.host_id = u.host_id where h.age < 30 and u.unit_type = 'Apartment' group by h.nationality order by 2 desc;
Share article

silver