Practice Interview Questions
| Question | Status |
|---|---|
Write a query to find the number of apartments per nationality that are owned by people under 30 years old. Output the nationality along with the number of apartments.
airbnb_hosts table:
| Column Name | Description |
|---|---|
| host_id | Identifier for each host |
| age | Age of the host |
| gender | Gender of the host |
| nationality | Nationality of the host |
airbnb_units table:
| Column Name |
|---|
Write a query to find the number of apartments per nationality that are owned by people under 30 years old. Output the nationality along with the number of apartments.
airbnb_hosts table:
| Column Name | Description |
|---|---|
| host_id | Identifier for each host |
| age | Age of the host |
| gender | Gender of the host |
| nationality | Nationality of the host |
airbnb_units table:
| Column Name |
|---|
| host_id | Identifier for the host |
| unit_id | Identifier for each unit |
| nationality | apartments_count |
|---|---|
| American | 3 |
| French | 2 |
| host_id | Identifier for the host |
| unit_id | Identifier for each unit |
| nationality | apartments_count |
|---|---|
| American | 3 |
| French | 2 |