Session Ready
Exercise

IN and EXISTS

You want to know which, if any, country capitals are listed as the nearest city to recorded earthquakes. You can get this information using INTERSECT and comparing the Nations table with the Earthquakes table. However, INTERSECT requires that the number and order of columns in the SELECT statements must be the same between queries and you would like to include additional columns from the outer query in the results.

You attempt two queries, each with a different operator that gives you the results you require.

Instructions 1/2
undefined XP
  • 1
  • 2
  • Add the 2017 country population and capital city name columns to the outer query.
  • Add the operator to compare the outer query with the sub-query.