Question: Show storm name with at least two regions and 10 cities affected.
Schema: create table affected_region (storm_id varchar, number_city_affected integer, PRIMARY KEY (storm_id)); create table storm (name varchar, storm_id varchar, PRIMARY KEY (name))
SQL: select t1.name from storm as t1 join affected_region as t2 on t1.storm_id = t2.storm_id group by t1.storm_id having count(*) >= 2 intersect select t1.name from storm as t1 join affected_region as t2 on t1.storm_id = t2.storm_id group by t1.storm_id having sum(t2.number_city_affected) >= 10