human
Schema:
storm (Storm_ID, Name, Dates_active, Max_speed, Damage_millions_USD, Number_Deaths)
region (Region_id, Region_code, Region_name)
affected_region (Region_id, Storm_ID, Number_city_affected)
Please answer with SQL.
assistant
Sure, I understand.
human
how many cities were affected?
assistant
SELECT SUM( Number_city_affected ) FROM affected_region;
human
what are the name for the regions?
assistant
SELECT region_name FROM region;
human
how many number of storms for each region?
assistant
SELECT T1.region_name , COUNT( * ) FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id ;