← ALL CHALLENGES
CHALLENGE / INTERMEDIATE / READY TO QUERY

Do richer countries receive more tourists?

Compare international arrivals with GDP per capita using a country-year JOIN.

01 / THE QUESTION

Question

Do countries with higher GDP per capita always receive more international tourist arrivals? Look for exceptions in the same year.

02 / SOURCE TABLES

Tables to use

03 / RELATIONSHIP

ER diagram

ONE TO ONE RELATIONSHIP
worldbank_international_tourist_arrivalscountry_iso_alpha3Key fieldyearKey fieldinternational_tourist_arrivals
worldbank_gdp_per_capitacountry_iso_alpha3Join fieldyearJoin fieldgdp_per_capita_current_usd

worldbank_international_tourist_arrivals.country_iso_alpha3 = worldbank_gdp_per_capita.country_iso_alpha3 + year · one tourism observation to one GDP-per-capita observation for each country and year

04 / ANALYST GUIDE

Guide

Analysis requirements

  • Join on country_iso_alpha3 and year, then compare non-null observations in 2019.
  • Keep both the arrivals and GDP-per-capita columns visible; inspect high and low ends and outliers.
  • Arrival counts are affected by population, location and counting methods. This comparison does not establish a causal effect.

Suggested query

Expand suggested query
SQL / STARTER QUERY
SELECT t.country_iso_alpha3, t.country_name, t.year,
       t.international_tourist_arrivals, g.gdp_per_capita_current_usd
FROM worldbank_international_tourist_arrivals AS t
JOIN worldbank_gdp_per_capita AS g
  ON t.country_iso_alpha3 = g.country_iso_alpha3
 AND t.year = g.year
WHERE t.year = 2019
  AND t.international_tourist_arrivals IS NOT NULL
  AND g.gdp_per_capita_current_usd IS NOT NULL
ORDER BY g.gdp_per_capita_current_usd DESC;