Visitor Info
You're an analyst working for a US airline called "You Knighted Airlines".
Unfortunately, there's a new global pandemic of a virus called "COVID 9001,"
and the USA is changing its immigration policy constantly during these uncertain times.
To help your international customers, you want to send SMS (text) updates to any non-US-citizens about US policy changes.
Your customers are in the passengers
table.
column_name | type |
---|---|
id | INTEGER |
name | VARCHAR |
email | VARCHAR |
phone_no | VARCHAR |
mileage_number | VARCHAR |
registered_at | TIMESTAMPTZ |
Most of them have uploaded their passports to our web portal.
Those are in the passports
table.
column_name | type | reference |
---|---|---|
id | INTEGER | NULL |
user_id | INTEGER | passengers.id |
name | VARCHAR | NULL |
number | VARCHAR | NULL |
country | VARCHAR | NULL |
date_of_birth | DATE | NULL |
expires_at | DATE | NULL |
We'll use these tables to identify the eligible users for our new notification service.
For this challenge, select the name
, email
, and phone_no
of all passengers who meet the following criteria:
- Users who have a non-US passport.
- Users who have a non-
NULL
phone number.