system
stringlengths 30
393
| conversations
list |
---|---|
CREATE TABLE head (age INTEGER) | [
{
"from": "user",
"value": "部门中有多少人年龄大于56岁?"
},
{
"from": "assistant",
"value": "SELECT count(*) FROM head WHERE age > 56"
}
] |
CREATE TABLE head (born_state VARCHAR, age VARCHAR, name VARCHAR) | [
{
"from": "user",
"value": "列出按年龄排序的部门负责人的姓名、出生地和年龄。"
},
{
"from": "assistant",
"value": "SELECT name , born_state , age FROM head ORDER BY age"
}
] |
CREATE TABLE department (budget_in_billions VARCHAR, name VARCHAR, creation VARCHAR) | [
{
"from": "user",
"value": "列出每个部门的创建年份、名称和预算。"
},
{
"from": "assistant",
"value": "SELECT creation , name , budget_in_billions FROM department"
}
] |
CREATE TABLE department (budget_in_billions INTEGER) | [
{
"from": "user",
"value": "部门的最高预算和最低预算是多少?"
},
{
"from": "assistant",
"value": "SELECT max(budget_in_billions) , min(budget_in_billions) FROM department"
}
] |
CREATE TABLE department (num_employees INTEGER, ranking INTEGER) | [
{
"from": "user",
"value": "排名在10到15之间的部门的平均雇员人数是多少?"
},
{
"from": "assistant",
"value": "SELECT avg(num_employees) FROM department WHERE ranking BETWEEN 10 AND 15"
}
] |
CREATE TABLE head (born_state VARCHAR, name VARCHAR) | [
{
"from": "user",
"value": "出生在“浙江”州以外的人的名字是什么?"
},
{
"from": "assistant",
"value": "SELECT name FROM head WHERE born_state != '浙江'"
}
] |
CREATE TABLE department (creation VARCHAR, department_id VARCHAR), CREATE TABLE management (head_id VARCHAR, department_id VARCHAR), CREATE TABLE head (head_id VARCHAR, born_state VARCHAR) | [
{
"from": "user",
"value": "出生于“河南”州的秘书所管理的各部门的不同创建年份是什么?"
},
{
"from": "assistant",
"value": "SELECT DISTINCT T1.creation FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id JOIN head AS T3 ON T2.head_id = T3.head_id WHERE T3.born_state = '河南'"
}
] |
CREATE TABLE head (born_state VARCHAR) | [
{
"from": "user",
"value": "至少有3个负责人出生的州的名字是什么?"
},
{
"from": "assistant",
"value": "SELECT born_state FROM head GROUP BY born_state HAVING count(*) >= 3"
}
] |
CREATE TABLE department (creation VARCHAR) | [
{
"from": "user",
"value": "大多数部门在哪一年成立?"
},
{
"from": "assistant",
"value": "SELECT creation FROM department GROUP BY creation ORDER BY count(*) DESC LIMIT 1"
}
] |
CREATE TABLE department (num_employees VARCHAR, name VARCHAR, department_id VARCHAR), CREATE TABLE management (department_id VARCHAR, temporary_acting VARCHAR) | [
{
"from": "user",
"value": "显示由临时代理值为“是”的负责人所管理的部门的员工姓名和数目?"
},
{
"from": "assistant",
"value": "SELECT T1.name , T1.num_employees FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id WHERE T2.temporary_acting = '是'"
}
] |
CREATE TABLE management (temporary_acting VARCHAR) | [
{
"from": "user",
"value": "有多少个代理状态?"
},
{
"from": "assistant",
"value": "SELECT count(DISTINCT temporary_acting) FROM management"
}
] |
CREATE TABLE department (department_id VARCHAR), CREATE TABLE management (department_id VARCHAR) | [
{
"from": "user",
"value": "有多少部门由没有提到的负责人领导?"
},
{
"from": "assistant",
"value": "SELECT count(*) FROM department WHERE department_id NOT IN (SELECT department_id FROM management);"
}
] |
CREATE TABLE management (head_id VARCHAR, temporary_acting VARCHAR), CREATE TABLE head (head_id VARCHAR, age VARCHAR) | [
{
"from": "user",
"value": "那些正在代理的负责人有哪些不同的年龄?"
},
{
"from": "assistant",
"value": "SELECT DISTINCT T1.age FROM management AS T2 JOIN head AS T1 ON T1.head_id = T2.head_id WHERE T2.temporary_acting = '是'"
}
] |
CREATE TABLE department (name VARCHAR, department_id VARCHAR), CREATE TABLE management (head_id VARCHAR, department_id VARCHAR), CREATE TABLE head (head_id VARCHAR, born_state VARCHAR) | [
{
"from": "user",
"value": "列出“财政部”部门秘书和“国土安全部”秘书出生的州。"
},
{
"from": "assistant",
"value": "SELECT T3.born_state FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id JOIN head AS T3 ON T2.head_id = T3.head_id WHERE T1.name = '财政部' INTERSECT SELECT T3.born_state FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id JOIN head AS T3 ON T2.head_id = T3.head_id WHERE T1.name = '国土安全部'"
}
] |
CREATE TABLE management (department_id VARCHAR), CREATE TABLE department (name VARCHAR, department_id VARCHAR) | [
{
"from": "user",
"value": "哪个部门有不止一个负责人?列出ID、姓名和人数。"
},
{
"from": "assistant",
"value": "SELECT T1.department_id , T1.name , count(*) FROM management AS T2 JOIN department AS T1 ON T1.department_id = T2.department_id GROUP BY T1.department_id HAVING count(*) > 1"
}
] |
CREATE TABLE head (head_id VARCHAR, name VARCHAR) | [
{
"from": "user",
"value": "哪个负责人的名字有“强”这个子串?列出ID和姓名。"
},
{
"from": "assistant",
"value": "SELECT head_id , name FROM head WHERE name LIKE '强'"
}
] |
CREATE TABLE farm (Id VARCHAR) | [
{
"from": "user",
"value": "那里有多少个农场?"
},
{
"from": "assistant",
"value": "SELECT count(*) FROM farm"
}
] |
CREATE TABLE farm (Id VARCHAR) | [
{
"from": "user",
"value": "计算农场的数量。"
},
{
"from": "assistant",
"value": "SELECT count(*) FROM farm"
}
] |
CREATE TABLE farm (Total_Horses VARCHAR) | [
{
"from": "user",
"value": "按升序列出农场里的马的总数。"
},
{
"from": "assistant",
"value": "SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC"
}
] |
CREATE TABLE farm (Total_Horses VARCHAR) | [
{
"from": "user",
"value": "按照升序排列,每一个农场的马的总数是什么?"
},
{
"from": "assistant",
"value": "SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC"
}
] |
CREATE TABLE farm_competition (Theme VARCHAR, Hosts VARCHAR) | [
{
"from": "user",
"value": "什么主持人所主持比赛的主题不是“外星人”?"
},
{
"from": "assistant",
"value": "SELECT Hosts FROM farm_competition WHERE Theme != '外星人'"
}
] |
CREATE TABLE farm_competition (Theme VARCHAR, Hosts VARCHAR) | [
{
"from": "user",
"value": "返回主题不是“外星人”的竞赛的主持人?"
},
{
"from": "assistant",
"value": "SELECT Hosts FROM farm_competition WHERE Theme != '外星人'"
}
] |
CREATE TABLE farm_competition (Theme VARCHAR, YEAR VARCHAR) | [
{
"from": "user",
"value": "按年份排序的农场比赛的主题是什么?"
},
{
"from": "assistant",
"value": "SELECT Theme FROM farm_competition ORDER BY YEAR ASC"
}
] |
CREATE TABLE farm_competition (Theme VARCHAR, YEAR VARCHAR) | [
{
"from": "user",
"value": "返回农场比赛的主题,按年份排序。"
},
{
"from": "assistant",
"value": "SELECT Theme FROM farm_competition ORDER BY YEAR ASC"
}
] |
CREATE TABLE farm (Total_Horses INTEGER, Working_Horses INTEGER) | [
{
"from": "user",
"value": "拥有超过5000匹马的农场中,平均的工作马的数量是多少?"
},
{
"from": "assistant",
"value": "SELECT avg(Working_Horses) FROM farm WHERE Total_Horses > 5000"
}
] |
CREATE TABLE farm (Total_Horses INTEGER, Working_Horses INTEGER) | [
{
"from": "user",
"value": "给出有5000多匹马的农场的平均工作马的数量。"
},
{
"from": "assistant",
"value": "SELECT avg(Working_Horses) FROM farm WHERE Total_Horses > 5000"
}
] |
CREATE TABLE farm (Cows INTEGER) | [
{
"from": "user",
"value": "所有农场中,奶牛的最大和最小数量是多少?"
},
{
"from": "assistant",
"value": "SELECT max(Cows) , min(Cows) FROM farm"
}
] |
CREATE TABLE farm (Cows INTEGER) | [
{
"from": "user",
"value": "返回所有农场奶牛的最大和最小数量。"
},
{
"from": "assistant",
"value": "SELECT max(Cows) , min(Cows) FROM farm"
}
] |
CREATE TABLE city (Status VARCHAR) | [
{
"from": "user",
"value": "城市有多少种不同的地位?"
},
{
"from": "assistant",
"value": "SELECT count(DISTINCT Status) FROM city"
}
] |
CREATE TABLE city (Status VARCHAR) | [
{
"from": "user",
"value": "统计不同地位的数量。"
},
{
"from": "assistant",
"value": "SELECT count(DISTINCT Status) FROM city"
}
] |
CREATE TABLE city (Population VARCHAR, Official_Name VARCHAR) | [
{
"from": "user",
"value": "按人口降序列出城市的官方名称。"
},
{
"from": "assistant",
"value": "SELECT Official_Name FROM city ORDER BY Population DESC"
}
] |
CREATE TABLE city (Population VARCHAR, Official_Name VARCHAR) | [
{
"from": "user",
"value": "按人口降序排列的城市的官方名称是什么?"
},
{
"from": "assistant",
"value": "SELECT Official_Name FROM city ORDER BY Population DESC"
}
] |
CREATE TABLE city (Status VARCHAR, Population VARCHAR, Official_Name VARCHAR) | [
{
"from": "user",
"value": "列出人口最多的城市的官方名称和状态。"
},
{
"from": "assistant",
"value": "SELECT Official_Name , Status FROM city ORDER BY Population DESC LIMIT 1"
}
] |
CREATE TABLE city (Status VARCHAR, Population VARCHAR, Official_Name VARCHAR) | [
{
"from": "user",
"value": "居住人数最多的城市的官方名称和状态是什么?"
},
{
"from": "assistant",
"value": "SELECT Official_Name , Status FROM city ORDER BY Population DESC LIMIT 1"
}
] |
CREATE TABLE city (City_ID VARCHAR, Official_Name VARCHAR), CREATE TABLE farm_competition (Year VARCHAR, Host_city_ID VARCHAR) | [
{
"from": "user",
"value": "展示主办比赛城市的年份和正式名称。"
},
{
"from": "assistant",
"value": "SELECT T2.Year , T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID"
}
] |
CREATE TABLE city (City_ID VARCHAR, Official_Name VARCHAR), CREATE TABLE farm_competition (Year VARCHAR, Host_city_ID VARCHAR) | [
{
"from": "user",
"value": "给出每个竞赛的城市的年份和官方名称。"
},
{
"from": "assistant",
"value": "SELECT T2.Year , T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID"
}
] |
CREATE TABLE city (City_ID VARCHAR, Official_Name VARCHAR), CREATE TABLE farm_competition (Host_city_ID VARCHAR) | [
{
"from": "user",
"value": "展示举办了不止一次比赛的城市的官方名称。"
},
{
"from": "assistant",
"value": "SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID HAVING COUNT(*) > 1"
}
] |
CREATE TABLE city (City_ID VARCHAR, Official_Name VARCHAR), CREATE TABLE farm_competition (Host_city_ID VARCHAR) | [
{
"from": "user",
"value": "举办了不止一次比赛的城市的官方名称是什么?"
},
{
"from": "assistant",
"value": "SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID HAVING COUNT(*) > 1"
}
] |
CREATE TABLE city (Status VARCHAR, City_ID VARCHAR), CREATE TABLE farm_competition (Host_city_ID VARCHAR) | [
{
"from": "user",
"value": "展示主办城市数量最多的城市的状态。"
},
{
"from": "assistant",
"value": "SELECT T1.Status FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID ORDER BY COUNT(*) DESC LIMIT 1"
}
] |
CREATE TABLE city (Status VARCHAR, City_ID VARCHAR), CREATE TABLE farm_competition (Host_city_ID VARCHAR) | [
{
"from": "user",
"value": "主办过最多比赛的城市的状态如何?"
},
{
"from": "assistant",
"value": "SELECT T1.Status FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID ORDER BY COUNT(*) DESC LIMIT 1"
}
] |
CREATE TABLE city (Population INTEGER, City_ID VARCHAR), CREATE TABLE farm_competition (Theme VARCHAR, Host_city_ID VARCHAR) | [
{
"from": "user",
"value": "请显示拥有超过1000人的主办城市的比赛主题。"
},
{
"from": "assistant",
"value": "SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000"
}
] |
CREATE TABLE city (Population INTEGER, City_ID VARCHAR), CREATE TABLE farm_competition (Theme VARCHAR, Host_city_ID VARCHAR) | [
{
"from": "user",
"value": "有超过1000居民的主办城市的比赛主题是什么?"
},
{
"from": "assistant",
"value": "SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000"
}
] |
CREATE TABLE city (Status VARCHAR, Population INTEGER) | [
{
"from": "user",
"value": "请显示不同城市的地位和各个地位的城市平均人口。"
},
{
"from": "assistant",
"value": "SELECT Status , avg(Population) FROM city GROUP BY Status"
}
] |
CREATE TABLE city (Status VARCHAR, Population INTEGER) | [
{
"from": "user",
"value": "每个城市的状态和平均人口是多少?"
},
{
"from": "assistant",
"value": "SELECT Status , avg(Population) FROM city GROUP BY Status"
}
] |
CREATE TABLE city (Status VARCHAR) | [
{
"from": "user",
"value": "请按每个状态的城市的数量排列,显示不同的状态。"
},
{
"from": "assistant",
"value": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC"
}
] |
CREATE TABLE city (Status VARCHAR) | [
{
"from": "user",
"value": "返回城市的不同状态,按频率递增排序。"
},
{
"from": "assistant",
"value": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC"
}
] |
CREATE TABLE city (Status VARCHAR) | [
{
"from": "user",
"value": "列出城市中最常见的一种状态。"
},
{
"from": "assistant",
"value": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1"
}
] |
CREATE TABLE city (Status VARCHAR) | [
{
"from": "user",
"value": "在所有城市中最常见的状态是什么?"
},
{
"from": "assistant",
"value": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1"
}
] |
CREATE TABLE city (City_ID VARCHAR, Official_Name VARCHAR, Host_city_ID VARCHAR), CREATE TABLE farm_competition (City_ID VARCHAR, Official_Name VARCHAR, Host_city_ID VARCHAR) | [
{
"from": "user",
"value": "列出没有比赛的城市的官方名称。"
},
{
"from": "assistant",
"value": "SELECT Official_Name FROM city WHERE City_ID NOT IN (SELECT Host_city_ID FROM farm_competition)"
}
] |
CREATE TABLE city (City_ID VARCHAR, Official_Name VARCHAR, Host_city_ID VARCHAR), CREATE TABLE farm_competition (City_ID VARCHAR, Official_Name VARCHAR, Host_city_ID VARCHAR) | [
{
"from": "user",
"value": "没有举办过农场比赛的城市的官方名称是什么?"
},
{
"from": "assistant",
"value": "SELECT Official_Name FROM city WHERE City_ID NOT IN (SELECT Host_city_ID FROM farm_competition)"
}
] |
CREATE TABLE city (Status VARCHAR, Population INTEGER) | [
{
"from": "user",
"value": "显示人口大于1500和小于500的城市的状态。"
},
{
"from": "assistant",
"value": "SELECT Status FROM city WHERE Population > 1500 INTERSECT SELECT Status FROM city WHERE Population < 500"
}
] |
CREATE TABLE city (Status VARCHAR, Population INTEGER) | [
{
"from": "user",
"value": "人口超过1500的城市和人口低于500的城市,其状态分别是什么?"
},
{
"from": "assistant",
"value": "SELECT Status FROM city WHERE Population > 1500 INTERSECT SELECT Status FROM city WHERE Population < 500"
}
] |
CREATE TABLE city (Population INTEGER, Official_Name VARCHAR) | [
{
"from": "user",
"value": "查找人口大于1500或小于500的城市的官方名称。"
},
{
"from": "assistant",
"value": "SELECT Official_Name FROM city WHERE Population > 1500 OR Population < 500"
}
] |
CREATE TABLE city (Population INTEGER, Official_Name VARCHAR) | [
{
"from": "user",
"value": "人口超过1500或少于500的城市的官方名称是什么?"
},
{
"from": "assistant",
"value": "SELECT Official_Name FROM city WHERE Population > 1500 OR Population < 500"
}
] |
CREATE TABLE city (Status VARCHAR, Census_Ranking VARCHAR) | [
{
"from": "user",
"value": "显示不属于“乡村”的城市的人口普查排名。"
},
{
"from": "assistant",
"value": "SELECT Census_Ranking FROM city WHERE Status != \"乡村\""
}
] |
CREATE TABLE city (Status VARCHAR, Census_Ranking VARCHAR) | [
{
"from": "user",
"value": "没有“乡村”状态的城市的人口普查排名是多少?"
},
{
"from": "assistant",
"value": "SELECT Census_Ranking FROM city WHERE Status != \"乡村\""
}
] |
CREATE TABLE courses (course_id VARCHAR, course_name VARCHAR), CREATE TABLE student_course_registrations (course_Id VARCHAR) | [
{
"from": "user",
"value": "注册学生最多的是哪门课程?"
},
{
"from": "assistant",
"value": "SELECT T1.course_name FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_Id GROUP BY T1.course_id ORDER BY count(*) DESC LIMIT 1"
}
] |
CREATE TABLE courses (course_id VARCHAR, course_name VARCHAR), CREATE TABLE student_course_registrations (course_Id VARCHAR) | [
{
"from": "user",
"value": "最多注册学生的课程名称是什么?"
},
{
"from": "assistant",
"value": "SELECT T1.course_name FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_Id GROUP BY T1.course_id ORDER BY count(*) DESC LIMIT 1"
}
] |
CREATE TABLE student_course_registrations (student_id VARCHAR) | [
{
"from": "user",
"value": "注册一些课程但注册课程最少的学生的ID是什么?"
},
{
"from": "assistant",
"value": "SELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY count(*) LIMIT 1"
}
] |
CREATE TABLE student_course_registrations (student_id VARCHAR) | [
{
"from": "user",
"value": "注册课程数量最少但是注册了一些课程的学生的ID是什么?"
},
{
"from": "assistant",
"value": "SELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY count(*) LIMIT 1"
}
] |
CREATE TABLE candidates (candidate_id VARCHAR), CREATE TABLE people (last_name VARCHAR, first_name VARCHAR, person_id VARCHAR) | [
{
"from": "user",
"value": "所有候选人的名字和姓氏是什么?"
},
{
"from": "assistant",
"value": "SELECT T2.first_name , T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id"
}
] |
CREATE TABLE candidates (candidate_id VARCHAR), CREATE TABLE people (last_name VARCHAR, first_name VARCHAR, person_id VARCHAR) | [
{
"from": "user",
"value": "所有候选人的名字和姓氏是什么?"
},
{
"from": "assistant",
"value": "SELECT T2.first_name , T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id"
}
] |
CREATE TABLE students (student_id VARCHAR), CREATE TABLE student_course_attendance (student_id VARCHAR) | [
{
"from": "user",
"value": "列出从不上课的学生的ID?"
},
{
"from": "assistant",
"value": "SELECT student_id FROM students WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance)"
}
] |
CREATE TABLE students (student_id VARCHAR), CREATE TABLE student_course_attendance (student_id VARCHAR) | [
{
"from": "user",
"value": "每一个从未上过课的学生的ID是什么?"
},
{
"from": "assistant",
"value": "SELECT student_id FROM students WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance)"
}
] |
CREATE TABLE student_course_attendance (student_id VARCHAR) | [
{
"from": "user",
"value": "列出参加过一些课程的学生的ID?"
},
{
"from": "assistant",
"value": "SELECT student_id FROM student_course_attendance"
}
] |
CREATE TABLE student_course_attendance (student_id VARCHAR) | [
{
"from": "user",
"value": "所有参加过至少一门课程的学生的ID是什么?"
},
{
"from": "assistant",
"value": "SELECT student_id FROM student_course_attendance"
}
] |
CREATE TABLE student_course_registrations (course_id VARCHAR, student_id VARCHAR), CREATE TABLE courses (course_id VARCHAR, course_name VARCHAR) | [
{
"from": "user",
"value": "所有上课学生ID是什么?这些课程的名称是什么?"
},
{
"from": "assistant",
"value": "SELECT T1.student_id , T2.course_name FROM student_course_registrations AS T1 JOIN courses AS T2 ON T1.course_id = T2.course_id"
}
] |
CREATE TABLE student_course_registrations (registration_date VARCHAR, student_id VARCHAR), CREATE TABLE students (student_id VARCHAR, student_details VARCHAR) | [
{
"from": "user",
"value": "最近注册课程的学生的具体信息是什么?"
},
{
"from": "assistant",
"value": "SELECT T2.student_details FROM student_course_registrations AS T1 JOIN students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.registration_date DESC LIMIT 1"
}
] |
CREATE TABLE student_course_registrations (registration_date VARCHAR, student_id VARCHAR), CREATE TABLE students (student_id VARCHAR, student_details VARCHAR) | [
{
"from": "user",
"value": "关于最近注册课程的学生,我们有哪些信息?"
},
{
"from": "assistant",
"value": "SELECT T2.student_details FROM student_course_registrations AS T1 JOIN students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.registration_date DESC LIMIT 1"
}
] |
CREATE TABLE courses (course_id VARCHAR, course_name VARCHAR), CREATE TABLE student_course_attendance (course_id VARCHAR) | [
{
"from": "user",
"value": "有多少学生参加英语课程?"
},
{
"from": "assistant",
"value": "SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"英语\""
}
] |
CREATE TABLE courses (course_id VARCHAR, course_name VARCHAR), CREATE TABLE student_course_attendance (course_id VARCHAR) | [
{
"from": "user",
"value": "参加英语课程的有多少学生?"
},
{
"from": "assistant",
"value": "SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"英语\""
}
] |
CREATE TABLE courses (course_id VARCHAR), CREATE TABLE student_course_attendance (course_id VARCHAR, student_id VARCHAR) | [
{
"from": "user",
"value": "ID为171的学生参加了多少门课程?"
},
{
"from": "assistant",
"value": "SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171"
}
] |
CREATE TABLE courses (course_id VARCHAR), CREATE TABLE student_course_attendance (course_id VARCHAR, student_id VARCHAR) | [
{
"from": "user",
"value": "ID 171的学生实际参加了多少门课程?"
},
{
"from": "assistant",
"value": "SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171"
}
] |
CREATE TABLE people (person_id VARCHAR, email_address VARCHAR), CREATE TABLE candidates (candidate_id VARCHAR) | [
{
"from": "user",
"value": "找到电子邮箱为“stanley.monahan@example.org”的候选人的ID。"
},
{
"from": "assistant",
"value": "SELECT T2.candidate_id FROM people AS T1 JOIN candidates AS T2 ON T1.person_id = T2.candidate_id WHERE T1.email_address = \"stanley.monahan@example.org\""
}
] |
CREATE TABLE people (person_id VARCHAR, email_address VARCHAR), CREATE TABLE candidates (candidate_id VARCHAR) | [
{
"from": "user",
"value": "候选人的ID是什么,他的电子邮件是“stanley.monahan@example.org”?"
},
{
"from": "assistant",
"value": "SELECT T2.candidate_id FROM people AS T1 JOIN candidates AS T2 ON T1.person_id = T2.candidate_id WHERE T1.email_address = \"stanley.monahan@example.org\""
}
] |
CREATE TABLE candidate_assessments (assessment_date VARCHAR, candidate_id VARCHAR) | [
{
"from": "user",
"value": "找到最近访问课程的候选人的ID?"
},
{
"from": "assistant",
"value": "SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1"
}
] |
CREATE TABLE candidate_assessments (assessment_date VARCHAR, candidate_id VARCHAR) | [
{
"from": "user",
"value": "最近访问课程的候选人的ID是什么?"
},
{
"from": "assistant",
"value": "SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1"
}
] |
CREATE TABLE students (student_id VARCHAR, student_details VARCHAR), CREATE TABLE student_course_registrations (student_id VARCHAR) | [
{
"from": "user",
"value": "注册最多课程的学生的具体信息是什么?"
},
{
"from": "assistant",
"value": "SELECT T1.student_details FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1"
}
] |
CREATE TABLE students (student_id VARCHAR, student_details VARCHAR), CREATE TABLE student_course_registrations (student_id VARCHAR) | [
{
"from": "user",
"value": "注册课程最多的学生的详细情况是什么?"
},
{
"from": "assistant",
"value": "SELECT T1.student_details FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1"
}
] |
CREATE TABLE students (student_id VARCHAR), CREATE TABLE student_course_registrations (student_id VARCHAR) | [
{
"from": "user",
"value": "列出注册一些课程的学生的ID和注册课程的数量?"
},
{
"from": "assistant",
"value": "SELECT T1.student_id , count(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id"
}
] |
CREATE TABLE students (student_id VARCHAR), CREATE TABLE student_course_registrations (student_id VARCHAR) | [
{
"from": "user",
"value": "对于每个注册了某些课程的学生,他们注册了多少课程?"
},
{
"from": "assistant",
"value": "SELECT T1.student_id , count(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id"
}
] |
CREATE TABLE students (student_id VARCHAR), CREATE TABLE student_course_registrations (course_id VARCHAR, student_id VARCHAR), CREATE TABLE courses (course_id VARCHAR, course_name VARCHAR) | [
{
"from": "user",
"value": "每门课程有多少注册学生?列出课程名称和注册的学生人数?"
},
{
"from": "assistant",
"value": "SELECT T3.course_name , count(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id JOIN courses AS T3 ON T2.course_id = T3.course_id GROUP BY T2.course_id"
}
] |
CREATE TABLE students (student_id VARCHAR), CREATE TABLE student_course_registrations (course_id VARCHAR, student_id VARCHAR), CREATE TABLE courses (course_id VARCHAR, course_name VARCHAR) | [
{
"from": "user",
"value": "对于每个课程ID,注册了多少学生,课程名称是什么?"
},
{
"from": "assistant",
"value": "SELECT T3.course_name , count(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id JOIN courses AS T3 ON T2.course_id = T3.course_id GROUP BY T2.course_id"
}
] |
CREATE TABLE candidate_assessments (candidate_id VARCHAR, asessment_outcome_code VARCHAR) | [
{
"from": "user",
"value": "找到评估码为“通过”的候选人ID?"
},
{
"from": "assistant",
"value": "SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = \"通过\""
}
] |
CREATE TABLE candidate_assessments (candidate_id VARCHAR, asessment_outcome_code VARCHAR) | [
{
"from": "user",
"value": "成绩代码为及格的候选人的ID是什么?"
},
{
"from": "assistant",
"value": "SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = \"通过\""
}
] |
CREATE TABLE candidates (candidate_id VARCHAR), CREATE TABLE candidate_assessments (candidate_id VARCHAR, asessment_outcome_code VARCHAR), CREATE TABLE people (cell_mobile_number VARCHAR, person_id VARCHAR) | [
{
"from": "user",
"value": "查找评估代码是“失败”的考生的手机号码?"
},
{
"from": "assistant",
"value": "SELECT T3.cell_mobile_number FROM candidates AS T1 JOIN candidate_assessments AS T2 ON T1.candidate_id = T2.candidate_id JOIN people AS T3 ON T1.candidate_id = T3.person_id WHERE T2.asessment_outcome_code = \"失败\""
}
] |
CREATE TABLE candidates (candidate_id VARCHAR), CREATE TABLE candidate_assessments (candidate_id VARCHAR, asessment_outcome_code VARCHAR), CREATE TABLE people (cell_mobile_number VARCHAR, person_id VARCHAR) | [
{
"from": "user",
"value": "收到“失败”评估码的候选人的手机号码是多少?"
},
{
"from": "assistant",
"value": "SELECT T3.cell_mobile_number FROM candidates AS T1 JOIN candidate_assessments AS T2 ON T1.candidate_id = T2.candidate_id JOIN people AS T3 ON T1.candidate_id = T3.person_id WHERE T2.asessment_outcome_code = \"失败\""
}
] |
CREATE TABLE student_course_attendance (course_id VARCHAR, student_id VARCHAR) | [
{
"from": "user",
"value": "那些注册301课程的学生的ID是什么?"
},
{
"from": "assistant",
"value": "SELECT student_id FROM student_course_attendance WHERE course_id = 301"
}
] |
CREATE TABLE student_course_attendance (course_id VARCHAR, student_id VARCHAR) | [
{
"from": "user",
"value": "注册301课程的学生的ID是什么?"
},
{
"from": "assistant",
"value": "SELECT student_id FROM student_course_attendance WHERE course_id = 301"
}
] |
CREATE TABLE student_course_attendance (course_id VARCHAR, student_id VARCHAR, date_of_attendance VARCHAR) | [
{
"from": "user",
"value": "最近注册301课程的学生的ID是什么?"
},
{
"from": "assistant",
"value": "SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1"
}
] |
CREATE TABLE student_course_attendance (course_id VARCHAR, student_id VARCHAR, date_of_attendance VARCHAR) | [
{
"from": "user",
"value": "对于最近注册301课程的学生,他们的ID是什么?"
},
{
"from": "assistant",
"value": "SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1"
}
] |
CREATE TABLE addresses (address_id VARCHAR, city VARCHAR), CREATE TABLE people_addresses (address_id VARCHAR) | [
{
"from": "user",
"value": "找到人的地址的不同城市?"
},
{
"from": "assistant",
"value": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id"
}
] |
CREATE TABLE addresses (address_id VARCHAR, city VARCHAR), CREATE TABLE people_addresses (address_id VARCHAR) | [
{
"from": "user",
"value": "人们居住的不同城市有哪些?"
},
{
"from": "assistant",
"value": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id"
}
] |
CREATE TABLE addresses (address_id VARCHAR, city VARCHAR), CREATE TABLE people_addresses (address_id VARCHAR, person_id VARCHAR), CREATE TABLE students (student_id VARCHAR) | [
{
"from": "user",
"value": "找出学生地址的不同城市?"
},
{
"from": "assistant",
"value": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id JOIN students AS T3 ON T2.person_id = T3.student_id"
}
] |
CREATE TABLE addresses (address_id VARCHAR, city VARCHAR), CREATE TABLE people_addresses (address_id VARCHAR, person_id VARCHAR), CREATE TABLE students (student_id VARCHAR) | [
{
"from": "user",
"value": "学生居住的不同城市有哪些?"
},
{
"from": "assistant",
"value": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id JOIN students AS T3 ON T2.person_id = T3.student_id"
}
] |
CREATE TABLE courses (course_name VARCHAR) | [
{
"from": "user",
"value": "按字母顺序列出课程名称?"
},
{
"from": "assistant",
"value": "SELECT course_name FROM courses ORDER BY course_name"
}
] |
CREATE TABLE courses (course_name VARCHAR) | [
{
"from": "user",
"value": "按字母顺序排列的课程名称是什么?"
},
{
"from": "assistant",
"value": "SELECT course_name FROM courses ORDER BY course_name"
}
] |
CREATE TABLE people (first_name VARCHAR) | [
{
"from": "user",
"value": "按字母顺序列出人的名字?"
},
{
"from": "assistant",
"value": "SELECT first_name FROM people ORDER BY first_name"
}
] |
CREATE TABLE people (first_name VARCHAR) | [
{
"from": "user",
"value": "按字母顺序排列的人的名字是什么?"
},
{
"from": "assistant",
"value": "SELECT first_name FROM people ORDER BY first_name"
}
] |
CREATE TABLE student_course_registrations (student_id VARCHAR), CREATE TABLE student_course_attendance (student_id VARCHAR) | [
{
"from": "user",
"value": "注册课程或参加课程的学生的ID是什么?"
},
{
"from": "assistant",
"value": "SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance"
}
] |