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: For the university id 268, show its number of students in 2013.
Evidence: number of students refers to num_students; in 2013 refers to year = 2013
SQL: SELECT num_students FROM university_year WHERE university_id = 268 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: Show the name of country id 66.
Evidence: name of country refers to country_name
SQL: SELECT country_name FROM country WHERE id = 66
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 McMaster University located in?
Evidence: McMaster University refers to university_name = 'McMaster 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 = 'McMaster 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: How many Turkish universities are there in the database?
Evidence: Turkish universities refers to country_name = 'Turkey';
SQL: SELECT COUNT(*) FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T2.country_name = 'Turkey'
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 university had the most students in 2011? Show its name.
Evidence: in 2011 refers to year 2011; the most students refers to MAX(num_students); 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 ORDER BY T1.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 of Michigan in 2011?
Evidence: in 2011 refers to year 2011; in University of Michigan refers to university_name = 'University of Michigan';
SQL: SELECT COUNT(*) FROM university AS T1 INNER JOIN university_year AS T2 ON T1.id = T2.university_id WHERE T1.university_name = 'University of Michigan' 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: For Chosun University, what was its score on "Influence Rank" in 2015?
Evidence: Chosun University refers to university_name = 'Chosun University'; in 2015 refers to year = 2015; on "Influence Rank" refers to criteria_name = 'Influence Rank';
SQL: SELECT 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 = 'Chosun University' AND T1.criteria_name = 'Influence Rank' AND T2.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: What is the percentage of the international students in University of Oslo in 2015?
Evidence: percentage of the international students refers to pct_international_students; in 2015 refers to year = 2015; in University of Oslo refers to university_name = 'University of Oslo';
SQL: SELECT T2.pct_international_students FROM university AS T1 INNER JOIN university_year AS T2 ON T1.id = T2.university_id WHERE T1.university_name = 'University of Oslo' AND T2.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: For the University of Southampton in 2015, on which criteria did it score the best?
Evidence: University of Southampton refers to university_name = 'University of Southampton'; in 2015 refers to year = 2015; score the best refers to MAX(score); which 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 = 'University of Southampton' AND T2.year = 2015 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: Which ranking system is criteria "Total Shanghai" in?
Evidence: criteria "Total Shanghai" refers to criteria_name = 'Total Shanghai'; which 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 = 'Total Shanghai'
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 were there in Pierre and Marie Curie University in 2015?
Evidence: female students refers to DIVIDE(MULTIPLY(pct_female_students, num_students), 100); in Pierre and Marie Curie University refers to university_name = 'Pierre and Marie Curie University'; in 2015 refers to year = 2015
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 = 2015 AND T2.university_name = 'Pierre and Marie Curie 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 was the score for University of Florida in "N and S" in 2014?
Evidence: University of Florida refers to university_name = 'University of Florida'; in 2014 refers to year = 2014; in "N and S" refers to criteria_name = 'N and S'
SQL: SELECT 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 = 'University of Florida' AND T2.year = 2014 AND T1.criteria_name = 'N and S'
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 international students of University of Wisconsin-Madison in 2013.
Evidence: international students refers to DIVIDE(MULTIPLY(num_students, pct_international_students), 100); University of Wisconsin-Madison refers to university_name = 'University of Wisconsin-Madison'; in 2013 refers to year = 2013
SQL: SELECT 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 T1.year = 2013 AND T2.university_name = 'University of Wisconsin-Madison'
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 name of the university with the lowest number of students in 2015.
Evidence: lowest number of students refers to MIN(num_students); in 2015 refers to year = 2015; name of 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 = 2015 ORDER BY T1.num_students 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: How many times more was the number of students of University of Ottawa than Joseph Fourier University in 2013?
Evidence: Joseph Fourier University refers to university_name = 'Joseph Fourier University'; University of Ottawa refers to university_name = 'University of Ottawa'; in 2013 refers to year = 2013; how many times more refers to DIVIDE(SUM(num_students where university_name = 'University of Ottawa'), SUM(num_students where university_name = 'Joseph Fourier University'))
SQL: SELECT CAST(SUM(CASE WHEN T2.university_name = 'University of Ottawa' THEN T1.num_students ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.university_name = 'Joseph Fourier University' THEN T1.num_students ELSE 0 END) FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.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: Calculate the average number of criterias among "Times Higher Education World University Ranking","Shanghai Ranking" and "Center for World University Rankings".
Evidence: average number of criterias refers to DIVIDE(SUM(id), 3); "Times Higher Education World University Ranking", "Shanghai Ranking" and "Center for World University Rankings" refers to system_name IN ('Times Higher Education World University Ranking', 'Shanghai Ranking', 'Center for World University Rankings');
SQL: SELECT (SUM(CASE WHEN T1.system_name = 'Center for World University Rankings' THEN 1 ELSE 0 END) + SUM(CASE WHEN T1.system_name = 'Shanghai Ranking' THEN 1 ELSE 0 END) + SUM(CASE WHEN T1.system_name = 'Times Higher Education World University Ranking' THEN 1 ELSE 0 END)) / 3 FROM ranking_system AS T1 INNER JOIN ranking_criteria AS T2 ON T1.id = T2.ranking_system_id
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 number of students of all universities in 2012.
Evidence: average number of students refers to avg(num_students); in 2012 refers to year = 2012
SQL: SELECT AVG(num_students) FROM university_year WHERE 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: What is the score of university ID 68 in 2015?
Evidence: in 2015 refers to year = 2015
SQL: SELECT score FROM university_ranking_year WHERE year = 2015 AND university_id = 68
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 country ID of Cyprus.
Evidence: Cyprus refers to country_name = 'Cyprus';
SQL: SELECT id FROM country WHERE country_name = 'Cyprus'
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 university with the largest percentage of international students?
Evidence: largest percentage of international students refers to MAX(pct_international_students); ID of university refers to university_id
SQL: SELECT university_id FROM university_year ORDER BY 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: Provide the criteria name of the ranking criteria ID 13.
SQL: SELECT criteria_name FROM ranking_criteria WHERE id = 13
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 average score of all universities in 2012?
Evidence: average score refers to avg(score); in 2012 refers to year = 2012
SQL: SELECT AVG(score) FROM university_ranking_year WHERE 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: In years 2011 to 2013, what is the total number of female students in university ID 40?
Evidence: total number of female students refers to SUM(DIVIDE(MULTIPLY(pct_female_students, num_students), 100)); In years 2011 to 2013 refers to year BETWEEN 2011 AND 2013
SQL: SELECT SUM(CAST(num_students * pct_female_students AS REAL) / 100) FROM university_year WHERE year BETWEEN 2011 AND 2013 AND university_id = 40
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 of university ID 79 between year 2013 to 2015.
Evidence: average score refers to avg(score); between year 2013 to 2015 refers to year BETWEEN 2013 AND 2015
SQL: SELECT AVG(score) FROM university_ranking_year WHERE year BETWEEN 2013 AND 2015 AND university_id = 79
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 student staff ratio of university ID 35.
SQL: SELECT student_staff_ratio FROM university_year WHERE university_id = 35
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 score of the most populated university in 2011.
Evidence: most populated university refers to MAX(num_students); in 2011 refers to year = 2011;
SQL: SELECT T2.score FROM university_year AS T1 INNER JOIN university_ranking_year AS T2 ON T1.university_id = T2.university_id WHERE T1.year = 2011 ORDER BY T1.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: Give the criteria name where Harvard University scored 100.
Evidence: Harvard University refers to university_name = 'Harvard University'; scored 100 refers to score = 100
SQL: SELECT DISTINCT T3.criteria_name FROM university AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.university_id INNER JOIN ranking_criteria AS T3 ON T3.id = T2.ranking_criteria_id WHERE T1.university_name = 'Harvard University' AND T2.score = 100
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 university name and ID of the university found in Turkey.
Evidence: found in Turkey refers to country_name = 'Turkey';
SQL: SELECT T1.university_name, T1.id FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T2.country_name = 'Turkey'