Database: city_record

Question: What is id of the city that hosted events in the most recent year?
SQL: SELECT host_city FROM hosting_city ORDER BY YEAR DESC LIMIT 1

Question: Find the cities which were once a host city after 2010?
SQL: SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T2.year  >  2010

Question: Which city has hosted the most events?
SQL: SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id  =  T2.host_city GROUP BY T2.host_city ORDER BY count(*) DESC LIMIT 1

Question: What is the venue of the competition "1994 FIFA World Cup qualification" hosted by "Nanjing ( Jiangsu )"?
SQL: SELECT T3.venue FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city JOIN MATCH AS T3 ON T2.match_id = T3.match_id WHERE T1.city = "Nanjing ( Jiangsu )" AND T3.competition = "1994 FIFA World Cup qualification"

Question: Give me the temperature of Shanghai in January.
SQL: SELECT T2.Jan FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T1.city = "Shanghai"

Question: What is the host year of city "Taizhou ( Zhejiang )"?
SQL: SELECT T2.year FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id  =  T2.host_city WHERE T1.city  =  "Taizhou ( Zhejiang )"

Question: Which three cities have the largest regional population?
SQL: SELECT city FROM city ORDER BY regional_population DESC LIMIT 3

Question: Which city has the lowest GDP? Please list the city name and its GDP.
SQL: SELECT city ,  GDP FROM city ORDER BY GDP LIMIT 1

Question: Which city has the highest temperature in February?
SQL: SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id  =  T2.city_id ORDER BY T2.Feb DESC LIMIT 1

Question: Give me a list of cities whose temperature in March is lower than that in July or higher than that in Oct?
SQL: SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id  =  T2.city_id WHERE T2.Mar  <  T2.Jul OR T2.Mar  >  T2.Oct

Question: Give me a list of cities whose temperature in Mar is lower than that in July and which have also served as host cities?
SQL: SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id  =  T2.city_id WHERE T2.Mar  <  T2.Jul INTERSECT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id  =  T4.host_city

Question: Give me a list of cities whose temperature in Mar is lower than that in Dec and which have never been host cities.
SQL: SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id  =  T2.city_id WHERE T2.Mar  <  T2.Dec EXCEPT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id  =  T4.host_city

Question: Give me a list of cities whose temperature in Feb is higher than that in Jun or cities that were once host cities?
SQL: SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id  =  T2.city_id WHERE T2.Feb  >  T2.Jun UNION SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id  =  T4.host_city

Question: Please give me a list of cities whose regional population is over 8000000 or under 5000000.
SQL: SELECT city FROM city WHERE regional_population  >  8000000 UNION SELECT city FROM city WHERE regional_population  <  5000000