Task 2: Spot Cities With Rising Infection Trends

#2 · 2 of 7Free sample
Question

Task 2: Spot Cities With Rising Infection Trends

Identify cities where the number of infections increased consecutively for at least 3 days. Include city_id, city_name, and the starting date of the trend.
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