Database schema:
CREATE TABLE building (
  Building_ID NUMBER PRIMARY KEY,
  Region_ID NUMBER,
  Name TEXT,
  Address TEXT,
  Number_of_Stories NUMBER,
  Completed_Year NUMBER,
  FOREIGN KEY (Region_ID) REFERENCES region(Region_ID)
);
CREATE TABLE region (
  Region_ID NUMBER PRIMARY KEY,
  Name TEXT,
  Capital TEXT,
  Area NUMBER,
  Population NUMBER
);

Question: What is the average population for all regions?
SQL: SELECT avg(Population) FROM region

Question: What are the names of regions in ascending alphabetical order?
SQL: SELECT Name FROM region ORDER BY Name ASC

Question: For each building, return the address of the building and the name of the region it belongs to.
SQL: SELECT T1.Address ,  T2.Capital FROM building AS T1 JOIN region AS T2 ON T1.Region_ID  =  T2.Region_ID

Question: Please show each completion year and the number of buildings completed in that year.
SQL: SELECT Completed_Year ,  COUNT(*) FROM building GROUP BY Completed_Year

Question: Count the number of buildings.
SQL: SELECT count(*) FROM building

Question: Show the names of buildings and the names of regions they are in.
SQL: SELECT T1.Name ,  T2.Name FROM building AS T1 JOIN region AS T2 ON T1.Region_ID  =  T2.Region_ID

Question: Which regions have more than one building? Give me the names of the regions.
SQL: SELECT T2.Name FROM building AS T1 JOIN region AS T2 ON T1.Region_ID  =  T2.Region_ID GROUP BY T1.Region_ID HAVING COUNT(*)  >  1

Question: Show the completed years of buildings in descending order of the number of stories.
SQL: SELECT Completed_Year FROM building ORDER BY Number_of_Stories DESC

Question: Compute the average population of a region.
SQL: SELECT avg(Population) FROM region

Question: Show the names of regions that have more than one building.
SQL: SELECT T2.Name FROM building AS T1 JOIN region AS T2 ON T1.Region_ID  =  T2.Region_ID GROUP BY T1.Region_ID HAVING COUNT(*)  >  1

Question: List the names of regions that do not have any buildings.
SQL: SELECT Name FROM region WHERE Region_ID NOT IN (SELECT Region_ID FROM building)

Question: List the names of regions in alphabetical order.
SQL: SELECT Name FROM region ORDER BY Name ASC

Question: Show the distinct addresses of buildings.
SQL: SELECT DISTINCT Address FROM building

Question: Which region has the largest number of buildings? Show me the capital of the region.
SQL: SELECT T2.capital FROM building AS T1 JOIN region AS T2 ON T1.Region_ID  =  T2.Region_ID GROUP BY T1.Region_ID ORDER BY COUNT(*) DESC LIMIT 1

Question: Show the capital of the region that has the most buildings.
SQL: SELECT T2.capital FROM building AS T1 JOIN region AS T2 ON T1.Region_ID  =  T2.Region_ID GROUP BY T1.Region_ID ORDER BY COUNT(*) DESC LIMIT 1

Question: Give me the capitals of the regions whose area is larger than 10000.
SQL: SELECT Capital FROM region WHERE Area  >  10000

Question: List the names of the regions with the top 5 largest areas.
SQL: SELECT Name FROM region ORDER BY Area DESC LIMIT 5

Question: Sort the buildings in descending order of building completion year, and return the building addresses.
SQL: SELECT Address FROM building ORDER BY Completed_Year DESC

Question: What is the maximum number of stories of buildings not completed in 1980?
SQL: SELECT max(Number_of_Stories) FROM building WHERE Completed_Year != "1980"

Question: List the capital of the region with the largest population.
SQL: SELECT Capital FROM region ORDER BY Population DESC LIMIT 1

Question: Give me a list of distinct building addresses.
SQL: SELECT DISTINCT Address FROM building

Question: What are the capitals of the regions with area bigger than 10000?
SQL: SELECT Capital FROM region WHERE Area  >  10000

Question: For each building, return the name of the building and the name of the region it belongs to.
SQL: SELECT T1.Name ,  T2.Name FROM building AS T1 JOIN region AS T2 ON T1.Region_ID  =  T2.Region_ID

Question: For completion year, return the year and the number of buildings completed.
SQL: SELECT Completed_Year ,  COUNT(*) FROM building GROUP BY Completed_Year

Question: Show the number of stories of buildings in the region with name "Abruzzo".
SQL: SELECT T1.Number_of_Stories FROM building AS T1 JOIN region AS T2 ON T1.Region_ID  =  T2.Region_ID WHERE T2.Name  =  "Abruzzo"

Question: List the names of buildings in ascending order of number of stories.
SQL: SELECT Name FROM building ORDER BY Number_of_Stories ASC

Question: List the year in which the most buildings are completed.
SQL: SELECT Completed_Year FROM building GROUP BY Completed_Year ORDER BY COUNT(*) DESC LIMIT 1