messages listlengths 3 3 | system stringclasses 1
value | user stringlengths 473 37.6k | assistant stringlengths 23 804 |
|---|---|---|---|
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT T2.country_name FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE university_name = 'University of Oxford' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 T3.university_name = 'Yale University' AND T2.score >= 10 AND T1.criteria_name = 'Quality of Education Rank' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 = 'Center for World University Rankings' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT T2.university_name FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.num_students > 50000 AND T1.year = 2012 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT DISTINCT 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.pct_international_students > 50 AND T2.year BETWEEN 2011 AND 2016 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT COUNT(*) , SUM(CASE WHEN T3.country_name = 'United States of America' THEN 1 ELSE 0 END) AS nums_in_usa 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 = 2016 AND T2.num_students * T2.pct_female_students / 100 > 20... |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT DISTINCT T2.university_name FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id ORDER BY (CAST(T1.num_students * T1.pct_international_students AS REAL) / 100) DESC LIMIT 5 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT university_id FROM university_year ORDER BY student_staff_ratio DESC LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT year FROM university_year ORDER BY num_students ASC LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT AVG(pct_female_students) FROM university_year |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT pct_international_students * num_students, num_students FROM university_year WHERE year = 2013 AND university_id = 20 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT id FROM university WHERE university_name = 'Harvard University' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT university_id FROM university_ranking_year WHERE score = 100 AND year = 2011 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT T1.student_staff_ratio 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 = 2012 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT T2.country_name FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T1.id = 112 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT SUM(T2.num_students) 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 = 'Sweden' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT T1.ranking_criteria_id FROM university_ranking_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T2.university_name = 'Brown University' AND T1.year = 2014 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT T1.university_name FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T2.country_name = 'Spain' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT T1.criteria_name FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id WHERE T2.university_id = 32 AND T2.year = 2015 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT AVG(T2.score) 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 = 'Brazil' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT T2.country_id FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.year = 2014 ORDER BY T1.num_students DESC LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT CAST(T1.num_students * T1.pct_international_students AS REAL) / 100, T2.score FROM university_year AS T1 INNER JOIN university_ranking_year AS T2 ON T1.university_id = T2.university_id WHERE T2.year = 2015 AND T1.university_id = 100 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT SUM(T1.num_students) FROM university_year AS T1 INNER JOIN university_ranking_year AS T2 ON T1.university_id = T2.university_id WHERE T2.score = 98 AND T1.year = 2013 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 = 'Center for World University Rankings' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT DISTINCT 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 = 2013 AND T2.num_students * 100 > ( SELECT AVG(num_students) FROM university_year ) * 98 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT SUM(CAST(T1.num_students * T1.pct_international_students AS REAL) / 100) / COUNT(*) * 100 FROM university_year AS T1 INNER JOIN university_ranking_year AS T2 ON T1.university_id = T2.university_id WHERE T2.score < 80 AND T1.year = 2015 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT SUM(num_students) FROM university_year WHERE year = 2011 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT SUM(CAST(num_students * pct_female_students AS REAL) / 100) FROM university_year WHERE year = 2011 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT MAX(student_staff_ratio) FROM university_year ORDER BY student_staff_ratio DESC LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT university_id FROM university_year WHERE year = 2011 ORDER BY num_students DESC LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT COUNT(*) FROM university_year WHERE year = 2011 AND num_students > 50000 AND pct_international_students > 10 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT university_id FROM university_year WHERE year = 2012 ORDER BY pct_female_students DESC LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT T2.university_name FROM university_ranking_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.year = 2012 ORDER BY T1.score DESC LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT T1.university_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 T3.criteria_name = 'Teaching' ORDER BY T2.score DESC LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT T1.pct_international_students FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.year = 2011 AND T2.university_name = 'Harvard University' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT COUNT(*) FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T2.country_name = 'Argentina' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT COUNT(*) FROM university_year WHERE year = 2011 AND num_students > 30000 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT country_id FROM university WHERE university_name = 'University of Tokyo' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT id FROM ranking_system WHERE system_name = 'Center for World University Rankings' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT id FROM ranking_criteria WHERE criteria_name = 'Publications Rank' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT COUNT(*) FROM university_year WHERE pct_international_students > 30 AND year = 2013 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT COUNT(*) FROM university_ranking_year WHERE ranking_criteria_id = 6 AND year = 2011 AND score < 50 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT T1.university_name FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T2.country_name = 'Denmark' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 ... |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT num_students FROM university_year WHERE year = 2011 AND university_id = 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT university_id FROM university_year WHERE year = 2011 ORDER BY num_students DESC LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT university_id FROM university_year WHERE year = 2011 AND student_staff_ratio > 15 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT COUNT(*) FROM university_year WHERE year = 2011 AND pct_international_students > 25 AND num_students > 20000 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT university_id FROM university_year WHERE year = 2011 ORDER BY pct_female_students DESC LIMIT 3 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT year FROM university_year WHERE university_id = 1 ORDER BY num_students DESC LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT T1.university_name FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T2.country_name = 'Australia' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 < ... |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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... |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT id FROM ranking_system WHERE system_name = 'Center for World University Rankings' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT country_id FROM university WHERE university_name = 'University of Veterinary Medicine Vienna' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT id FROM ranking_criteria WHERE criteria_name = 'Citations Rank' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT id FROM university WHERE university_name = 'University of Orléans' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT num_students FROM university_year WHERE university_id = 268 AND year = 2013 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT country_name FROM country WHERE id = 66 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | SELECT COUNT(*) FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T2.country_name = 'Turkey' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE country\n(\n id INTEGER not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE country
(
id INTEGER not null
primary key,
country_name TEXT default NULL
)
CREATE TABLE ranking_system
(
id INTEGER not null
primary key,
system_name TEXT default NULL
)
CREATE TABLE ranking_criteria
(
id I... | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.