Database schema:
CREATE TABLE languages (
  id NUMBER PRIMARY KEY,
  name TEXT
);
CREATE TABLE countries (
  id NUMBER PRIMARY KEY,
  name TEXT,
  overall_score NUMBER,
  justice_score NUMBER,
  health_score NUMBER,
  education_score NUMBER,
  economics_score NUMBER,
  politics_score NUMBER
);
CREATE TABLE official_languages (
  language_id NUMBER PRIMARY KEY,
  country_id NUMBER,
  FOREIGN KEY (country_id) REFERENCES countries(id),
  FOREIGN KEY (language_id) REFERENCES languages(id)
);

Question: What are the names of languages that are not the official language of any country?
SQL: SELECT name FROM languages WHERE id NOT IN (SELECT language_id FROM official_languages)

Question: Show the name of the country that has the greatest number of official languages.
SQL: SELECT T1.Name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id  =  T2.country_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1

Question: Show the three official languages that are most commonly spoken.
SQL: SELECT T2.name FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id  =  T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 3

Question: Which country has the greatest number of official languages?
SQL: SELECT T1.Name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id  =  T2.country_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1

Question: What are the names of the three official languages spoken in the most countries?
SQL: SELECT T2.name FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id  =  T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 3

Question: List the names of languages that are not the official language of any countries.
SQL: SELECT name FROM languages WHERE id NOT IN (SELECT language_id FROM official_languages)

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

Question: What are the names of the official languages, sorted descending by the average overall scores across the countries that correspond to each?
SQL: SELECT T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id  =  T2.country_id JOIN languages AS T3 ON T2.language_id  =  T3.id GROUP BY T3.id ORDER BY avg(T1.overall_score) DESC

Question: Which official languages are spoken in two or more countries?
SQL: SELECT T2.name FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id  =  T2.id GROUP BY T2.id HAVING COUNT(*)  >=  2

Question: What are the names of languages that are the official language not only for countries that have an overall score of above 95, but also for countries that have an overall score below 90?
SQL: SELECT T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id  =  T2.country_id JOIN languages AS T3 ON T2.language_id  =  T3.id WHERE T1.overall_score  >  95 INTERSECT SELECT T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id  =  T2.country_id JOIN languages AS T3 ON T2.language_id  =  T3.id WHERE T1.overall_score  <  90

Question: List names of countries in descending order of education_score.
SQL: SELECT name FROM countries ORDER BY education_score DESC

Question: Show the official language spoken by the most number of countries.
SQL: SELECT T2.name FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id  =  T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 1

Question: List the names of countries that do not have any official language.
SQL: SELECT name FROM countries WHERE id NOT IN (SELECT country_id FROM official_languages)

Question: How many languages are there?
SQL: SELECT count(*) FROM languages

Question: What are the names of countries that do not have an official language?
SQL: SELECT name FROM countries WHERE id NOT IN (SELECT country_id FROM official_languages)

Question: Show the official languages spoken by at least two countries.
SQL: SELECT T2.name FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id  =  T2.id GROUP BY T2.id HAVING COUNT(*)  >=  2

Question: What is the average justice scores among countries?
SQL: SELECT avg(justice_score) FROM countries

Question: Show the names of countries in descending order of overall scores.
SQL: SELECT name FROM countries ORDER BY overall_score DESC

Question: Return the maximum and minimum health scores across all countries other than Norway.
SQL: SELECT max(health_score) ,  min(health_score) FROM countries WHERE name != "Norway"

Question: Return the names of langauges that contain the substring "ish".
SQL: SELECT name FROM languages WHERE name LIKE "%ish%"

Question: List the name of languages in ascending alphabetical order.
SQL: SELECT name FROM languages ORDER BY name ASC

Question: What are the names of the countries, as well as the names of their official langauges?
SQL: SELECT T1.name ,  T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id  =  T2.country_id JOIN languages AS T3 ON T2.language_id  =  T3.id

Question: What is the average overall score across countries with English as their official language?
SQL: SELECT avg(T1.overall_score) FROM countries AS T1 JOIN official_languages AS T2 ON T1.id  =  T2.country_id JOIN languages AS T3 ON T2.language_id  =  T3.id WHERE T3.name  =  "English"

Question: What are the names of the countries, ordered descending by overall score?
SQL: SELECT name FROM countries ORDER BY overall_score DESC

Question: Show the official languages and the number of countries speaking each language.
SQL: SELECT T2.name ,  COUNT(*) FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id  =  T2.id GROUP BY T2.name

Question: List the name of the country with the biggest score in politics.
SQL: SELECT name FROM countries ORDER BY politics_score DESC LIMIT 1

Question: What are the names of the different official languages, as well as the number of countries that speak each?
SQL: SELECT T2.name ,  COUNT(*) FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id  =  T2.id GROUP BY T2.name

Question: What are the names of languages, in alphabetical order?
SQL: SELECT name FROM languages ORDER BY name ASC

Question: What is the official language that is most common?
SQL: SELECT T2.name FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id  =  T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 1

Question: Give the average justice scores across all countries.
SQL: SELECT avg(justice_score) FROM countries

Question: Show the names of countries and their official languages.
SQL: SELECT T1.name ,  T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id  =  T2.country_id JOIN languages AS T3 ON T2.language_id  =  T3.id

Question: Count the number of different official languages.
SQL: SELECT count(DISTINCT language_id) FROM official_languages

Question: What are the names of languages that contain the word "ish"?
SQL: SELECT name FROM languages WHERE name LIKE "%ish%"