Suppose you have two dataframe df1 and df2 (df1: id, name; df2: id, country, address, city, count). Join them, filter where the country is Singapore, pivot the output, and show the Singapore city with the highest count of people on top.
Asked in the Round 2 stage.
| Column | Type | Description |
|---|---|---|
| idPK | INT | Unique identifier for the person record |
| name | VARCHAR(100) | Person name |
| Column | Type | Description |
|---|---|---|
| id | INT | Identifier linking to df1.id |
| country | VARCHAR(100) | Country name |
| address | VARCHAR(255) | Street address |
| city | VARCHAR(100) | City name |
| count | INT | Number of people associated with the row |