jtjt520j/CSpider_for_Qwen huggingface dataset:
问题: 返回每个医生的名字和他或她治疗的病人的数量。

SQL: SELECT T1.name ,  count(*) FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid  =  T2.PCP GROUP BY T1.employeeid
问题: 找到负责一个以上病人的医生的名字。

SQL: SELECT T1.name FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid  =  T2.PCP GROUP BY T1.employeeid HAVING count(*)  >  1
问题: 哪个医生负责一个以上的病人？给出他们的名字。

SQL: SELECT T1.name FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid  =  T2.PCP GROUP BY T1.employeeid HAVING count(*)  >  1
问题: 找出每个街区楼层的房间数量。

SQL: SELECT count(*) ,  T1.blockfloor FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor  =  T2.blockfloor AND T1.blockcode  =  T2.blockcode GROUP BY T1.blockfloor
问题: 每个楼层有多少个房间？

SQL: SELECT count(*) ,  T1.blockfloor FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor  =  T2.blockfloor AND T1.blockcode  =  T2.blockcode GROUP BY T1.blockfloor
问题: 查找不同区域代码的房间数。

SQL: SELECT count(*) ,  T1.blockcode FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor  =  T2.blockfloor AND T1.blockcode  =  T2.blockcode GROUP BY T1.blockcode
问题: 每个区域代码有多少个房间？

SQL: SELECT count(*) ,  T1.blockcode FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor  =  T2.blockfloor AND T1.blockcode  =  T2.blockcode GROUP BY T1.blockcode
问题: 唯一有可用的房间的区域代码是什么？

SQL: SELECT DISTINCT blockcode FROM room WHERE unavailable  =  0
问题: 给出一些有可用房间的不同的区块代码。

SQL: SELECT DISTINCT blockcode FROM room WHERE unavailable  =  0
问题: 有多少种不同类型的房间？

SQL: SELECT count(DISTINCT roomtype) FROM room
问题: 找到可用的不同房间类型的数量。

SQL: SELECT count(DISTINCT roomtype) FROM room
问题: 开出处方药品“感冒灵”的医生叫什么名字？

SQL: SELECT DISTINCT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.name  =  "感冒灵"
问题: 列出开出处方药品“感冒灵”的医生的名字。

SQL: SELECT DISTINCT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.name  =  "感冒灵"
问题: 找出开出药物的品牌是“X”的医生的名字和位置？

SQL: SELECT DISTINCT T1.name ,  T1.position FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.Brand  =  "X"
问题: 哪些医生开了“X”品牌的药物？给出那些医生的名字和位置。

SQL: SELECT DISTINCT T1.name ,  T1.position FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.Brand  =  "X"
问题: 找出每种牌子可开处方的药品数量。

SQL: SELECT count(*) ,  T1.name FROM medication AS T1 JOIN prescribes AS T2 ON T1.code = T2.medication GROUP BY T1.brand
问题: 每个牌子可开处方的药有多少？

SQL: SELECT count(*) ,  T1.name FROM medication AS T1 JOIN prescribes AS T2 ON T1.code = T2.medication GROUP BY T1.brand
问题: 找出头衔包含“高级”一词的医生的名字。

SQL: SELECT name FROM physician WHERE POSITION LIKE '高级'
问题: 头衔包含“高级”一词的医生的名字是什么？

SQL: SELECT name FROM physician WHERE POSITION LIKE '高级'
问题: 找出最近接受治疗的病人。

SQL: SELECT patient FROM undergoes ORDER BY dateundergoes LIMIT 1
问题: 哪个病人最近正在接受最新的治疗？

SQL: SELECT patient FROM undergoes ORDER BY dateundergoes LIMIT 1
问题: 查找所有正在接受治疗并住在111号房间的患者的姓名。

SQL: SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN patient AS T2 ON T1.patient = T2.SSN JOIN stay AS T3 ON T1.Stay  =  T3.StayID WHERE T3.room  =  111
问题: 住在111号房间并正在接受治疗的病人的名字是什么？

SQL: SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN patient AS T2 ON T1.patient = T2.SSN JOIN stay AS T3 ON T1.Stay  =  T3.StayID WHERE T3.room  =  111
问题: 列出按字母顺序排列的所有护士的名字？

SQL: SELECT DISTINCT name FROM nurse ORDER BY name
问题: 按字母顺序排序的护士名字是什么？

SQL: SELECT DISTINCT name FROM nurse ORDER BY name
问题: 找到护士正在接受治疗的名字。

SQL: SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN nurse AS T2 ON T1.AssistingNurse  =  T2.EmployeeID
问题: 哪些护士负责正在治疗的病人？

SQL: SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN nurse AS T2 ON T1.AssistingNurse  =  T2.EmployeeID
问题: 按字母顺序列出所有不同药物的名称。

SQL: SELECT DISTINCT name FROM medication ORDER BY name
问题: 字母顺序列出的所有不同的药物是什么？

SQL: SELECT DISTINCT name FROM medication ORDER BY name
问题: 处方量最高的医生叫什么名字？

SQL: SELECT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician ORDER BY T2.dose DESC LIMIT 1
问题: 找处处方剂量最高的医的名字。

SQL: SELECT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician ORDER BY T2.dose DESC LIMIT 1
问题: 列出医生的员工id及其主要附属部门的id。

SQL: SELECT physician ,  department FROM affiliated_with WHERE primaryaffiliation  =  1
问题: 每个医生的员工ID和主要附属部门ID是什么。

SQL: SELECT physician ,  department FROM affiliated_with WHERE primaryaffiliation  =  1
问题: 列出一些医生的主要隶属的部门的名称。

SQL: SELECT DISTINCT T2.name FROM affiliated_with AS T1 JOIN department AS T2 ON T1.department = T2.departmentid WHERE PrimaryAffiliation  =  1
问题: 一些医生的主要隶属的部门的名称是什么？

SQL: SELECT DISTINCT T2.name FROM affiliated_with AS T1 JOIN department AS T2 ON T1.department = T2.departmentid WHERE PrimaryAffiliation  =  1
问题: 哪些护士在1号楼和区域编码是1的位置值班？给出他们的名字。

SQL: SELECT nurse FROM on_call WHERE blockfloor  =  1 AND blockcode  =  1
问题: 找出在1号楼和区域编码是1的位置值班的护士的id。

SQL: SELECT nurse FROM on_call WHERE blockfloor  =  1 AND blockcode  =  1
问题: 手术的最高花费，最低花费和平均花费是什么？

SQL: SELECT MAX(cost) ,  MIN(cost) ,  AVG(cost) FROM procedures
问题: 给出手术的最高、最低和平均的花费。

SQL: SELECT MAX(cost) ,  MIN(cost) ,  AVG(cost) FROM procedures
问题: 列出按费用从最高到最低排序的所有手术的名称和花费。

SQL: SELECT name ,  cost FROM procedures ORDER BY cost DESC
问题: 按照费用的降序对所有手术的名称和花费进行排序。

SQL: SELECT name ,  cost FROM procedures ORDER BY cost DESC
问题: 找出三个最昂贵的手术。

SQL: SELECT name FROM procedures ORDER BY cost LIMIT 3
问题: 三个最昂贵的手术是什么？

SQL: SELECT name FROM procedures ORDER BY cost LIMIT 3
问题: 找到那些花费5000以上的费用执行手术的医生。

SQL: SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment WHERE T3.cost  >  5000
问题: 哪些医生花费5000以上的费用才能执行手术？

SQL: SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment WHERE T3.cost  >  5000
问题: 找出执行手术最昂贵的医生。

SQL: SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment ORDER BY T3.cost DESC LIMIT 1
问题: 哪个医生执行过的手术最昂贵。

SQL: SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment ORDER BY T3.cost DESC LIMIT 1
问题: 医师“文翰”执行手术的平均费用是多少？

SQL: SELECT avg(T3.cost) FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment WHERE T1.name  =  "文翰"
问题: 计算医师“文翰”执行手术的平均价格。

SQL: SELECT avg(T3.cost) FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment WHERE T1.name  =  "文翰"
问题: 找出医师“文翰”执行手术的名称。

SQL: SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment WHERE T1.name  =  "文翰"
问题: 医师“文翰”执行手术的名称是什么？

SQL: SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment WHERE T1.name  =  "文翰"
问题: 找出所有花费超过1000英镑的手术或是医师“文翰”执行的手术。

SQL: SELECT name FROM procedures WHERE cost  >  1000 UNION SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment WHERE T1.name  =  "文翰"
问题: 所有花费超过1000英镑的手术或是医师“文翰”执行的手术有哪些？

SQL: SELECT name FROM procedures WHERE cost  >  1000 UNION SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment WHERE T1.name  =  "文翰"
问题: 找出所有花费超过1000英镑的手术但不是医师“文翰”执行的手术的名字？

SQL: SELECT name FROM procedures WHERE cost  >  1000 EXCEPT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment WHERE T1.name  =  "文翰"
问题: 所有花费超过1000英镑的手术但不是医师“文翰”执行的手术的名字是什么？

SQL: SELECT name FROM procedures WHERE cost  >  1000 EXCEPT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment WHERE T1.name  =  "文翰"
问题: 找出所有花费少于5000英镑的且是医师“文翰”执行的手术。

SQL: SELECT name FROM procedures WHERE cost  <  5000 INTERSECT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment WHERE T1.name  =  "文翰"
问题: 所有花费少于5000英镑的且是医师“文翰”执行的手术有哪些？

SQL: SELECT name FROM procedures WHERE cost  <  5000 INTERSECT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment WHERE T1.name  =  "文翰"
问题: 查找既属于“外科”科又属于“精神科”科的医生的姓名。

SQL: SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID  =  T2.physician JOIN department AS T3 ON T2.department  =  T3.DepartmentID WHERE T3.name  =  '外科' INTERSECT SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID  =  T2.physician JOIN department AS T3 ON T2.department  =  T3.DepartmentID WHERE T3.name  =  '精神科'
问题: 哪些医生隶属于“外科”科又属于“精神科”科？给出他们的名字。

SQL: SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID  =  T2.physician JOIN department AS T3 ON T2.department  =  T3.DepartmentID WHERE T3.name  =  '外科' INTERSECT SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID  =  T2.physician JOIN department AS T3 ON T2.department  =  T3.DepartmentID WHERE T3.name  =  '精神科'
问题: 查找属于“外科”科或属于“精神科”科的医师的姓名。

SQL: SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID  =  T2.physician JOIN department AS T3 ON T2.department  =  T3.DepartmentID WHERE T3.name  =  '外科' OR T3.name  =  '精神科'
问题: 哪些医生隶“外科”科或属于“精神科”科？给出他们的名字。

SQL: SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID  =  T2.physician JOIN department AS T3 ON T2.department  =  T3.DepartmentID WHERE T3.name  =  '外科' OR T3.name  =  '精神科'
问题: 找出不使用“扑热息痛”的患者的姓名。

SQL: SELECT name FROM patient EXCEPT SELECT T1.name FROM patient AS T1 JOIN Prescribes AS T2 ON T2.Patient  =  T1.SSN JOIN Medication AS T3 ON T2.Medication  =  T3.Code WHERE T3.name  =  '扑热息痛'
问题: 那些没有服用“扑热息痛”的患者的姓名是什么？

SQL: SELECT name FROM patient EXCEPT SELECT T1.name FROM patient AS T1 JOIN Prescribes AS T2 ON T2.Patient  =  T1.SSN JOIN Medication AS T3 ON T2.Medication  =  T3.Code WHERE T3.name  =  '扑热息痛'
问题: 找到不使用“扑热息痛”药物的患者的数量。

SQL: SELECT count(*) FROM patient WHERE SSN NOT IN ( SELECT T1.patient FROM Prescribes AS T1 JOIN Medication AS T2 ON T1.Medication  =  T2.Code WHERE T2.name  =  '扑热息痛' )
问题: 有多少患者不使用“扑热息痛”作为药物？

SQL: SELECT count(*) FROM patient WHERE SSN NOT IN ( SELECT T1.patient FROM Prescribes AS T1 JOIN Medication AS T2 ON T1.Medication  =  T2.Code WHERE T2.name  =  '扑热息痛' )
问题: 一共有多少预约？

SQL: SELECT count(*) FROM appointment
问题: 计算总共有多少预约。

SQL: SELECT count(*) FROM appointment
问题: 找到那些随时值班的护士的名字。

SQL: SELECT DISTINCT T1.name FROM nurse AS T1 JOIN on_call AS T2 ON T1.EmployeeID  =  T2.nurse
问题: 随时值班的不同护士的名字是什么？

SQL: SELECT DISTINCT T1.name FROM nurse AS T1 JOIN on_call AS T2 ON T1.EmployeeID  =  T2.nurse
问题: 那里有多少艘船？

SQL: SELECT count(*) FROM ship
问题: 船的数量是多少？

SQL: SELECT count(*) FROM ship
问题: 以吨位升序列出船舶名称。

SQL: SELECT Name FROM ship ORDER BY Tonnage ASC
问题: 以吨位升序的船舶名称是什么？

SQL: SELECT Name FROM ship ORDER BY Tonnage ASC
问题: 船舶的类型和国籍是什么？

SQL: SELECT TYPE ,  Nationality FROM ship
问题: 每艘船的种类和国籍是什么？

SQL: SELECT TYPE ,  Nationality FROM ship
问题: 列出国籍不是“美国”的船舶的名称。

SQL: SELECT Name FROM ship WHERE Nationality != "美国"
问题: 那些不是来自“美国”的船的名字是什么？

SQL: SELECT Name FROM ship WHERE Nationality != "美国"
问题: 显示其国籍为“美国”或“英国”的船舶的名称。

SQL: SELECT Name FROM ship WHERE Nationality  =  "美国" OR Nationality  =  "英国"
问题: 从“美国”或“英国”来的船的名字是什么？

SQL: SELECT Name FROM ship WHERE Nationality  =  "美国" OR Nationality  =  "英国"
问题: 最大吨位的船叫什么名字？

SQL: SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1
问题: 最大吨位的船的名字是什么？

SQL: SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1
问题: 显示不同船舶的类型和每种类型的船舶数量。

SQL: SELECT TYPE ,  COUNT(*) FROM ship GROUP BY TYPE
问题: 每种类型有多少艘船？

SQL: SELECT TYPE ,  COUNT(*) FROM ship GROUP BY TYPE
问题: 请展示最常见的船只类型。

SQL: SELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1
问题: 最常见的船舶类型是什么？

SQL: SELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1
问题: 列出拥有两艘船以上的国家。

SQL: SELECT Nationality FROM ship GROUP BY Nationality HAVING COUNT(*)  >  2
问题: 拥有多于两艘船的国家是什么？

SQL: SELECT Nationality FROM ship GROUP BY Nationality HAVING COUNT(*)  >  2
问题: 显示不同类型的船舶和每种类型船舶的平均吨位。

SQL: SELECT TYPE ,  avg(Tonnage) FROM ship GROUP BY TYPE
问题: 对于每种类型，平均吨位是多少？

SQL: SELECT TYPE ,  avg(Tonnage) FROM ship GROUP BY TYPE
问题: 显示任务的代码和命运，以及涉及的船只的名称。

SQL: SELECT T1.Code ,  T1.Fate ,  T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID  =  T2.Ship_ID
问题: 涉及的船舶的任务代码、命运和名称是什么？

SQL: SELECT T1.Code ,  T1.Fate ,  T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID  =  T2.Ship_ID
问题: 展示在1928年后执行任务的船只名称。

SQL: SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID  =  T2.Ship_ID WHERE T1.Launched_Year  >  1928
问题: 1928号涉及任务的船只名称是什么？

SQL: SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID  =  T2.Ship_ID WHERE T1.Launched_Year  >  1928
问题: 显示“美国”国籍的船只执行任务的不同命运

SQL: SELECT DISTINCT T1.Fate FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID  =  T2.Ship_ID WHERE T2.Nationality  =  "美国"
问题: 来自“美国”的船只参与这次任务的不同命运是什么？

SQL: SELECT DISTINCT T1.Fate FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID  =  T2.Ship_ID WHERE T2.Nationality  =  "美国"
问题: 列出没有参与任何任务的船只的名称

SQL: SELECT Name FROM ship WHERE Ship_ID NOT IN (SELECT Ship_ID FROM mission)
问题: 不参与任何任务的船只的名称是什么？

SQL: SELECT Name FROM ship WHERE Ship_ID NOT IN (SELECT Ship_ID FROM mission)
问题: 显示既有吨位大于6000的船舶又有吨位小于4000的船舶的船舶类型。

SQL: SELECT TYPE FROM ship WHERE Tonnage  >  6000 INTERSECT SELECT TYPE FROM ship WHERE Tonnage  <  4000
问题: 既有吨位大于6000的船舶又有吨位小于4000的船舶的船舶类型是什么？

SQL: SELECT TYPE FROM ship WHERE Tonnage  >  6000 INTERSECT SELECT TYPE FROM ship WHERE Tonnage  <  4000
问题: 找到学生总数。

SQL: SELECT count(*) FROM list
问题: 那儿有多少学生？

SQL: SELECT count(*) FROM list
问题: 查找111号房学生的姓氏。

SQL: SELECT lastname FROM list WHERE classroom  =  111
问题: 在111号房的学生姓什么？

SQL: SELECT lastname FROM list WHERE classroom  =  111
问题: 找出在108教室学习的学生的名字。

SQL: SELECT firstname FROM list WHERE classroom  =  108
问题: 108号房的学生的名字是什么？

SQL: SELECT firstname FROM list WHERE classroom  =  108
问题: 107号房的学生的名字是什么？

SQL: SELECT DISTINCT firstname FROM list WHERE classroom  =  107
问题: 列出107号房里所有学生的名字。

SQL: SELECT DISTINCT firstname FROM list WHERE classroom  =  107
问题: 对于每个教室中教学的年级，返回教室名称和年级名称。

SQL: SELECT DISTINCT classroom ,  grade FROM list
问题: 名单上每一个班的年级号和教室号码是多少？

SQL: SELECT DISTINCT classroom ,  grade FROM list
问题: 哪一个年级在103教室学习？

SQL: SELECT DISTINCT grade FROM list WHERE classroom  =  103
问题: 找出在103教师学习的年纪。

SQL: SELECT DISTINCT grade FROM list WHERE classroom  =  103
问题: 找出在105教室学习的年纪。

SQL: SELECT DISTINCT grade FROM list WHERE classroom  =  105
问题: 哪一个年级在105号房间学习？

SQL: SELECT DISTINCT grade FROM list WHERE classroom  =  105
问题: 4年级使用哪些教室？

SQL: SELECT DISTINCT classroom FROM list WHERE grade  =  4
问题: 找出4年级正在学习的教室。

SQL: SELECT DISTINCT classroom FROM list WHERE grade  =  4
问题: 5年级使用哪些教室？

SQL: SELECT DISTINCT classroom FROM list WHERE grade  =  5
问题: 给出5年级正在使用的教室。

SQL: SELECT DISTINCT classroom FROM list WHERE grade  =  5
问题: 找出教五年级的老师的姓氏。

SQL: SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE grade  =  5
问题: 教5年级的老师的姓氏是什么？

SQL: SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE grade  =  5
问题: 找出教一年级的老师的名字。

SQL: SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE grade  =  1
问题: 教1年级的老师的名字是什么？

SQL: SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE grade  =  1
问题: 找出在110教室教课的所有老师的名字。

SQL: SELECT firstname FROM teachers WHERE classroom  =  110
问题: 哪些教师在110教室教学？给出他们的名字。

SQL: SELECT firstname FROM teachers WHERE classroom  =  110
问题: 找出在109教室教学的教师的姓氏。

SQL: SELECT lastname FROM teachers WHERE classroom  =  109
问题: 哪些教师在109教室教学？给出他们的姓氏。

SQL: SELECT lastname FROM teachers WHERE classroom  =  109
问题: 返回所有教师的名字和姓氏。

SQL: SELECT DISTINCT firstname ,  lastname FROM teachers
问题: 所有老师的名字和姓氏是什么？

SQL: SELECT DISTINCT firstname ,  lastname FROM teachers
问题: 列出所有学生的名字和姓氏。

SQL: SELECT DISTINCT firstname ,  lastname FROM list
问题: 显示每个学生的名字和姓氏。

SQL: SELECT DISTINCT firstname ,  lastname FROM list
问题: 找出由“张”“亮”教授的所有学生的名字和姓氏。

SQL: SELECT T1.firstname ,  T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "张" AND T2.lastname  =  "亮"
问题: 由“张”“亮”教授的所有学生的名字和姓氏是什么？

SQL: SELECT T1.firstname ,  T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "张" AND T2.lastname  =  "亮"
问题: 找出由“孙“”克”教授的所有学生的名字和姓氏。

SQL: SELECT T1.firstname ,  T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "孙" AND T2.lastname  =  "克"
问题: 由“孙”“克”教授的所有学生的名字和姓氏是什么？

SQL: SELECT T1.firstname ,  T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "孙" AND T2.lastname  =  "克"
问题: 找出教授“刘”“磊”的所有老师的名字和姓氏。

SQL: SELECT T2.firstname ,  T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.firstname  =  "刘" AND T1.lastname  =  "磊"
问题: 教授学生名为“刘”“磊”的所有老师的名字和姓氏是那些？

SQL: SELECT T2.firstname ,  T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.firstname  =  "刘" AND T1.lastname  =  "磊"
问题: 找出教授“吴”“琼”的所有老师的名字和姓氏。

SQL: SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.firstname  =  "吴" AND T1.lastname  =  "琼"
问题: 教授学生名为“吴”“琼”的所有老师的名字和姓氏是什么？

SQL: SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.firstname  =  "吴" AND T1.lastname  =  "琼"
问题: “林”“小华”教了多少学生？

SQL: SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "林" AND T2.lastname  =  "小华"
问题: 统计一下“林”“小华”老师教学生的人数。

SQL: SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "林" AND T2.lastname  =  "小华"
问题: “卫”“聪”教了多少学生？

SQL: SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "卫" AND T2.lastname  =  "聪"
问题: 找出“卫”“聪”老师教的学生数。

SQL: SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "卫" AND T2.lastname  =  "聪"
问题: 找出“沈”“丽雅”老师教的学生数。

SQL: SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "沈" AND T2.lastname  =  "丽雅"
问题: “沈”“丽雅”教了多少学生？

SQL: SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "沈" AND T2.lastname  =  "丽雅"
问题: 名字为“王”“小帅”的学生有多少老师？

SQL: SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.firstname  =  "王" AND T1.lastname  =  "小帅"
问题: 找出名字为“王”“小帅”的学生的老师的数量。

SQL: SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.firstname  =  "王" AND T1.lastname  =  "小帅"
问题: 名字为“郑”“小强”的学生有多少老师？

SQL: SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.firstname  =  "郑" AND T1.lastname  =  "小强"
问题: 找出教学生“郑”“小强”的老师的数量。

SQL: SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.firstname  =  "郑" AND T1.lastname  =  "小强"
问题: 找到“张”“亮”没有教过的所有一年级学生的名字和姓氏。

SQL: SELECT DISTINCT T1.firstname ,  T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.grade  =  1 EXCEPT SELECT T1.firstname ,  T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "张" AND T2.lastname  =  "亮"
问题: 不是由“张”“亮”老师教的一年级学生的名字和姓氏是什么？

SQL: SELECT DISTINCT T1.firstname ,  T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.grade  =  1 EXCEPT SELECT T1.firstname ,  T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "张" AND T2.lastname  =  "亮"
问题: 查找没有被“孙”“晓军”教过的三年级学生的姓氏。

SQL: SELECT DISTINCT T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.grade  =  3 AND T2.firstname != "孙" AND T2.lastname != "晓军"
问题: 没有被“孙”“晓军”教过的三年级学生的姓氏是什么？

SQL: SELECT DISTINCT T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.grade  =  3 AND T2.firstname != "孙" AND T2.lastname != "晓军"
问题: 对于每个年级，返回其年级号、使用的教室数量以及年级的学生总数。

SQL: SELECT grade ,  count(DISTINCT classroom) ,  count(*) FROM list GROUP BY grade
问题: 返回每个年级的年级编号、该年级用的教室数量以及该年级注册的学生总数。

SQL: SELECT grade ,  count(DISTINCT classroom) ,  count(*) FROM list GROUP BY grade
问题: 对于每个教室，返回其教室号和使用它的年级数。

SQL: SELECT classroom ,  count(DISTINCT grade) FROM list GROUP BY classroom
问题: 显示每个教室的教室编号和使用它的年级数。

SQL: SELECT classroom ,  count(DISTINCT grade) FROM list GROUP BY classroom
问题: 哪个教室的学生最多？

SQL: SELECT classroom FROM list GROUP BY classroom ORDER BY count(*) DESC LIMIT 1
问题: 找出大多数学生使用的教室。

SQL: SELECT classroom FROM list GROUP BY classroom ORDER BY count(*) DESC LIMIT 1
问题: 报告每间教室的学生人数。

SQL: SELECT classroom ,  count(*) FROM list GROUP BY classroom
问题: 显示每间教室的教室号码并找出有多少学生在使用它。

SQL: SELECT classroom ,  count(*) FROM list GROUP BY classroom
问题: 报告每一个“0”年级的教室的学生总数。

SQL: SELECT classroom ,  count(*) FROM list WHERE grade  =  "0" GROUP BY classroom
问题: 对于每个“0”年级的教室，返回教室号码和学生人数。

SQL: SELECT classroom ,  count(*) FROM list WHERE grade  =  "0" GROUP BY classroom
问题: 返回每个“四年级”教室的学生总数。

SQL: SELECT classroom ,  count(*) FROM list WHERE grade  =  "4" GROUP BY classroom
问题: 对于每个“四年级”的教室，显示教室号码和使用它的学生总数。

SQL: SELECT classroom ,  count(*) FROM list WHERE grade  =  "4" GROUP BY classroom
问题: 找出教最多学生的老师的名字。

SQL: SELECT T2.firstname ,  T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom GROUP BY T2.firstname ,  T2.lastname ORDER BY count(*) DESC LIMIT 1
问题: 哪位老师教最多的学生？请告诉我老师的名字和姓氏。

SQL: SELECT T2.firstname ,  T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom GROUP BY T2.firstname ,  T2.lastname ORDER BY count(*) DESC LIMIT 1
问题: 找出一间教室里学生的数量。

SQL: SELECT count(*) ,  classroom FROM list GROUP BY classroom
问题: 一间教室有多少名学生？

SQL: SELECT count(*) ,  classroom FROM list GROUP BY classroom
问题: 总部设在“中国”的公司有多少？

SQL: SELECT count(*) FROM company WHERE Headquarters  =  '中国'
问题: 通过销售数量的升序列出公司的名称。

SQL: SELECT Name FROM company ORDER BY Sales_in_Billion ASC
问题: 所有公司的总部和产业是什么？

SQL: SELECT Headquarters ,  Industry FROM company
问题: 显示“银行”或“零售”的公司名称。

SQL: SELECT Name FROM company WHERE Industry  =  "银行业" OR Industry  =  "零售"
问题: 公司的最大市值和最低市值是多少？

SQL: SELECT max(Market_Value_in_Billion) ,  min(Market_Value_in_Billion) FROM company
问题: 公司销售额最大的公司总部是什么？

SQL: SELECT Headquarters FROM company ORDER BY Sales_in_Billion DESC LIMIT 1
问题: 显示不同的总部及每个总部公司的数量。

SQL: SELECT Headquarters ,  COUNT(*) FROM company GROUP BY Headquarters
问题: 显示公司最常见的总部。

SQL: SELECT Headquarters FROM company GROUP BY Headquarters ORDER BY COUNT(*) DESC LIMIT 1
问题: 显示至少有两家公司的总部。

SQL: SELECT Headquarters FROM company GROUP BY Headquarters HAVING COUNT(*)  >=  2
问题: 显示既有“银行”的公司也有“天然气”行业的公司的总部。

SQL: SELECT Headquarters FROM company WHERE Industry  =  "银行业" INTERSECT SELECT Headquarters FROM company WHERE Industry  =  "天然气"
问题: 显示公司名称和员工姓名。

SQL: SELECT T3.Name ,  T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID JOIN company AS T3 ON T1.Company_ID  =  T3.Company_ID
问题: 按照员工工作的年限的降序显示公司和员工的姓名。

SQL: SELECT T3.Name ,  T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID JOIN company AS T3 ON T1.Company_ID  =  T3.Company_ID ORDER BY T1.Year_working
问题: 展示那些销售超过200的公司的员工的名字。

SQL: SELECT T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID JOIN company AS T3 ON T1.Company_ID  =  T3.Company_ID WHERE T3.Sales_in_Billion  >  200
问题: 显示公司名称和该公司员工人数

SQL: SELECT T3.Name ,  COUNT(*) FROM employment AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID JOIN company AS T3 ON T1.Company_ID  =  T3.Company_ID GROUP BY T3.Name