context
stringlengths 28
393
| answer
stringlengths 17
532
| question
stringlengths 5
112
|
---|---|---|
CREATE TABLE head (age INTEGER) | SELECT COUNT(*) FROM head WHERE age > 56 | 部门中有多少人年龄大于56岁? |
CREATE TABLE head (age VARCHAR, name VARCHAR, born_state VARCHAR) | SELECT name, born_state, age FROM head ORDER BY age | 列出按年龄排序的部门负责人的姓名、出生地和年龄。 |
CREATE TABLE department (name VARCHAR, budget_in_billions VARCHAR, creation VARCHAR) | SELECT creation, name, budget_in_billions FROM department | 列出每个部门的创建年份、名称和预算。 |
CREATE TABLE department (budget_in_billions INTEGER) | SELECT MAX(budget_in_billions), MIN(budget_in_billions) FROM department | 部门的最高预算和最低预算是多少? |
CREATE TABLE department (num_employees INTEGER, ranking INTEGER) | SELECT AVG(num_employees) FROM department WHERE ranking BETWEEN 10 AND 15 | 排名在10到15之间的部门的平均雇员人数是多少? |
CREATE TABLE head (name VARCHAR, born_state VARCHAR) | SELECT name FROM head WHERE born_state <> '浙江' | 出生在“浙江”州以外的人的名字是什么? |
CREATE TABLE department (department_id VARCHAR, creation VARCHAR), CREATE TABLE management (department_id VARCHAR, head_id VARCHAR), CREATE TABLE head (head_id VARCHAR, born_state VARCHAR) | 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) | SELECT born_state FROM head GROUP BY born_state HAVING COUNT(*) >= 3 | 至少有3个负责人出生的州的名字是什么? |
CREATE TABLE department (creation VARCHAR) | SELECT creation FROM department GROUP BY creation ORDER BY COUNT(*) DESC LIMIT 1 | 大多数部门在哪一年成立? |
CREATE TABLE department (department_id VARCHAR, num_employees VARCHAR, name VARCHAR), CREATE TABLE management (department_id VARCHAR, temporary_acting VARCHAR) | 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) | SELECT COUNT(DISTINCT temporary_acting) FROM management | 有多少个代理状态? |
CREATE TABLE department (department_id VARCHAR), CREATE TABLE management (department_id VARCHAR) | SELECT COUNT(*) FROM department WHERE NOT department_id IN (SELECT department_id FROM management) | 有多少部门由没有提到的负责人领导? |
CREATE TABLE management (head_id VARCHAR, temporary_acting VARCHAR), CREATE TABLE head (age VARCHAR, head_id VARCHAR) | 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 (department_id VARCHAR, name VARCHAR), CREATE TABLE management (department_id VARCHAR, head_id VARCHAR), CREATE TABLE head (head_id VARCHAR, born_state VARCHAR) | 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 (department_id VARCHAR, name VARCHAR) | 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 | 哪个部门有不止一个负责人?列出ID、姓名和人数。 |
CREATE TABLE head (head_id VARCHAR, name VARCHAR) | SELECT head_id, name FROM head WHERE name LIKE '强' | 哪个负责人的名字有“强”这个子串?列出ID和姓名。 |
CREATE TABLE farm (Id VARCHAR) | SELECT COUNT(*) FROM farm | 那里有多少个农场? |
CREATE TABLE farm (Id VARCHAR) | SELECT COUNT(*) FROM farm | 计算农场的数量。 |
CREATE TABLE farm (Total_Horses VARCHAR) | SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC | 按升序列出农场里的马的总数。 |
CREATE TABLE farm (Total_Horses VARCHAR) | SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC | 按照升序排列,每一个农场的马的总数是什么? |
CREATE TABLE farm_competition (Hosts VARCHAR, Theme VARCHAR) | SELECT Hosts FROM farm_competition WHERE Theme <> '外星人' | 什么主持人所主持比赛的主题不是“外星人”? |
CREATE TABLE farm_competition (Hosts VARCHAR, Theme VARCHAR) | SELECT Hosts FROM farm_competition WHERE Theme <> '外星人' | 返回主题不是“外星人”的竞赛的主持人? |
CREATE TABLE farm_competition (Theme VARCHAR, YEAR VARCHAR) | SELECT Theme FROM farm_competition ORDER BY YEAR ASC | 按年份排序的农场比赛的主题是什么? |
CREATE TABLE farm_competition (Theme VARCHAR, YEAR VARCHAR) | SELECT Theme FROM farm_competition ORDER BY YEAR ASC | 返回农场比赛的主题,按年份排序。 |
CREATE TABLE farm (Total_Horses INTEGER, Working_Horses INTEGER) | SELECT AVG(Working_Horses) FROM farm WHERE Total_Horses > 5000 | 拥有超过5000匹马的农场中,平均的工作马的数量是多少? |
CREATE TABLE farm (Total_Horses INTEGER, Working_Horses INTEGER) | SELECT AVG(Working_Horses) FROM farm WHERE Total_Horses > 5000 | 给出有5000多匹马的农场的平均工作马的数量。 |
CREATE TABLE farm (Cows INTEGER) | SELECT MAX(Cows), MIN(Cows) FROM farm | 所有农场中,奶牛的最大和最小数量是多少? |
CREATE TABLE farm (Cows INTEGER) | SELECT MAX(Cows), MIN(Cows) FROM farm | 返回所有农场奶牛的最大和最小数量。 |
CREATE TABLE city (Status VARCHAR) | SELECT COUNT(DISTINCT Status) FROM city | 城市有多少种不同的地位? |
CREATE TABLE city (Status VARCHAR) | SELECT COUNT(DISTINCT Status) FROM city | 统计不同地位的数量。 |
CREATE TABLE city (Official_Name VARCHAR, Population VARCHAR) | SELECT Official_Name FROM city ORDER BY Population DESC | 按人口降序列出城市的官方名称。 |
CREATE TABLE city (Official_Name VARCHAR, Population VARCHAR) | SELECT Official_Name FROM city ORDER BY Population DESC | 按人口降序排列的城市的官方名称是什么? |
CREATE TABLE city (Official_Name VARCHAR, Population VARCHAR, Status VARCHAR) | SELECT Official_Name, Status FROM city ORDER BY Population DESC LIMIT 1 | 列出人口最多的城市的官方名称和状态。 |
CREATE TABLE city (Official_Name VARCHAR, Population VARCHAR, Status VARCHAR) | 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 (Host_city_ID VARCHAR, Year VARCHAR) | 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, Year VARCHAR) | 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) | 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) | 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, Status VARCHAR), CREATE TABLE farm_competition (Host_city_ID VARCHAR) | 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 (City_ID VARCHAR, Status VARCHAR), CREATE TABLE farm_competition (Host_city_ID VARCHAR) | 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 (City_ID VARCHAR, Population INTEGER), CREATE TABLE farm_competition (Host_city_ID VARCHAR, Theme VARCHAR) | SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000 | 请显示拥有超过1000人的主办城市的比赛主题。 |
CREATE TABLE city (City_ID VARCHAR, Population INTEGER), CREATE TABLE farm_competition (Host_city_ID VARCHAR, Theme VARCHAR) | SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000 | 有超过1000居民的主办城市的比赛主题是什么? |
CREATE TABLE city (Population INTEGER, Status VARCHAR) | SELECT Status, AVG(Population) FROM city GROUP BY Status | 请显示不同城市的地位和各个地位的城市平均人口。 |
CREATE TABLE city (Population INTEGER, Status VARCHAR) | SELECT Status, AVG(Population) FROM city GROUP BY Status | 每个城市的状态和平均人口是多少? |
CREATE TABLE city (Status VARCHAR) | SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC | 请按每个状态的城市的数量排列,显示不同的状态。 |
CREATE TABLE city (Status VARCHAR) | SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC | 返回城市的不同状态,按频率递增排序。 |
CREATE TABLE city (Status VARCHAR) | SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1 | 列出城市中最常见的一种状态。 |
CREATE TABLE city (Status VARCHAR) | 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) | SELECT Official_Name FROM city WHERE NOT City_ID 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) | SELECT Official_Name FROM city WHERE NOT City_ID IN (SELECT Host_city_ID FROM farm_competition) | 没有举办过农场比赛的城市的官方名称是什么? |
CREATE TABLE city (Population INTEGER, Status VARCHAR) | SELECT Status FROM city WHERE Population > 1500 INTERSECT SELECT Status FROM city WHERE Population < 500 | 显示人口大于1500和小于500的城市的状态。 |
CREATE TABLE city (Population INTEGER, Status VARCHAR) | SELECT Status FROM city WHERE Population > 1500 INTERSECT SELECT Status FROM city WHERE Population < 500 | 人口超过1500的城市和人口低于500的城市,其状态分别是什么? |
CREATE TABLE city (Official_Name VARCHAR, Population INTEGER) | SELECT Official_Name FROM city WHERE Population > 1500 OR Population < 500 | 查找人口大于1500或小于500的城市的官方名称。 |
CREATE TABLE city (Official_Name VARCHAR, Population INTEGER) | SELECT Official_Name FROM city WHERE Population > 1500 OR Population < 500 | 人口超过1500或少于500的城市的官方名称是什么? |
CREATE TABLE city (Status VARCHAR, Census_Ranking VARCHAR) | SELECT Census_Ranking FROM city WHERE Status <> "乡村" | 显示不属于“乡村”的城市的人口普查排名。 |
CREATE TABLE city (Status VARCHAR, Census_Ranking VARCHAR) | SELECT Census_Ranking FROM city WHERE Status <> "乡村" | 没有“乡村”状态的城市的人口普查排名是多少? |
CREATE TABLE courses (course_name VARCHAR, course_id VARCHAR), CREATE TABLE student_course_registrations (course_Id VARCHAR) | 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_name VARCHAR, course_id VARCHAR), CREATE TABLE student_course_registrations (course_Id VARCHAR) | 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) | SELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY COUNT(*) LIMIT 1 | 注册一些课程但注册课程最少的学生的ID是什么? |
CREATE TABLE student_course_registrations (student_id VARCHAR) | SELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY COUNT(*) LIMIT 1 | 注册课程数量最少但是注册了一些课程的学生的ID是什么? |
CREATE TABLE candidates (candidate_id VARCHAR), CREATE TABLE people (first_name VARCHAR, last_name VARCHAR, person_id VARCHAR) | 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 (first_name VARCHAR, last_name VARCHAR, person_id VARCHAR) | 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) | SELECT student_id FROM students WHERE NOT student_id IN (SELECT student_id FROM student_course_attendance) | 列出从不上课的学生的ID? |
CREATE TABLE students (student_id VARCHAR), CREATE TABLE student_course_attendance (student_id VARCHAR) | SELECT student_id FROM students WHERE NOT student_id IN (SELECT student_id FROM student_course_attendance) | 每一个从未上过课的学生的ID是什么? |
CREATE TABLE student_course_attendance (student_id VARCHAR) | SELECT student_id FROM student_course_attendance | 列出参加过一些课程的学生的ID? |
CREATE TABLE student_course_attendance (student_id VARCHAR) | SELECT student_id FROM student_course_attendance | 所有参加过至少一门课程的学生的ID是什么? |
CREATE TABLE student_course_registrations (course_id VARCHAR, student_id VARCHAR), CREATE TABLE courses (course_name VARCHAR, course_id VARCHAR) | SELECT T1.student_id, T2.course_name FROM student_course_registrations AS T1 JOIN courses AS T2 ON T1.course_id = T2.course_id | 所有上课学生ID是什么?这些课程的名称是什么? |
CREATE TABLE student_course_registrations (student_id VARCHAR, registration_date VARCHAR), CREATE TABLE students (student_id VARCHAR, student_details VARCHAR) | 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 (student_id VARCHAR, registration_date VARCHAR), CREATE TABLE students (student_id VARCHAR, student_details VARCHAR) | 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_name VARCHAR, course_id VARCHAR), CREATE TABLE student_course_attendance (course_id VARCHAR) | 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_name VARCHAR, course_id VARCHAR), CREATE TABLE student_course_attendance (course_id VARCHAR) | 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) | SELECT COUNT(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171 | ID为171的学生参加了多少门课程? |
CREATE TABLE courses (course_id VARCHAR), CREATE TABLE student_course_attendance (course_id VARCHAR, student_id VARCHAR) | SELECT COUNT(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171 | ID 171的学生实际参加了多少门课程? |
CREATE TABLE people (email_address VARCHAR, person_id VARCHAR), CREATE TABLE candidates (candidate_id VARCHAR) | 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" | 找到电子邮箱为“stanley.monahan@example.org”的候选人的ID。 |
CREATE TABLE people (email_address VARCHAR, person_id VARCHAR), CREATE TABLE candidates (candidate_id VARCHAR) | 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" | 候选人的ID是什么,他的电子邮件是“stanley.monahan@example.org”? |
CREATE TABLE candidate_assessments (assessment_date VARCHAR, candidate_id VARCHAR) | SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1 | 找到最近访问课程的候选人的ID? |
CREATE TABLE candidate_assessments (assessment_date VARCHAR, candidate_id VARCHAR) | SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1 | 最近访问课程的候选人的ID是什么? |
CREATE TABLE students (student_id VARCHAR, student_details VARCHAR), CREATE TABLE student_course_registrations (student_id VARCHAR) | 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) | 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) | 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 | 列出注册一些课程的学生的ID和注册课程的数量? |
CREATE TABLE students (student_id VARCHAR), CREATE TABLE student_course_registrations (student_id VARCHAR) | 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_name VARCHAR, course_id VARCHAR) | 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_name VARCHAR, course_id VARCHAR) | 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 | 对于每个课程ID,注册了多少学生,课程名称是什么? |
CREATE TABLE candidate_assessments (candidate_id VARCHAR, asessment_outcome_code VARCHAR) | SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = "通过" | 找到评估码为“通过”的候选人ID? |
CREATE TABLE candidate_assessments (candidate_id VARCHAR, asessment_outcome_code VARCHAR) | SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = "通过" | 成绩代码为及格的候选人的ID是什么? |
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) | 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) | 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) | SELECT student_id FROM student_course_attendance WHERE course_id = 301 | 那些注册301课程的学生的ID是什么? |
CREATE TABLE student_course_attendance (course_id VARCHAR, student_id VARCHAR) | SELECT student_id FROM student_course_attendance WHERE course_id = 301 | 注册301课程的学生的ID是什么? |
CREATE TABLE student_course_attendance (date_of_attendance VARCHAR, course_id VARCHAR, student_id VARCHAR) | SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1 | 最近注册301课程的学生的ID是什么? |
CREATE TABLE student_course_attendance (date_of_attendance VARCHAR, course_id VARCHAR, student_id VARCHAR) | SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1 | 对于最近注册301课程的学生,他们的ID是什么? |
CREATE TABLE addresses (city VARCHAR, address_id VARCHAR), CREATE TABLE people_addresses (address_id VARCHAR) | SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id | 找到人的地址的不同城市? |
CREATE TABLE addresses (city VARCHAR, address_id VARCHAR), CREATE TABLE people_addresses (address_id VARCHAR) | SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id | 人们居住的不同城市有哪些? |
CREATE TABLE addresses (city VARCHAR, address_id VARCHAR), CREATE TABLE people_addresses (person_id VARCHAR, address_id VARCHAR), CREATE TABLE students (student_id VARCHAR) | 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 (city VARCHAR, address_id VARCHAR), CREATE TABLE people_addresses (person_id VARCHAR, address_id VARCHAR), CREATE TABLE students (student_id VARCHAR) | 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) | SELECT course_name FROM courses ORDER BY course_name | 按字母顺序列出课程名称? |
CREATE TABLE courses (course_name VARCHAR) | SELECT course_name FROM courses ORDER BY course_name | 按字母顺序排列的课程名称是什么? |
CREATE TABLE people (first_name VARCHAR) | SELECT first_name FROM people ORDER BY first_name | 按字母顺序列出人的名字? |
CREATE TABLE people (first_name VARCHAR) | 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) | SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance | 注册课程或参加课程的学生的ID是什么? |