Write SQL and Python, run instantly in your browser, and track your progress.
You are a Regional Marketing Analyst at Amazon. The North American marketing team is planning a combined promotional campaign targeting customers in both the United States and Canada. They need a unified list of customers from these two countries to estimate campaign reach and plan regional customizations.
Your task is to create a single list that combines all customers from the US with all customers from Canada, removing any potential duplicates.
| Column Name | Type |
|---|---|
| customer_id | INTEGER |
| full_name | TEXT |
| TEXT |
You are a Regional Marketing Analyst at Amazon. The North American marketing team is planning a combined promotional campaign targeting customers in both the United States and Canada. They need a unified list of customers from these two countries to estimate campaign reach and plan regional customizations.
Your task is to create a single list that combines all customers from the US with all customers from Canada, removing any potential duplicates.
| Column Name | Type |
|---|---|
| customer_id | INTEGER |
| full_name | TEXT |
| TEXT |
| phone | TEXT |
| phone | TEXT |
| city | TEXT |
| city | TEXT |
| state | TEXT |
| state | TEXT |
| country | TEXT |
| country | TEXT |
| created_at | TEXT |
| created_at | TEXT |
| customer_id | full_name | phone | city | state | country | created_at | |
|---|---|---|---|---|---|---|---|
| 1 | Sophia Lewis | sophia.lewis@gmail.com | San Diego | CA | US | 2024-10-10 19:19:27 |
| customer_id | full_name | phone | city | state | country | created_at | |
|---|---|---|---|---|---|---|---|
| 1 | Sophia Lewis | sophia.lewis@gmail.com | San Diego | CA | US | 2024-10-10 19:19:27 |
| customer_id | full_name | country |
|---|---|---|
| 1 | Sophia Lewis | US |
| 2 | Marilyn Kelly | US |
| 3 | Andrea Miller | CA |
| 4 | Luis Green | US |
| 5 | Anthony Alvarez | US |
| customer_id | full_name | country |
|---|---|---|
| 1 | Sophia Lewis | US |
| 2 | Marilyn Kelly | US |
| 3 | Andrea Miller | CA |
| 4 | Luis Green | US |
| 5 | Anthony Alvarez | US |
Showing first 5 of 40 rows. US and CA customers combined.
Showing first 5 of 40 rows. US and CA customers combined.
1. Output Columns:
2. Set Operation:
3. Ordering:
1. Output Columns:
2. Set Operation:
3. Ordering:
| 2 | Marilyn Kelly | marilynkelly@yahoo.com | New York | NY | US | 2024-11-30 08:33:24 |
| 2 | Marilyn Kelly | marilynkelly@yahoo.com | New York | NY | US | 2024-11-30 08:33:24 |
| 3 | Andrea Miller | andrea_miller@zoho.com | +1-803-484-1106 | Winnipeg | MB | CA | 2025-06-22 16:35:50 |
| 3 | Andrea Miller | andrea_miller@zoho.com | +1-803-484-1106 | Winnipeg | MB | CA | 2025-06-22 16:35:50 |
| 4 | Luis Green | lgreen@aol.com | +1-544-304-2519 | San Antonio | TX | US | 2025-01-26 13:10:44 |
| 4 | Luis Green | lgreen@aol.com | +1-544-304-2519 | San Antonio | TX | US | 2025-01-26 13:10:44 |
| 5 | Anthony Alvarez | anthonya@protonmail.com | +1-749-327-7201 | Los Angeles | CA | US | 2024-10-01 14:28:15 |
| 5 | Anthony Alvarez | anthonya@protonmail.com | +1-749-327-7201 | Los Angeles | CA | US | 2024-10-01 14:28:15 |