You want to query an API endpoint to receive data about currently available apartment listings from a rental website; num_bedrooms is 1 for a 1-bedroom and 0 for a studio, so how would you query and transform this field for downstream use?
Use the provided listing and rental source tables. Treat unexpected or missing bedroom counts as Unknown.
listing_id, source_name, and transformed bedroom_typelisting_id ascending| Column | Type | Description |
|---|---|---|
| listing_idPK | INT | Unique apartment listing identifier |
| source_id | INT | Identifier of the rental listing source |
| title | VARCHAR(200) | Listing title from the API response |
| num_bedrooms | INT | Numeric bedroom count, where zero represents a studio |
| availability_status | VARCHAR(30) | Current availability status |
| Column | Type | Description |
|---|---|---|
| source_idPK | INT | Unique rental website identifier |
| source_name | VARCHAR(100) | Readable rental website name |