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
What was the name of the storm that affected Afghanistan and Albania between May 19 and May 25?
assistant
SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Afghanistan' AND T3.Dates_active = 'May19 May25' INTERSECT SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Albania' AND T3.Dates_active = 'May19 May25';
human
What storm affected city 10.0 and 15.0? | do you mean the name of storm that affected city 10 and 15? | Yes
assistant
SELECT T1.Name FROM Storm AS T1 JOIN affected_region AS T2 ON T1.Storm_ID = T2.Storm_ID WHERE T2.Number_city_affected = 10.0 OR T2.Number_city_affected = 15.0 ;