1sf/bird-sql-train-with-schema huggingface dataset:
Database: university
Tables: country, ranking_system, ranking_criteria, university, university_ranking_year, university_year
Columns (table index, column name): -1, *, 0, id, 0, country_name, 1, id, 1, system_name, 2, id, 2, ranking_system_id, 2, criteria_name, 3, id, 3, country_id, 3, university_name, 4, university_id, 4, ranking_criteria_id, 4, year, 4, score, 5, university_id, 5, year, 5, num_students, 5, student_staff_ratio, 5, pct_international_students, 5, pct_female_students
Question: Calculate the average score per university under Alumni criteria in 2008.
Evidence: under Alumni criteria refers to criteria_name = 'Alumni'; in 2008 refers to year = 2008; average score refers to DIVIDE(SUM(score), COUNT(university_id))
SQL: SELECT AVG(T2.score) FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id WHERE T1.criteria_name = 'Alumni' AND T2.year = 2008
Database: university
Tables: country, ranking_system, ranking_criteria, university, university_ranking_year, university_year
Columns (table index, column name): -1, *, 0, id, 0, country_name, 1, id, 1, system_name, 2, id, 2, ranking_system_id, 2, criteria_name, 3, id, 3, country_id, 3, university_name, 4, university_id, 4, ranking_criteria_id, 4, year, 4, score, 5, university_id, 5, year, 5, num_students, 5, student_staff_ratio, 5, pct_international_students, 5, pct_female_students
Question: Name the university and country which had the highest number of international students in 2015.
Evidence: highest number of international students refers to MAX(DIVIDE(MULTIPLY(num_students, pct_international_students), 100)); in 2015 refers to year = 2015; name of university refers to university_name;
SQL: SELECT T1.university_name, T3.country_name FROM university AS T1 INNER JOIN university_year AS T2 ON T1.id = T2.university_id INNER JOIN country AS T3 ON T3.id = T1.country_id WHERE T2.year = 2015 ORDER BY T2.num_students DESC LIMIT 1
Database: university
Tables: country, ranking_system, ranking_criteria, university, university_ranking_year, university_year
Columns (table index, column name): -1, *, 0, id, 0, country_name, 1, id, 1, system_name, 2, id, 2, ranking_system_id, 2, criteria_name, 3, id, 3, country_id, 3, university_name, 4, university_id, 4, ranking_criteria_id, 4, year, 4, score, 5, university_id, 5, year, 5, num_students, 5, student_staff_ratio, 5, pct_international_students, 5, pct_female_students
Question: How many students were there in university ID 1 in 2011?
Evidence: in 2011 refers to year 2011;
SQL: SELECT num_students FROM university_year WHERE year = 2011 AND university_id = 1
Database: university
Tables: country, ranking_system, ranking_criteria, university, university_ranking_year, university_year
Columns (table index, column name): -1, *, 0, id, 0, country_name, 1, id, 1, system_name, 2, id, 2, ranking_system_id, 2, criteria_name, 3, id, 3, country_id, 3, university_name, 4, university_id, 4, ranking_criteria_id, 4, year, 4, score, 5, university_id, 5, year, 5, num_students, 5, student_staff_ratio, 5, pct_international_students, 5, pct_female_students
Question: What is the ID of the university with the most students in 2011?
Evidence: in 2011 refers to year 2011; with the most students refers to MAX(num_students); ID of the university refers to university_id
SQL: SELECT university_id FROM university_year WHERE year = 2011 ORDER BY num_students DESC LIMIT 1
Database: university
Tables: country, ranking_system, ranking_criteria, university, university_ranking_year, university_year
Columns (table index, column name): -1, *, 0, id, 0, country_name, 1, id, 1, system_name, 2, id, 2, ranking_system_id, 2, criteria_name, 3, id, 3, country_id, 3, university_name, 4, university_id, 4, ranking_criteria_id, 4, year, 4, score, 5, university_id, 5, year, 5, num_students, 5, student_staff_ratio, 5, pct_international_students, 5, pct_female_students
Question: Please list the IDs of the universities with a student staff ratio of over 15 in 2011.
Evidence: in 2011 refers to year 2011; student staff ratio of over 15 refers to student_staff_ratio > 15; ID of the university refers to university_id
SQL: SELECT university_id FROM university_year WHERE year = 2011 AND student_staff_ratio > 15
Database: university
Tables: country, ranking_system, ranking_criteria, university, university_ranking_year, university_year
Columns (table index, column name): -1, *, 0, id, 0, country_name, 1, id, 1, system_name, 2, id, 2, ranking_system_id, 2, criteria_name, 3, id, 3, country_id, 3, university_name, 4, university_id, 4, ranking_criteria_id, 4, year, 4, score, 5, university_id, 5, year, 5, num_students, 5, student_staff_ratio, 5, pct_international_students, 5, pct_female_students
Question: Among the universities with over 20000 students in 2011, how many of them have an international students percentage of over 25% in the same year?
Evidence: in 2011 refers to year 2011; with over 20000 students refers to num_students > 20000; international students percentage of over 25% refers to pct_international_students > 25;
SQL: SELECT COUNT(*) FROM university_year WHERE year = 2011 AND pct_international_students > 25 AND num_students > 20000
Database: university
Tables: country, ranking_system, ranking_criteria, university, university_ranking_year, university_year
Columns (table index, column name): -1, *, 0, id, 0, country_name, 1, id, 1, system_name, 2, id, 2, ranking_system_id, 2, criteria_name, 3, id, 3, country_id, 3, university_name, 4, university_id, 4, ranking_criteria_id, 4, year, 4, score, 5, university_id, 5, year, 5, num_students, 5, student_staff_ratio, 5, pct_international_students, 5, pct_female_students
Question: Please list the IDs of the universities with the top 3 female students percentage in 2011.
Evidence: in 2011 refers to year 2011; top 3 female students percentage refers to MAX(pct_female_students) LIMIT 3; ID of the university refers to university_id
SQL: SELECT university_id FROM university_year WHERE year = 2011 ORDER BY pct_female_students DESC LIMIT 3
Database: university
Tables: country, ranking_system, ranking_criteria, university, university_ranking_year, university_year
Columns (table index, column name): -1, *, 0, id, 0, country_name, 1, id, 1, system_name, 2, id, 2, ranking_system_id, 2, criteria_name, 3, id, 3, country_id, 3, university_name, 4, university_id, 4, ranking_criteria_id, 4, year, 4, score, 5, university_id, 5, year, 5, num_students, 5, student_staff_ratio, 5, pct_international_students, 5, pct_female_students
Question: In which year did university ID 1 have the most students?
Evidence: have the most students refers to MAX(num_students)
SQL: SELECT year FROM university_year WHERE university_id = 1 ORDER BY num_students DESC LIMIT 1
Database: university
Tables: country, ranking_system, ranking_criteria, university, university_ranking_year, university_year
Columns (table index, column name): -1, *, 0, id, 0, country_name, 1, id, 1, system_name, 2, id, 2, ranking_system_id, 2, criteria_name, 3, id, 3, country_id, 3, university_name, 4, university_id, 4, ranking_criteria_id, 4, year, 4, score, 5, university_id, 5, year, 5, num_students, 5, student_staff_ratio, 5, pct_international_students, 5, pct_female_students
Question: How many students did Harvard University have in 2011?
Evidence: in 2011 refers to year 2011; Harvard University refers to university_name = 'Harvard University';
SQL: SELECT T1.num_students FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T2.university_name = 'Harvard University' AND T1.year = 2011
Database: university
Tables: country, ranking_system, ranking_criteria, university, university_ranking_year, university_year
Columns (table index, column name): -1, *, 0, id, 0, country_name, 1, id, 1, system_name, 2, id, 2, ranking_system_id, 2, criteria_name, 3, id, 3, country_id, 3, university_name, 4, university_id, 4, ranking_criteria_id, 4, year, 4, score, 5, university_id, 5, year, 5, num_students, 5, student_staff_ratio, 5, pct_international_students, 5, pct_female_students
Question: What is the name of the university with the most international students in 2011?
Evidence: in 2011 refers to year 2011; the most international students refers to MAX(DIVIDE(MULTIPLY(num_students,  pct_international_students), 100)); name of university refers to university_id
SQL: SELECT T2.university_name FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.year = 2011 ORDER BY T1.pct_international_students DESC LIMIT 1
Database: university
Tables: country, ranking_system, ranking_criteria, university, university_ranking_year, university_year
Columns (table index, column name): -1, *, 0, id, 0, country_name, 1, id, 1, system_name, 2, id, 2, ranking_system_id, 2, criteria_name, 3, id, 3, country_id, 3, university_name, 4, university_id, 4, ranking_criteria_id, 4, year, 4, score, 5, university_id, 5, year, 5, num_students, 5, student_staff_ratio, 5, pct_international_students, 5, pct_female_students
Question: Please list the names of all the universities in Australia.
Evidence: in Australia refers to country_name = 'Australia'; name of university refers to university_name
SQL: SELECT T1.university_name FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T2.country_name = 'Australia'
Database: university
Tables: country, ranking_system, ranking_criteria, university, university_ranking_year, university_year
Columns (table index, column name): -1, *, 0, id, 0, country_name, 1, id, 1, system_name, 2, id, 2, ranking_system_id, 2, criteria_name, 3, id, 3, country_id, 3, university_name, 4, university_id, 4, ranking_criteria_id, 4, year, 4, score, 5, university_id, 5, year, 5, num_students, 5, student_staff_ratio, 5, pct_international_students, 5, pct_female_students
Question: Among the universities in Australia, how many of them have more than 15000 students in 2011?
Evidence: in 2011 refers to year 2011; have more than 15000 students refers to num_students > 15000; in Australia refers to country_name = 'Australia';
SQL: SELECT COUNT(*) FROM university AS T1 INNER JOIN university_year AS T2 ON T1.id = T2.university_id INNER JOIN country AS T3 ON T3.id = T1.country_id WHERE T3.country_name = 'Australia' AND T2.year = 2011 AND T2.num_students > 15000
Database: university
Tables: country, ranking_system, ranking_criteria, university, university_ranking_year, university_year
Columns (table index, column name): -1, *, 0, id, 0, country_name, 1, id, 1, system_name, 2, id, 2, ranking_system_id, 2, criteria_name, 3, id, 3, country_id, 3, university_name, 4, university_id, 4, ranking_criteria_id, 4, year, 4, score, 5, university_id, 5, year, 5, num_students, 5, student_staff_ratio, 5, pct_international_students, 5, pct_female_students
Question: Which country is Harvard University in?
Evidence: Harvard University refers to university_name = 'Harvard University'; which country refers to country_name
SQL: SELECT T2.country_name FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T1.university_name = 'Harvard University'
Database: university
Tables: country, ranking_system, ranking_criteria, university, university_ranking_year, university_year
Columns (table index, column name): -1, *, 0, id, 0, country_name, 1, id, 1, system_name, 2, id, 2, ranking_system_id, 2, criteria_name, 3, id, 3, country_id, 3, university_name, 4, university_id, 4, ranking_criteria_id, 4, year, 4, score, 5, university_id, 5, year, 5, num_students, 5, student_staff_ratio, 5, pct_international_students, 5, pct_female_students
Question: What is the name of the university with the highest score in teaching in the year 2011?
Evidence: with the highest score refers to MAX(score); in teaching refers to criteria_name = 'Teaching'; name of university refers to university_name;
SQL: SELECT T3.university_name FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id INNER JOIN university AS T3 ON T3.id = T2.university_id WHERE T1.criteria_name = 'Teaching' AND T2.year = 2011 ORDER BY T2.score DESC LIMIT 1
Database: university
Tables: country, ranking_system, ranking_criteria, university, university_ranking_year, university_year
Columns (table index, column name): -1, *, 0, id, 0, country_name, 1, id, 1, system_name, 2, id, 2, ranking_system_id, 2, criteria_name, 3, id, 3, country_id, 3, university_name, 4, university_id, 4, ranking_criteria_id, 4, year, 4, score, 5, university_id, 5, year, 5, num_students, 5, student_staff_ratio, 5, pct_international_students, 5, pct_female_students
Question: Please list the names of the universities with a score in teaching of over 90 in 2011.
Evidence: in 2011 refers to year 2011; in teaching refers to  criteria_name = 'Teaching'; score in teaching of over 90 refers to score > 90; name of university refers to university_name;
SQL: SELECT T3.university_name FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id INNER JOIN university AS T3 ON T3.id = T2.university_id WHERE T1.criteria_name = 'Teaching' AND T2.year = 2011 AND T2.score > 90
Database: university
Tables: country, ranking_system, ranking_criteria, university, university_ranking_year, university_year
Columns (table index, column name): -1, *, 0, id, 0, country_name, 1, id, 1, system_name, 2, id, 2, ranking_system_id, 2, criteria_name, 3, id, 3, country_id, 3, university_name, 4, university_id, 4, ranking_criteria_id, 4, year, 4, score, 5, university_id, 5, year, 5, num_students, 5, student_staff_ratio, 5, pct_international_students, 5, pct_female_students
Question: Among the universities with a score in teaching of over 90 in 2011, how many of them are in the United States of America?
Evidence: in 2011 refers to year 2011; in teaching refers to  criteria_name = 'Teaching'; score in teaching of over 90 refers to score > 90; in the United States of America refers to country_name = 'United States of America';
SQL: SELECT COUNT(*) FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id INNER JOIN university AS T3 ON T3.id = T2.university_id WHERE T1.criteria_name = 'Teaching' AND T2.year = 2011 AND T2.score > 90
Database: university
Tables: country, ranking_system, ranking_criteria, university, university_ranking_year, university_year
Columns (table index, column name): -1, *, 0, id, 0, country_name, 1, id, 1, system_name, 2, id, 2, ranking_system_id, 2, criteria_name, 3, id, 3, country_id, 3, university_name, 4, university_id, 4, ranking_criteria_id, 4, year, 4, score, 5, university_id, 5, year, 5, num_students, 5, student_staff_ratio, 5, pct_international_students, 5, pct_female_students
Question: Please list the names of all the ranking criteria of Harvard University in 2011.
Evidence: in 2011 refers to year 2011; Harvard University refers to university_name = 'Harvard University'; names of all the ranking criteria refers to criteria_name
SQL: SELECT T1.criteria_name FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id INNER JOIN university AS T3 ON T3.id = T2.university_id WHERE T3.university_name = 'Harvard University' AND T2.year = 2011
Database: university
Tables: country, ranking_system, ranking_criteria, university, university_ranking_year, university_year
Columns (table index, column name): -1, *, 0, id, 0, country_name, 1, id, 1, system_name, 2, id, 2, ranking_system_id, 2, criteria_name, 3, id, 3, country_id, 3, university_name, 4, university_id, 4, ranking_criteria_id, 4, year, 4, score, 5, university_id, 5, year, 5, num_students, 5, student_staff_ratio, 5, pct_international_students, 5, pct_female_students
Question: What are the names of the universities that got 98 in teaching in 2011?
Evidence: in 2011 refers to year 2011; that got 98 refers to score = 98; in teaching refers to criteria_name = 'Teaching'; name of university refers to university_name
SQL: SELECT T3.university_name FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id INNER JOIN university AS T3 ON T3.id = T2.university_id WHERE T1.criteria_name = 'Teaching' AND T2.year = 2011 AND T2.score = 98
Database: university
Tables: country, ranking_system, ranking_criteria, university, university_ranking_year, university_year
Columns (table index, column name): -1, *, 0, id, 0, country_name, 1, id, 1, system_name, 2, id, 2, ranking_system_id, 2, criteria_name, 3, id, 3, country_id, 3, university_name, 4, university_id, 4, ranking_criteria_id, 4, year, 4, score, 5, university_id, 5, year, 5, num_students, 5, student_staff_ratio, 5, pct_international_students, 5, pct_female_students
Question: Please list the names of all the universities that scored under 60 in teaching in 2011 and are in the United States of America.
Evidence: scored under 60 refers to score < 60; in 2011 refers to year 2011; in teaching refers to criteria_name = 'Teaching'; in the United States of America refers to country_name = 'United States of America';
SQL: SELECT T3.university_name FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id INNER JOIN university AS T3 ON T3.id = T2.university_id INNER JOIN country AS T4 ON T4.id = T3.country_id WHERE T4.country_name = 'United States of America' AND T2.year = 2011 AND T2.score < 60 AND T1.criteria_name = 'Teaching'
Database: university
Tables: country, ranking_system, ranking_criteria, university, university_ranking_year, university_year
Columns (table index, column name): -1, *, 0, id, 0, country_name, 1, id, 1, system_name, 2, id, 2, ranking_system_id, 2, criteria_name, 3, id, 3, country_id, 3, university_name, 4, university_id, 4, ranking_criteria_id, 4, year, 4, score, 5, university_id, 5, year, 5, num_students, 5, student_staff_ratio, 5, pct_international_students, 5, pct_female_students
Question: Among the universities in Australia, how many of them have a student staff ratio of over 15 in 2011?
Evidence: in 2011 refers to year 2011; in Australia refers to country_name = 'Australia'; student staff ratio of over 15 refers to student_staff_ratio > 15
SQL: SELECT COUNT(*) FROM university AS T1 INNER JOIN university_year AS T2 ON T1.id = T2.university_id INNER JOIN country AS T3 ON T3.id = T1.country_id WHERE T3.country_name = 'Australia' AND T2.student_staff_ratio > 15 AND T2.year = 2011
Database: university
Tables: country, ranking_system, ranking_criteria, university, university_ranking_year, university_year
Columns (table index, column name): -1, *, 0, id, 0, country_name, 1, id, 1, system_name, 2, id, 2, ranking_system_id, 2, criteria_name, 3, id, 3, country_id, 3, university_name, 4, university_id, 4, ranking_criteria_id, 4, year, 4, score, 5, university_id, 5, year, 5, num_students, 5, student_staff_ratio, 5, pct_international_students, 5, pct_female_students
Question: How many female students did Stanford University have in 2011?
Evidence: in 2011 refers to year 2011; female students refers to DIVIDE(MULTIPLY(pct_female_students, num_students), 100); Stanford University refers to university_name = 'Stanford University';
SQL: SELECT CAST(T1.num_students * T1.pct_female_students AS REAL) / 100 FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.year = 2011 AND T2.university_name = 'Stanford University'
Database: university
Tables: country, ranking_system, ranking_criteria, university, university_ranking_year, university_year
Columns (table index, column name): -1, *, 0, id, 0, country_name, 1, id, 1, system_name, 2, id, 2, ranking_system_id, 2, criteria_name, 3, id, 3, country_id, 3, university_name, 4, university_id, 4, ranking_criteria_id, 4, year, 4, score, 5, university_id, 5, year, 5, num_students, 5, student_staff_ratio, 5, pct_international_students, 5, pct_female_students
Question: Among the universities with a score in teaching of over 90 in 2011, what is the percentage of those in the United States of America?
Evidence: in 2011 refers to year 2011; in teaching refers to  criteria_name = 'Teaching'; score in teaching of over 90 refers to score > 90; in the United States of America refers to country_name = 'United States of America'; percentage refers to DIVIDE(COUNT(country_name = 'United States of America'), COUNT(id))
SQL: SELECT CAST(SUM(CASE WHEN T4.country_name = 'United States of America' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) AS per FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id INNER JOIN university AS T3 ON T3.id = T2.university_id INNER JOIN country AS T4 ON T4.id = T3.country_id WHERE T1.criteria_name = 'Teaching' AND T2.year = 2011 AND T2.score > 90
Database: university
Tables: country, ranking_system, ranking_criteria, university, university_ranking_year, university_year
Columns (table index, column name): -1, *, 0, id, 0, country_name, 1, id, 1, system_name, 2, id, 2, ranking_system_id, 2, criteria_name, 3, id, 3, country_id, 3, university_name, 4, university_id, 4, ranking_criteria_id, 4, year, 4, score, 5, university_id, 5, year, 5, num_students, 5, student_staff_ratio, 5, pct_international_students, 5, pct_female_students
Question: Give the id of "Center for World University Rankings".
Evidence: "Center for World University Rankings" refers to system_name = 'Center for World University Rankings';
SQL: SELECT id FROM ranking_system WHERE system_name = 'Center for World University Rankings'
Database: university
Tables: country, ranking_system, ranking_criteria, university, university_ranking_year, university_year
Columns (table index, column name): -1, *, 0, id, 0, country_name, 1, id, 1, system_name, 2, id, 2, ranking_system_id, 2, criteria_name, 3, id, 3, country_id, 3, university_name, 4, university_id, 4, ranking_criteria_id, 4, year, 4, score, 5, university_id, 5, year, 5, num_students, 5, student_staff_ratio, 5, pct_international_students, 5, pct_female_students
Question: Which country is University of Veterinary Medicine Vienna located in? Give its country id.
Evidence: University of Veterinary Medicine Vienna refers to university_name = 'University of Veterinary Medicine Vienna';
SQL: SELECT country_id FROM university WHERE university_name = 'University of Veterinary Medicine Vienna'
Database: university
Tables: country, ranking_system, ranking_criteria, university, university_ranking_year, university_year
Columns (table index, column name): -1, *, 0, id, 0, country_name, 1, id, 1, system_name, 2, id, 2, ranking_system_id, 2, criteria_name, 3, id, 3, country_id, 3, university_name, 4, university_id, 4, ranking_criteria_id, 4, year, 4, score, 5, university_id, 5, year, 5, num_students, 5, student_staff_ratio, 5, pct_international_students, 5, pct_female_students
Question: What is the id of the criteria "Citations Rank"?
Evidence: criteria "Citations Rank" refers to criteria_name = 'Citations Rank';
SQL: SELECT id FROM ranking_criteria WHERE criteria_name = 'Citations Rank'
Database: university
Tables: country, ranking_system, ranking_criteria, university, university_ranking_year, university_year
Columns (table index, column name): -1, *, 0, id, 0, country_name, 1, id, 1, system_name, 2, id, 2, ranking_system_id, 2, criteria_name, 3, id, 3, country_id, 3, university_name, 4, university_id, 4, ranking_criteria_id, 4, year, 4, score, 5, university_id, 5, year, 5, num_students, 5, student_staff_ratio, 5, pct_international_students, 5, pct_female_students
Question: Show the id of University of Orléans.
Evidence: University of Orléans refers to university_name = 'University of Orléans';
SQL: SELECT id FROM university WHERE university_name = 'University of Orléans'