Customers outside the US and Mexico

filtering

Customers outside the US and Mexico

Walmart SQL Interview Question

Walmart already runs large businesses in the United States and Mexico. Its international team is planning an online campaign for customers who live anywhere else.

List the name and country of every customer who lives outside the United States and Mexico.

Asked of

  • Data Analyst
  • Business Analyst
  • BI Analyst
  • Product Analyst
  • Analytics Engineer
  • Data Engineer
  • Data Scientist
  • ML Engineer
  • AI Engineer

customersTable10 rows

Column NameType
customer_idBIGINT
nameVARCHAR
countryVARCHAR
segmentVARCHAR
signup_dateDATE

customersExample Input

customer_idnamecountrysegmentsignup_date
1Priya SharmaIndiaconsumer2023-01-14
2Marcus WebbUnited Statesenterprise2023-02-03
3Ana SousaBrazilconsumer2023-02-27
4Liam O'ConnorIrelandsmall_business2023-03-15
5Yuki TanakaJapanenterprise2023-04-02
6Fatima Al-RashidUnited Arab Emiratesconsumer2023-05-21
7Daniel OkaforNigeriasmall_business2023-06-08

Example Output

namecountry
Ana SousaBrazil
Daniel OkaforNigeria
Fatima Al-RashidUnited Arab Emirates
Liam O'ConnorIreland
Priya SharmaIndia
Yuki TanakaJapan

Explanation

Marcus Webb lives in the United States, so Marcus Webb is left out. The other six customers in the example live in other countries, so they all appear.

The example above is a small slice of the data. Your query runs against the full tables.