Your question is SQL Join With User Info. Start with the requirements and the two tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Write a SQL query joining the donation dataset with a user info dataset containing user_id and count launch/country details.
Asked in the Phone Screen stage. Table 1 donation data combined with user info dataset.
user_id.user_id with donation totals, launch count, and country count.total_donations descending, then user_id ascending.| Column | Type | Description |
|---|---|---|
| donation_idPK | INT | Unique donation record identifier |
| user_id | INT | User who made the donation |
| donation_amount | NUMERIC(12,2) | Donation amount in dollars |
| donation_date | DATE | Date the donation was created |
| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique Meta user identifier |
| launch_country | VARCHAR(2) | Country code associated with the user's launch |
| launch_count | INT | Number of launches attributed to the user |
| country_count | INT | Number of distinct countries associated with the user |