QIAN-ME/bird_schema_data huggingface dataset:
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 university
【Schema】
# Table: university_year
[
(university_id:INTEGER, Examples: [1, 5, 2]),
(year:INTEGER, Examples: [2011, 2012, 2013]),
(num_students:INTEGER, Examples: [20152, 2243, 11074]),
(student_staff_ratio:REAL, Examples: [8.9, 6.9, 9.0]),
(pct_international_students:INTEGER, Examples: [25, 27, 33]),
(pct_female_students:INTEGER, Examples: [33, 37, 42])
]
# Table: country
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(country_name:TEXT, Examples: [Argentina, Australia, Austria])
]
# Table: university
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(country_id:INTEGER, Examples: [73, 72, 33]),
(university_name:TEXT, Examples: [Harvard University])
]
# Table: university_ranking_year
[
(university_id:INTEGER, Examples: [1, 5, 2]),
(ranking_criteria_id:INTEGER, Examples: [1, 2, 3]),
(year:INTEGER, Examples: [2011, 2012, 2013]),
(score:INTEGER, Examples: [100, 98, 91])
]
# Table: ranking_system
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(system_name:TEXT, Examples: [Times Higher Education World University Ranking])
]
# Table: ranking_criteria
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(ranking_system_id:INTEGER, Examples: [1, 2, 3]),
(criteria_name:TEXT, Examples: [Teaching, International, Research])
]
【Foreign keys】
university_year.university_id=university.id
university.country_id=country.id
university_ranking_year.ranking_criteria_id=ranking_criteria.id
university_ranking_year.university_id=university.id
ranking_criteria.ranking_system_id=ranking_system.id

    【Question】
    In Argentina, how many universities are there? In Argentina refers to country_name = 'Argentina';

    【Evidence】
    In Argentina refers to country_name = 'Argentina';

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(*) FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T2.country_name = 'Argentina'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 university
【Schema】
# Table: university_year
[
(university_id:INTEGER, Examples: [1, 5, 2]),
(year:INTEGER, Examples: [2011, 2012, 2013]),
(num_students:INTEGER, Examples: [20152, 2243, 11074]),
(student_staff_ratio:REAL, Examples: [8.9, 6.9, 9.0]),
(pct_international_students:INTEGER, Examples: [25, 27, 33]),
(pct_female_students:INTEGER, Examples: [33, 37, 42])
]
# Table: country
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(country_name:TEXT, Examples: [Argentina, Australia, Austria])
]
# Table: university
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(country_id:INTEGER, Examples: [73, 72, 33]),
(university_name:TEXT, Examples: [Harvard University])
]
# Table: university_ranking_year
[
(university_id:INTEGER, Examples: [1, 5, 2]),
(ranking_criteria_id:INTEGER, Examples: [1, 2, 3]),
(year:INTEGER, Examples: [2011, 2012, 2013]),
(score:INTEGER, Examples: [100, 98, 91])
]
# Table: ranking_system
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(system_name:TEXT, Examples: [Times Higher Education World University Ranking])
]
# Table: ranking_criteria
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(ranking_system_id:INTEGER, Examples: [1, 2, 3]),
(criteria_name:TEXT, Examples: [Teaching, International, Research])
]
【Foreign keys】
university_year.university_id=university.id
university.country_id=country.id
university_ranking_year.ranking_criteria_id=ranking_criteria.id
university_ranking_year.university_id=university.id
ranking_criteria.ranking_system_id=ranking_system.id

    【Question】
    Which universities have more than 100,000 students in 2011? in 2011 refers to year 2011; more than 100,000 students refers to num_students > 100000; which university refers to university_name;

    【Evidence】
    in 2011 refers to year 2011; more than 100,000 students refers to num_students > 100000; which university refers to university_name;

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

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
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 university
【Schema】
# Table: university_year
[
(university_id:INTEGER, Examples: [1, 5, 2]),
(year:INTEGER, Examples: [2011, 2012, 2013]),
(num_students:INTEGER, Examples: [20152, 2243, 11074]),
(student_staff_ratio:REAL, Examples: [8.9, 6.9, 9.0]),
(pct_international_students:INTEGER, Examples: [25, 27, 33]),
(pct_female_students:INTEGER, Examples: [33, 37, 42])
]
# Table: country
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(country_name:TEXT, Examples: [Argentina, Australia, Austria])
]
# Table: university
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(country_id:INTEGER, Examples: [73, 72, 33]),
(university_name:TEXT, Examples: [Harvard University])
]
# Table: university_ranking_year
[
(university_id:INTEGER, Examples: [1, 5, 2]),
(ranking_criteria_id:INTEGER, Examples: [1, 2, 3]),
(year:INTEGER, Examples: [2011, 2012, 2013]),
(score:INTEGER, Examples: [100, 98, 91])
]
# Table: ranking_system
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(system_name:TEXT, Examples: [Times Higher Education World University Ranking])
]
# Table: ranking_criteria
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(ranking_system_id:INTEGER, Examples: [1, 2, 3]),
(criteria_name:TEXT, Examples: [Teaching, International, Research])
]
【Foreign keys】
university_year.university_id=university.id
university.country_id=country.id
university_ranking_year.ranking_criteria_id=ranking_criteria.id
university_ranking_year.university_id=university.id
ranking_criteria.ranking_system_id=ranking_system.id

    【Question】
    How many criteria are associated with ranking system Center for World University Rankings? ranking system Center for World University Rankings refers to system_name = 'Center for World University Rankings';

    【Evidence】
    ranking system Center for World University Rankings refers to system_name = 'Center for World University Rankings';

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

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'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 university
【Schema】
# Table: university_year
[
(university_id:INTEGER, Examples: [1, 5, 2]),
(year:INTEGER, Examples: [2011, 2012, 2013]),
(num_students:INTEGER, Examples: [20152, 2243, 11074]),
(student_staff_ratio:REAL, Examples: [8.9, 6.9, 9.0]),
(pct_international_students:INTEGER, Examples: [25, 27, 33]),
(pct_female_students:INTEGER, Examples: [33, 37, 42])
]
# Table: country
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(country_name:TEXT, Examples: [Argentina, Australia, Austria])
]
# Table: university
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(country_id:INTEGER, Examples: [73, 72, 33]),
(university_name:TEXT, Examples: [Harvard University])
]
# Table: university_ranking_year
[
(university_id:INTEGER, Examples: [1, 5, 2]),
(ranking_criteria_id:INTEGER, Examples: [1, 2, 3]),
(year:INTEGER, Examples: [2011, 2012, 2013]),
(score:INTEGER, Examples: [100, 98, 91])
]
# Table: ranking_system
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(system_name:TEXT, Examples: [Times Higher Education World University Ranking])
]
# Table: ranking_criteria
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(ranking_system_id:INTEGER, Examples: [1, 2, 3]),
(criteria_name:TEXT, Examples: [Teaching, International, Research])
]
【Foreign keys】
university_year.university_id=university.id
university.country_id=country.id
university_ranking_year.ranking_criteria_id=ranking_criteria.id
university_ranking_year.university_id=university.id
ranking_criteria.ranking_system_id=ranking_system.id

    【Question】
    How many students at the university earned a score of 90 in 2011? in 2011 refers to year 2011; earned a score of 90 refers to score = 90;

    【Evidence】
    in 2011 refers to year 2011; earned a score of 90 refers to score = 90;

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

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
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 university
【Schema】
# Table: university_year
[
(university_id:INTEGER, Examples: [1, 5, 2]),
(year:INTEGER, Examples: [2011, 2012, 2013]),
(num_students:INTEGER, Examples: [20152, 2243, 11074]),
(student_staff_ratio:REAL, Examples: [8.9, 6.9, 9.0]),
(pct_international_students:INTEGER, Examples: [25, 27, 33]),
(pct_female_students:INTEGER, Examples: [33, 37, 42])
]
# Table: country
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(country_name:TEXT, Examples: [Argentina, Australia, Austria])
]
# Table: university
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(country_id:INTEGER, Examples: [73, 72, 33]),
(university_name:TEXT, Examples: [Harvard University])
]
# Table: university_ranking_year
[
(university_id:INTEGER, Examples: [1, 5, 2]),
(ranking_criteria_id:INTEGER, Examples: [1, 2, 3]),
(year:INTEGER, Examples: [2011, 2012, 2013]),
(score:INTEGER, Examples: [100, 98, 91])
]
# Table: ranking_system
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(system_name:TEXT, Examples: [Times Higher Education World University Ranking])
]
# Table: ranking_criteria
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(ranking_system_id:INTEGER, Examples: [1, 2, 3]),
(criteria_name:TEXT, Examples: [Teaching, International, Research])
]
【Foreign keys】
university_year.university_id=university.id
university.country_id=country.id
university_ranking_year.ranking_criteria_id=ranking_criteria.id
university_ranking_year.university_id=university.id
ranking_criteria.ranking_system_id=ranking_system.id

    【Question】
    What are the top three universities with the most international students? most international students refers to MAX(SUM(DIVIDE(MULTIPLE(pct_international_students, num_students), 100))); name of university refers to university_name;

    【Evidence】
    most international students refers to MAX(SUM(DIVIDE(MULTIPLE(pct_international_students, num_students), 100))); name of university refers to university_name;

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

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
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 university
【Schema】
# Table: university_year
[
(university_id:INTEGER, Examples: [1, 5, 2]),
(year:INTEGER, Examples: [2011, 2012, 2013]),
(num_students:INTEGER, Examples: [20152, 2243, 11074]),
(student_staff_ratio:REAL, Examples: [8.9, 6.9, 9.0]),
(pct_international_students:INTEGER, Examples: [25, 27, 33]),
(pct_female_students:INTEGER, Examples: [33, 37, 42])
]
# Table: country
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(country_name:TEXT, Examples: [Argentina, Australia, Austria])
]
# Table: university
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(country_id:INTEGER, Examples: [73, 72, 33]),
(university_name:TEXT, Examples: [Harvard University])
]
# Table: university_ranking_year
[
(university_id:INTEGER, Examples: [1, 5, 2]),
(ranking_criteria_id:INTEGER, Examples: [1, 2, 3]),
(year:INTEGER, Examples: [2011, 2012, 2013]),
(score:INTEGER, Examples: [100, 98, 91])
]
# Table: ranking_system
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(system_name:TEXT, Examples: [Times Higher Education World University Ranking])
]
# Table: ranking_criteria
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(ranking_system_id:INTEGER, Examples: [1, 2, 3]),
(criteria_name:TEXT, Examples: [Teaching, International, Research])
]
【Foreign keys】
university_year.university_id=university.id
university.country_id=country.id
university_ranking_year.ranking_criteria_id=ranking_criteria.id
university_ranking_year.university_id=university.id
ranking_criteria.ranking_system_id=ranking_system.id

    【Question】
    What is the difference in overall student enrollment and international student enrollment at the Harvard university from 2011 to 2012? 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

    【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

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

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
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 university
【Schema】
# Table: university_year
[
(university_id:INTEGER, Examples: [1, 5, 2]),
(year:INTEGER, Examples: [2011, 2012, 2013]),
(num_students:INTEGER, Examples: [20152, 2243, 11074]),
(student_staff_ratio:REAL, Examples: [8.9, 6.9, 9.0]),
(pct_international_students:INTEGER, Examples: [25, 27, 33]),
(pct_female_students:INTEGER, Examples: [33, 37, 42])
]
# Table: country
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(country_name:TEXT, Examples: [Argentina, Australia, Austria])
]
# Table: university
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(country_id:INTEGER, Examples: [73, 72, 33]),
(university_name:TEXT, Examples: [Harvard University])
]
# Table: university_ranking_year
[
(university_id:INTEGER, Examples: [1, 5, 2]),
(ranking_criteria_id:INTEGER, Examples: [1, 2, 3]),
(year:INTEGER, Examples: [2011, 2012, 2013]),
(score:INTEGER, Examples: [100, 98, 91])
]
# Table: ranking_system
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(system_name:TEXT, Examples: [Times Higher Education World University Ranking])
]
# Table: ranking_criteria
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(ranking_system_id:INTEGER, Examples: [1, 2, 3]),
(criteria_name:TEXT, Examples: [Teaching, International, Research])
]
【Foreign keys】
university_year.university_id=university.id
university.country_id=country.id
university_ranking_year.ranking_criteria_id=ranking_criteria.id
university_ranking_year.university_id=university.id
ranking_criteria.ranking_system_id=ranking_system.id

    【Question】
    How many universities had over 30000 students in 2011? in 2011 refers to year 2011; had over 30000 students refers to num_students > 30000;

    【Evidence】
    in 2011 refers to year 2011; had over 30000 students refers to num_students > 30000;

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(*) FROM university_year WHERE year = 2011 AND num_students > 30000
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 university
【Schema】
# Table: university_year
[
(university_id:INTEGER, Examples: [1, 5, 2]),
(year:INTEGER, Examples: [2011, 2012, 2013]),
(num_students:INTEGER, Examples: [20152, 2243, 11074]),
(student_staff_ratio:REAL, Examples: [8.9, 6.9, 9.0]),
(pct_international_students:INTEGER, Examples: [25, 27, 33]),
(pct_female_students:INTEGER, Examples: [33, 37, 42])
]
# Table: country
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(country_name:TEXT, Examples: [Argentina, Australia, Austria])
]
# Table: university
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(country_id:INTEGER, Examples: [73, 72, 33]),
(university_name:TEXT, Examples: [Harvard University])
]
# Table: university_ranking_year
[
(university_id:INTEGER, Examples: [1, 5, 2]),
(ranking_criteria_id:INTEGER, Examples: [1, 2, 3]),
(year:INTEGER, Examples: [2011, 2012, 2013]),
(score:INTEGER, Examples: [100, 98, 91])
]
# Table: ranking_system
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(system_name:TEXT, Examples: [Times Higher Education World University Ranking])
]
# Table: ranking_criteria
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(ranking_system_id:INTEGER, Examples: [1, 2, 3]),
(criteria_name:TEXT, Examples: [Teaching, International, Research])
]
【Foreign keys】
university_year.university_id=university.id
university.country_id=country.id
university_ranking_year.ranking_criteria_id=ranking_criteria.id
university_ranking_year.university_id=university.id
ranking_criteria.ranking_system_id=ranking_system.id

    【Question】
    What is the country ID of the University of Tokyo? University of Tokyo refers to university_name = 'University of Tokyo';

    【Evidence】
    University of Tokyo refers to university_name = 'University of Tokyo';

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT country_id FROM university WHERE university_name = 'University of Tokyo'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 university
【Schema】
# Table: university_year
[
(university_id:INTEGER, Examples: [1, 5, 2]),
(year:INTEGER, Examples: [2011, 2012, 2013]),
(num_students:INTEGER, Examples: [20152, 2243, 11074]),
(student_staff_ratio:REAL, Examples: [8.9, 6.9, 9.0]),
(pct_international_students:INTEGER, Examples: [25, 27, 33]),
(pct_female_students:INTEGER, Examples: [33, 37, 42])
]
# Table: country
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(country_name:TEXT, Examples: [Argentina, Australia, Austria])
]
# Table: university
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(country_id:INTEGER, Examples: [73, 72, 33]),
(university_name:TEXT, Examples: [Harvard University])
]
# Table: university_ranking_year
[
(university_id:INTEGER, Examples: [1, 5, 2]),
(ranking_criteria_id:INTEGER, Examples: [1, 2, 3]),
(year:INTEGER, Examples: [2011, 2012, 2013]),
(score:INTEGER, Examples: [100, 98, 91])
]
# Table: ranking_system
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(system_name:TEXT, Examples: [Times Higher Education World University Ranking])
]
# Table: ranking_criteria
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(ranking_system_id:INTEGER, Examples: [1, 2, 3]),
(criteria_name:TEXT, Examples: [Teaching, International, Research])
]
【Foreign keys】
university_year.university_id=university.id
university.country_id=country.id
university_ranking_year.ranking_criteria_id=ranking_criteria.id
university_ranking_year.university_id=university.id
ranking_criteria.ranking_system_id=ranking_system.id

    【Question】
    Provide the ranking system ID of the Center for World University Rankings. the Center for World University Rankings refers to system_name = 'Center for World University Rankings';

    【Evidence】
    the Center for World University Rankings refers to system_name = 'Center for World University Rankings';

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT id FROM ranking_system WHERE system_name = 'Center for World University Rankings'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 university
【Schema】
# Table: university_year
[
(university_id:INTEGER, Examples: [1, 5, 2]),
(year:INTEGER, Examples: [2011, 2012, 2013]),
(num_students:INTEGER, Examples: [20152, 2243, 11074]),
(student_staff_ratio:REAL, Examples: [8.9, 6.9, 9.0]),
(pct_international_students:INTEGER, Examples: [25, 27, 33]),
(pct_female_students:INTEGER, Examples: [33, 37, 42])
]
# Table: country
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(country_name:TEXT, Examples: [Argentina, Australia, Austria])
]
# Table: university
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(country_id:INTEGER, Examples: [73, 72, 33]),
(university_name:TEXT, Examples: [Harvard University])
]
# Table: university_ranking_year
[
(university_id:INTEGER, Examples: [1, 5, 2]),
(ranking_criteria_id:INTEGER, Examples: [1, 2, 3]),
(year:INTEGER, Examples: [2011, 2012, 2013]),
(score:INTEGER, Examples: [100, 98, 91])
]
# Table: ranking_system
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(system_name:TEXT, Examples: [Times Higher Education World University Ranking])
]
# Table: ranking_criteria
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(ranking_system_id:INTEGER, Examples: [1, 2, 3]),
(criteria_name:TEXT, Examples: [Teaching, International, Research])
]
【Foreign keys】
university_year.university_id=university.id
university.country_id=country.id
university_ranking_year.ranking_criteria_id=ranking_criteria.id
university_ranking_year.university_id=university.id
ranking_criteria.ranking_system_id=ranking_system.id

    【Question】
    What is the ID of the Publications Rank criteria? Publications Rank criteria refers to criteria_name = 'Publications Rank';

    【Evidence】
    Publications Rank criteria refers to criteria_name = 'Publications Rank';

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT id FROM ranking_criteria WHERE criteria_name = 'Publications Rank'