Task 3: Leaders In Danger

#3 · 3 of 7Free sample
Question

Task 3: Leaders In Danger

List the city_id, city_name, leader_name and danger_status for cities where the cumulative infections exceed 5% of the population. Danger status should be 'At Risk' if the condition is met.
Tables
4 tables · 16 columns
cities3 cols
  • city_idINTEGER
  • city_nameTEXT
  • populationINTEGER
infection_stats4 cols
  • record_idINTEGER
  • city_idINTEGER
  • dateTEXT
  • new_infectionsINTEGER
leaders4 cols
  • leader_idINTEGER
  • city_idINTEGER
  • leader_nameTEXT
  • statusTEXT
lockdown_stats5 cols
  • record_idINTEGER
  • city_idINTEGER
  • start_dateTEXT
  • end_dateTEXT
  • compliance_rateREAL
Loading the practice editor and dataset…
Your answer(autosaved)
query.sql
Loading editor…
Sign up to unlock

The reference answer is one click away.

Free account unlocks the reference answer, the explanation, and the GPT tutor on every exercise in the library.

  • Reference answer + explanation revealed after each attempt
  • GPT tutor for every problem
  • Progress saved on the platform
  • 1,598 graded exercises
  • Free forever — no credit card
All exercises in Zombie Virus – Part 2: Aftermath Of The Virus Release