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: In which nation is Harvard University located?
Evidence: Harvard University refers to university_name = 'Harvard University'; nation 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 ranking system for Teaching criteria?
Evidence: Teaching criteria refers to criteria_name = 'Teaching'; name of the ranking system refers to system_name
SQL: SELECT T1.system_name FROM ranking_system AS T1 INNER JOIN ranking_criteria AS T2 ON T1.id = T2.ranking_system_id WHERE T2.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: Name the most famous university in Argentina.
Evidence: in Argentina refers to country_name = 'Argentina';  most famous refers to MAX(SUM(score))
SQL: SELECT T1.university_name FROM university AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.university_id INNER JOIN country AS T3 ON T3.id = T1.country_id WHERE T3.country_name = 'Argentina' GROUP BY T1.university_name ORDER BY SUM(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: In Argentina, how many universities are there?
Evidence: In Argentina refers to country_name = 'Argentina';
SQL: SELECT COUNT(*) FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T2.country_name = 'Argentina'
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 universities have more than 100,000 students in 2011?
Evidence: in 2011 refers to year 2011; more than 100,000 students refers to num_students > 100000; which university refers to university_name;
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 AND T1.num_students > 100000
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 criteria are associated with ranking system Center for World University Rankings?
Evidence: ranking system Center for World University Rankings refers to system_name = 'Center for World University Rankings';
SQL: SELECT COUNT(T2.criteria_name) FROM ranking_system AS T1 INNER JOIN ranking_criteria AS T2 ON T1.id = T2.ranking_system_id WHERE T1.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: How many students at the university earned a score of 90 in 2011?
Evidence: in 2011 refers to year 2011; earned a score of 90 refers to score = 90;
SQL: SELECT COUNT(*) FROM university_year AS T1 INNER JOIN university_ranking_year AS T2 ON T1.university_id = T2.university_id WHERE T2.score = 90 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 are the top three universities with the most international students?
Evidence: most international students refers to MAX(SUM(DIVIDE(MULTIPLE(pct_international_students, num_students), 100))); name of university refers to university_name;
SQL: SELECT DISTINCT T2.university_name FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id GROUP BY T2.university_name ORDER BY SUM(T1.num_students * T1.pct_international_students / 100) 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: What is the difference in overall student enrollment and international student enrollment at the Harvard university from 2011 to 2012?
Evidence: Harvard University refers to university_name = 'Harvard University'; difference in overall student enrollment and international student refers to SUBTRACT(SUM(num_students), SUM(DIVIDE(MULTIPLY(pct_international_students, num_students), 100))); from 2011 to 2012 refers to year BETWEEN 2011 AND 2012
SQL: SELECT SUM(T1.num_students) - SUM(CAST(T1.num_students * T1.pct_international_students AS REAL) / 100) 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 BETWEEN 2011 AND 2012
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 universities had over 30000 students in 2011?
Evidence: in 2011 refers to year 2011; had over 30000 students refers to num_students > 30000;
SQL: SELECT COUNT(*) FROM university_year WHERE year = 2011 AND num_students > 30000
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 country ID of the University of Tokyo?
Evidence: University of Tokyo refers to university_name = 'University of Tokyo';
SQL: SELECT country_id FROM university WHERE university_name = 'University of Tokyo'
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: Provide the ranking system ID of the Center for World University Rankings.
Evidence: the 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: What is the ID of the Publications Rank criteria?
Evidence: Publications Rank criteria refers to criteria_name = 'Publications Rank';
SQL: SELECT id FROM ranking_criteria WHERE criteria_name = 'Publications 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: How many universities had above 30% of international students in 2013?
Evidence: had above 30% of international students refers to pct_international_students > 30; in 2013 refers to year = 2013
SQL: SELECT COUNT(*) FROM university_year WHERE pct_international_students > 30 AND year = 2013
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 universities got less than 50 scores under ranking criteria ID 6 in 2011?
Evidence: in 2011 refers to year 2011; less than 50 scores refers to score < 50;
SQL: SELECT COUNT(*) FROM university_ranking_year WHERE ranking_criteria_id = 6 AND year = 2011 AND score < 50
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: Provide the number of students at Yale University in 2016.
Evidence: number of students refers to num_students; Yale University refers to university_name = 'Yale University'; in 2016 refers to year = 2016
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 = 'Yale University' AND T1.year = 2016
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: List the universities in Denmark.
Evidence: in Denmark refers to country_name = 'Denmark'; 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 = 'Denmark'
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: Provide the number of staff at the University of Auckland in 2015.
Evidence: University of Auckland refers to university_name = 'University of Auckland'; in 2015 refers to year = 2015; number of staff refers to DIVIDE(num_students, student_staff_ratio)
SQL: SELECT CAST(SUM(T1.num_students) AS REAL) / SUM(T1.student_staff_ratio) FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T2.university_name = 'University of Auckland' AND T1.year = 2015
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 has the University of SÃ£o Paulo?
Evidence: the University of SÃ£o Paulo refers to university_name = 'University of São Paulo'; 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 = 'University of São Paulo'
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 international students attended Harvard University in 2012?
Evidence: Harvard University refers to university_name = 'Harvard University'; international students refers to DIVIDE(MULTIPLY(num_students, pct_international_students), 100); in 2012 refers to year = 2012
SQL: SELECT CAST(T2.num_students * T2.pct_international_students AS REAL) / 100 FROM university AS T1 INNER JOIN university_year AS T2 ON T1.id = T2.university_id WHERE T1.university_name = 'Harvard University' AND T2.year = 2012
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 number of female students at Arizona State University in 2014.
Evidence: female students refers to DIVIDE(MULTIPLY(pct_female_students, num_students), 100); at Arizona State University refers to university_name = 'Arizona State University'; in 2014 refers to year = 2014
SQL: SELECT CAST(T2.num_students * T2.pct_female_students AS REAL) / 100 FROM university AS T1 INNER JOIN university_year AS T2 ON T1.id = T2.university_id WHERE T1.university_name = 'Arizona State University' AND T2.year = 2014
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: Provide the universities which got the highest scores.
Evidence: got the highest scores refers to MAX(SUM(score))
SQL: SELECT T1.university_name FROM university AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.university_id GROUP BY T1.university_name ORDER BY SUM(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: List the ranking criteria under the Shanghai Ranking system.
Evidence: Shanghai Ranking system refers to system_name = 'Shanghai Ranking'; ranking criteria refers to criteria_name
SQL: SELECT T2.criteria_name FROM ranking_system AS T1 INNER JOIN ranking_criteria AS T2 ON T1.id = T2.ranking_system_id WHERE T1.system_name = 'Shanghai Ranking'
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 2011, which university got the lowest score in teaching criteria?
Evidence: in 2011 refers to year 2011; got the lowest score refers to MIN(score), teaching criteria refers to criteria_name = 'Teaching'
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 ASC 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: Provide the ranking system name for the "Quality of Education Rank" criteria.
Evidence: the "Quality of Education Rank" criteria refers to criteria_name = 'Quality of Education Rank'; ranking system refers to system_name
SQL: SELECT T1.system_name FROM ranking_system AS T1 INNER JOIN ranking_criteria AS T2 ON T1.id = T2.ranking_system_id WHERE T2.criteria_name = 'Quality of Education 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: How many percent of universities got a score above 80 under International criteria in 2016? Among them, name the university which got the highest score.
Evidence: got a score above 80 refers to score > 80; under International criteria refers to criteria_name = 'International'; in 2016 refers to year = 2016; highest score refers to MAX(score)
SQL: SELECT CAST(SUM(CASE WHEN T2.score > 80 THEN 1 ELSE 0 END) AS REAL) / COUNT(*), ( 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 = 'International' AND T2.year = 2016 AND T2.score > 80 ORDER BY T2.score DESC LIMIT 1 ) AS max 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 = 'International' AND T2.year = 2016
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: Provide the ranking criteria and scores in 2005 that were received by Harvard University.
Evidence: Harvard University refers to university_name = 'Harvard University'; in 2005 refers to year = 2005; ranking criteria refers to criteria_name;
SQL: SELECT T1.criteria_name, T2.score 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 = 2005