Summarizing Leisure Activity Resorts by Country
 

Given a table playground.country_activities with columns: id (unique identifier), country (name of the country), region (region within the country), leisure_activity_type (type of leisure activity), and number_of_places (number of resorts offering the activity). Construct a SQL query to aggregate this information into a new table structure. The resulting table should have columns for each country, with the counts of resorts offering each type of activity: adventure_park, golf, river_cruise, and kart_racing. Sort the result by country name in ascending order.

These are the tables to query for this question:
playground.country_activities
  • id int
  • country string
  • region string
  • leisure_activity_type string
  • number_of_places int
Your answer should include these columns:
  • country varchar
  • adventure_park integer
  • golf integer
  • river_cruise integer
  • kart_racing integer

Querying is only for logged in users!

Write Your Query Here (you can run selections by highlighting!)

Query Results

No queries have been run yet.