Write SQL and Python, run instantly in your browser, and track your progress.
You are a Customer Data Analyst at Amazon. The Customer Outreach team is launching an SMS campaign for US customers. To comply with regulations, they can only contact customers who have provided phone numbers. You need to find all US customers who have a phone number on file (not NULL/missing).
This requires handling NULL values properly - a common challenge in real-world data analysis.
| Column Name | Type |
|---|---|
| customer_id | int64 |
| full_name | object |
| object |
You are a Customer Data Analyst at Amazon. The Customer Outreach team is launching an SMS campaign for US customers. To comply with regulations, they can only contact customers who have provided phone numbers. You need to find all US customers who have a phone number on file (not NULL/missing).
This requires handling NULL values properly - a common challenge in real-world data analysis.
| Column Name | Type |
|---|---|
| customer_id | int64 |
| full_name | object |
| object |
| phone | object |
| phone | object |
| city | object |
| city | object |
| state | object |
| state | object |
| country | object |
| country | object |
| created_at | object |
| created_at | object |
| 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 | phone | city | state |
|---|---|---|---|---|
| 10 | Ahmed Rodriguez | +1-780-935-6155 | San Antonio | TX |
| 12 | Ann O'Connor | +1-570-424-3266 | Raleigh | NC |
| 5 | Anthony Alvarez | +1-749-327-7201 | Los Angeles | CA |
| customer_id | full_name | phone | city | state |
|---|---|---|---|---|
| 10 | Ahmed Rodriguez | +1-780-935-6155 | San Antonio | TX |
| 12 | Ann O'Connor | +1-570-424-3266 | Raleigh | NC |
| 5 | Anthony Alvarez | +1-749-327-7201 | Los Angeles | CA |
Showing first 5 of 18 rows.
Showing first 5 of 18 rows.
1. Data Selection:
2. Filtering:
3. Output:
1. Data Selection:
2. Filtering:
3. Output:
| 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 |
| 17 | Brandon Zhou | +1-997-743-1009 | Atlanta | GA |
| 17 | Brandon Zhou | +1-997-743-1009 | Atlanta | GA |
| 50 | Brandon Zhou | +1-767-330-4143 | Fort Worth | TX |
| 50 | Brandon Zhou | +1-767-330-4143 | Fort Worth | TX |