jtjt520j/CSpider_for_Qwen huggingface dataset:
问题: 找到所提供课程的总数。

SQL: SELECT count(*) FROM COURSES
问题: “数据库”课程的课程描述是什么？

SQL: SELECT course_description FROM COURSES WHERE course_name  =  "数据库"
问题: 返回“数据库”课程的描述。

SQL: SELECT course_description FROM COURSES WHERE course_name  =  "数据库"
问题: 课程的作者或导师姓名是“琪琪”的地址是什么？

SQL: SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name	 =  "琪琪"
问题: 返回个人名字为“琪琪”的课程作者或导师的地址。

SQL: SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name	 =  "琪琪"
问题: 列出所有课程的作者或导师的地址。

SQL: SELECT address_line_1 FROM Course_Authors_and_Tutors
问题: 每个课程的作者或导师的地址是什么？

SQL: SELECT address_line_1 FROM Course_Authors_and_Tutors
问题: 列出所有作者和导师的登录名和姓氏。

SQL: SELECT login_name ,  family_name FROM Course_Authors_and_Tutors
问题: 作者和导师的登录名和姓氏是什么？

SQL: SELECT login_name ,  family_name FROM Course_Authors_and_Tutors
问题: 列出所有学生的入学日期和完成日期。

SQL: SELECT date_of_enrolment ,  date_of_completion FROM Student_Course_Enrolment
问题: 所有记录的入学日期和完成日期是什么？

SQL: SELECT date_of_enrolment ,  date_of_completion FROM Student_Course_Enrolment
问题: 有多少不同的学生参加课程？

SQL: SELECT count(DISTINCT student_id) FROM Student_Course_Enrolment
问题: 找出参加课程的不同学生的人数。

SQL: SELECT count(DISTINCT student_id) FROM Student_Course_Enrolment
问题: 学生选择上了多少门课？

SQL: SELECT count(course_id) FROM Student_Course_Enrolment
问题: 超出有学生参加的不同课程的数量。

SQL: SELECT count(course_id) FROM Student_Course_Enrolment
问题: 找到测试结果为“通过”的日期。

SQL: SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result  =  "通过"
问题: 哪些测试有“通过”的结果？返回测试时的日期。

SQL: SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result  =  "通过"
问题: 有多少测试的结果是“失败”？

SQL: SELECT count(*) FROM Student_Tests_Taken WHERE test_result  =  "失败"
问题: 计算测试结果是“失败”的考试的次数。

SQL: SELECT count(*) FROM Student_Tests_Taken WHERE test_result  =  "失败"
问题: 姓氏是“睿”的学生的登录名是什么？

SQL: SELECT login_name FROM Students WHERE family_name  =  "睿"
问题: 返回姓氏为“睿”的学生的登录名。

SQL: SELECT login_name FROM Students WHERE family_name  =  "睿"
问题: 姓“龚”或“铭”的学生最近登录的日期是什么？

SQL: SELECT date_of_latest_logon FROM Students WHERE family_name  =  "龚" OR family_name  =  "铭"
问题: 查找姓氏为“龚”或“铭”的学生的最新登录日期。

SQL: SELECT date_of_latest_logon FROM Students WHERE family_name  =  "龚" OR family_name  =  "铭"
问题: 有多少学生的名字中包含有“孙”这个词？

SQL: SELECT COUNT(*) FROM Students WHERE personal_name LIKE "孙"
问题: 找出学生名字中有“孙”一词的学生数。

SQL: SELECT COUNT(*) FROM Students WHERE personal_name LIKE "孙"
问题: 列出所有的科目名称。

SQL: SELECT subject_name FROM SUBJECTS
问题: 所有科目的名字是什么？

SQL: SELECT subject_name FROM SUBJECTS
问题: 按照个人姓名的字母顺序列出所有有关课程作者和导师的信息。

SQL: SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name
问题: 按照个人姓名的字母顺序排列关于课程作者和导师的信息。

SQL: SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name
问题: 按姓氏的字母顺序列出所有学生的个人姓名和姓氏。

SQL: SELECT personal_name ,  family_name FROM Students ORDER BY family_name
问题: 按姓氏的字母顺序排序的学生的名字和姓氏是什么？

SQL: SELECT personal_name ,  family_name FROM Students ORDER BY family_name
问题: 以计数的递减顺序列出每个测试结果及其计数。

SQL: SELECT test_result ,  COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC
问题: 对于每一个不同的测试结果，找出得到结果的学生的数量。

SQL: SELECT test_result ,  COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC
问题: 查找教授课程名为“高级数据库”的作者的登录名。

SQL: SELECT T1.login_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id WHERE T2.course_name  =  "高级数据库"
问题: 哪个课程的作者教“高级数据库”课程？给我他或她的登录名。

SQL: SELECT T1.login_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id WHERE T2.course_name  =  "高级数据库"
问题: 查找课程名是“操作系统”或“数据结构”的课程作者的地址。

SQL: SELECT T1.address_line_1 FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id WHERE T2.course_name  =  "操作系统" OR T2.course_name  =  "数据结构"
问题: 讲授“操作系统”或“数据结构”课程的作者的地址是什么？

SQL: SELECT T1.address_line_1 FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id WHERE T2.course_name  =  "操作系统" OR T2.course_name  =  "数据结构"
问题: 查找教授最多数量课程的课程作者的个人姓名、姓氏和作者ID。

SQL: SELECT T1.personal_name ,  T1.family_name ,  T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id GROUP BY T2.author_id ORDER BY COUNT(*) DESC LIMIT 1
问题: 授课最多课程的作者的个人姓名、姓氏和作者id是什么？

SQL: SELECT T1.personal_name ,  T1.family_name ,  T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id GROUP BY T2.author_id ORDER BY COUNT(*) DESC LIMIT 1
问题: 找到至少教授两门课程的课程作者的地址和作者ID。

SQL: SELECT T1.address_line_1 ,  T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id GROUP BY T2.author_id HAVING Count(*)  >=  2
问题: 哪个课程的作者教两个或更多课程？给出他们的地址和作者id。

SQL: SELECT T1.address_line_1 ,  T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id GROUP BY T2.author_id HAVING Count(*)  >=  2
问题: 找到导师的名字是“志华”的课程的名字。

SQL: SELECT T2.course_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id WHERE T1.personal_name  =  "志华"
问题: 名字是“志华”的导师教的课程的名称是什么？

SQL: SELECT T2.course_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id WHERE T1.personal_name  =  "志华"
问题: 查找属于“计算机科学”课程的名称和说明。

SQL: SELECT T1.course_name ,  T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id  =  T2.subject_id WHERE T2.subject_name  =  "计算机科学"
问题: 在“计算机科学”科目下所有课程的名称和描述是什么？

SQL: SELECT T1.course_name ,  T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id  =  T2.subject_id WHERE T2.subject_name  =  "计算机科学"
问题: 找出课程ID、课程名称和每个科目对应的可用课程数量。

SQL: SELECT T1.subject_id ,  T2.subject_name ,  COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id  =  T2.subject_id GROUP BY T1.subject_id
问题: 课程ID、课程名称和每个科目的可用课程数量是多少？

SQL: SELECT T1.subject_id ,  T2.subject_name ,  COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id  =  T2.subject_id GROUP BY T1.subject_id
问题: 找出按课程数的升序进行排序的课程ID、课程名称和每个科目的可用课程数量。

SQL: SELECT T1.subject_id ,  T2.subject_name ,  COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id  =  T2.subject_id GROUP BY T1.subject_id ORDER BY COUNT(*) ASC
问题: 按课程计数的升序列出课程ID、课程名称和每个科目可用的课程数。

SQL: SELECT T1.subject_id ,  T2.subject_name ,  COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id  =  T2.subject_id GROUP BY T1.subject_id ORDER BY COUNT(*) ASC
问题: 名字是“西班牙语”课程的入学日期是什么？

SQL: SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id WHERE T1.course_name  =  "西班牙语"
问题: 找到“课程ID、课程名称”课程的入学日期。

SQL: SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id WHERE T1.course_name  =  "西班牙语"
问题: 招生人数最多的课程名称是什么？

SQL: SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) DESC LIMIT 1
问题: 最多人数的学生报名参加哪门课程？给出课程名称。

SQL: SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) DESC LIMIT 1
问题: 只有1名学生入学的课程名称是什么？

SQL: SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_name HAVING COUNT(*)  =  1
问题: 找出只有一个学生入学的课程名称。

SQL: SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_name HAVING COUNT(*)  =  1
问题: 招生人数大于2的课程的课程描述和名称是什么？

SQL: SELECT T1.course_description ,  T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_name HAVING COUNT(*)  >  2
问题: 返回两个以上学生注册的课程的描述和名称。

SQL: SELECT T1.course_description ,  T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_name HAVING COUNT(*)  >  2
问题: 每门课程的名称和相应的招生人数是多少？

SQL: SELECT T1.course_name ,  COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_name
问题: 列出每门课程的课程名和注册学生的数量。

SQL: SELECT T1.course_name ,  COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_name
问题: 所有有结果为“通过”的测试的入学日期是什么？

SQL: SELECT T1.date_of_enrolment FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id  =  T2.registration_id WHERE T2.test_result  =  "通过"
问题: 找出具有“通过”结果的所有测试的注册日期。

SQL: SELECT T1.date_of_enrolment FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id  =  T2.registration_id WHERE T2.test_result  =  "通过"
问题: 所有测试结果包含“失败”的完成日期是什么？

SQL: SELECT T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id  =  T2.registration_id WHERE T2.test_result  =  "失败"
问题: 返回具有“失败”结果的所有测试的完成日期。

SQL: SELECT T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id  =  T2.registration_id WHERE T2.test_result  =  "失败"
问题: 列出个人姓名为“小天”的学生入学和毕业日期。

SQL: SELECT T1.date_of_enrolment ,  T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id WHERE T2.personal_name  =  "小天"
问题: 那个名字是“小天”的学生是在几号注册完成课程的？

SQL: SELECT T1.date_of_enrolment ,  T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id WHERE T2.personal_name  =  "小天"
问题: 列出姓氏是“韩”和姓氏是“佳明”的学生的入学和毕业日期。

SQL: SELECT T1.date_of_enrolment ,  T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id WHERE T2.family_name  =  "韩" AND T2.personal_name  =  "佳明"
问题: 姓“韩”和姓“佳明”的学生的入学和毕业日期是什么？

SQL: SELECT T1.date_of_enrolment ,  T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id WHERE T2.family_name  =  "韩" AND T2.personal_name  =  "佳明"
问题: 查找注册课程最多的学生的学生ID和登录名

SQL: SELECT T1.student_id ,  T2.login_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1
问题: 参加最多数量课程的学生的id和登录名是什么？

SQL: SELECT T1.student_id ,  T2.login_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1
问题: 找出至少注册两门课的学生ID和个人姓名。

SQL: SELECT T1.student_id ,  T2.personal_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id HAVING COUNT(*)  >=  2
问题: 哪一个学生至少注册了两门课程？给出学生id和个人姓名。

SQL: SELECT T1.student_id ,  T2.personal_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id HAVING COUNT(*)  >=  2
问题: 查找最多注册两门课的学生的学生ID和中间名。

SQL: SELECT T1.student_id ,  T2.middle_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id HAVING COUNT(*)  <=  2
问题: 最多驻车两门课的学生的id和中间名是什么？

SQL: SELECT T1.student_id ,  T2.middle_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id HAVING COUNT(*)  <=  2
问题: 找出不参加任何课程的学生姓名。

SQL: SELECT personal_name FROM Students EXCEPT SELECT T1.personal_name FROM Students AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.student_id  =  T2.student_id
问题: 没有参加任何课程的学生姓名是什么？

SQL: SELECT personal_name FROM Students EXCEPT SELECT T1.personal_name FROM Students AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.student_id  =  T2.student_id
问题: 有多少学生没有注册任何课程？

SQL: SELECT count(*) FROM Students WHERE student_id NOT IN (SELECT student_id FROM Student_Course_Enrolment)
问题: 统计没有参加任何课程的学生人数。

SQL: SELECT count(*) FROM Students WHERE student_id NOT IN (SELECT student_id FROM Student_Course_Enrolment)
问题: 查找课程作者和学生的共同登录名。

SQL: SELECT login_name FROM Course_Authors_and_Tutors INTERSECT SELECT login_name FROM Students
问题: 既有课程作者又有学生使用的登录名是什么？

SQL: SELECT login_name FROM Course_Authors_and_Tutors INTERSECT SELECT login_name FROM Students
问题: 找到课程作者和学生的共同个人名字。

SQL: SELECT personal_name FROM Course_Authors_and_Tutors INTERSECT SELECT personal_name FROM Students
问题: 课程作者和部分学生都使用的个人名字是什么？

SQL: SELECT personal_name FROM Course_Authors_and_Tutors INTERSECT SELECT personal_name FROM Students
问题: 哪些索赔造成超过2次转让或拥有最高的索赔额？列出索赔的日期和索赔ID。

SQL: SELECT T1.Date_Claim_Made ,  T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id  =  T2.Claim_id GROUP BY T1.Claim_id HAVING count(*)  >  2 UNION SELECT T1.Date_Claim_Made ,  T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id  =  T2.Claim_id WHERE T1.Amount_Claimed  =  ( SELECT max(Amount_Claimed) FROM Claims )
问题: 找出导致两个以上结算或具有最大索赔金额的索赔。返回每个人索赔的日期和索赔的ID。

SQL: SELECT T1.Date_Claim_Made ,  T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id  =  T2.Claim_id GROUP BY T1.Claim_id HAVING count(*)  >  2 UNION SELECT T1.Date_Claim_Made ,  T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id  =  T2.Claim_id WHERE T1.Amount_Claimed  =  ( SELECT max(Amount_Claimed) FROM Claims )
问题: 哪个客户至少有2个政策，但没有提出任何索赔？列出客户详细信息和ID。

SQL: SELECT T1.customer_details ,  T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id  =  T2.customer_id GROUP BY T1.customer_id HAVING count(*)  >=  2 EXCEPT SELECT T1.customer_details ,  T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id  =  T2.customer_id JOIN Claims AS T3 ON T2.policy_id  =  T3.policy_id
问题: 给出有两个或更多的政策，但没有提出任何索赔的客户详细资料和ID。

SQL: SELECT T1.customer_details ,  T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id  =  T2.customer_id GROUP BY T1.customer_id HAVING count(*)  >=  2 EXCEPT SELECT T1.customer_details ,  T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id  =  T2.customer_id JOIN Claims AS T3 ON T2.policy_id  =  T3.policy_id
问题: 按日期的升序列出所有付款的方法、日期和数额。

SQL: SELECT Payment_Method_Code ,  Date_Payment_Made ,  Amount_Payment FROM Payments ORDER BY Date_Payment_Made ASC
问题: 按日期升序排序的每个付款的方法、日期和金额是多少？

SQL: SELECT Payment_Method_Code ,  Date_Payment_Made ,  Amount_Payment FROM Payments ORDER BY Date_Payment_Made ASC
问题: 在所有索赔中，索赔额最大的索赔的清算额是多少？列出结算金额和索赔金额。

SQL: SELECT Amount_Settled ,  Amount_Claimed FROM Claims ORDER BY Amount_Claimed DESC LIMIT 1
问题: 找到索赔金额最大的清算金额。显示结算金额和索赔金额。

SQL: SELECT Amount_Settled ,  Amount_Claimed FROM Claims ORDER BY Amount_Claimed DESC LIMIT 1
问题: 在所有索赔中，索赔金额最少的索赔额是多少？列出结算金额和索赔金额。

SQL: SELECT Amount_Settled ,  Amount_Claimed FROM Claims ORDER BY Amount_Settled ASC LIMIT 1
问题: 找出索赔金额最小的清算金额。显示结算金额和索赔金额。

SQL: SELECT Amount_Settled ,  Amount_Claimed FROM Claims ORDER BY Amount_Settled ASC LIMIT 1
问题: 在所有索赔中，哪些索赔的索赔额高于平均索赔额？列出索赔日期和处理日期。

SQL: SELECT Date_Claim_Made ,  Date_Claim_Settled FROM Claims WHERE Amount_Claimed  >  ( SELECT avg(Amount_Claimed) FROM Claims )
问题: 请告诉我所有索赔额高于平均索赔金额的索赔日期和结算日期。

SQL: SELECT Date_Claim_Made ,  Date_Claim_Settled FROM Claims WHERE Amount_Claimed  >  ( SELECT avg(Amount_Claimed) FROM Claims )
问题: 在所有的索赔中，哪些结算的索赔额不超过平均值？列出索赔开始日期。

SQL: SELECT Date_Claim_Made FROM Claims WHERE Amount_Settled  <=  ( SELECT avg(Amount_Settled) FROM Claims )
问题: 返回索赔金额不超过平均金额的索赔开始日期

SQL: SELECT Date_Claim_Made FROM Claims WHERE Amount_Settled  <=  ( SELECT avg(Amount_Settled) FROM Claims )
问题: 每个索赔对应多少个结算？列出索赔ID和结算数量。

SQL: SELECT T1.Claim_id ,  count(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id  =  T2.claim_id GROUP BY T1.claim_id
问题: 找出每个索赔对应的结算数量和索赔ID。

SQL: SELECT T1.Claim_id ,  count(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id  =  T2.claim_id GROUP BY T1.claim_id
问题: 哪种索赔导致最多数量的结算？列出索赔ID、索赔日期和结算数量。

SQL: SELECT T1.claim_id ,  T1.date_claim_made ,  count(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id  =  T2.claim_id GROUP BY T1.claim_id ORDER BY count(*) DESC LIMIT 1
问题: 找出导致最多数量结算的索赔ID、索赔日期和结算数量。

SQL: SELECT T1.claim_id ,  T1.date_claim_made ,  count(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id  =  T2.claim_id GROUP BY T1.claim_id ORDER BY count(*) DESC LIMIT 1
问题: 在最近的索赔结算日期内，对索赔进行了多少次结算？列出结算次数和索赔ID。

SQL: SELECT count(*) ,  T1.claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id  =  T2.claim_id GROUP BY T1.claim_id ORDER BY T1.Date_Claim_Settled DESC LIMIT 1
问题: 查找索赔的ID、为索赔进行的结算次数以及最近的结算日期。

SQL: SELECT count(*) ,  T1.claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id  =  T2.claim_id GROUP BY T1.claim_id ORDER BY T1.Date_Claim_Settled DESC LIMIT 1
问题: 在所有索赔中，索赔的最早日期是什么时候？

SQL: SELECT Date_Claim_Made FROM Claims ORDER BY Date_Claim_Made ASC LIMIT 1
问题: 给出第一次索赔的日期。

SQL: SELECT Date_Claim_Made FROM Claims ORDER BY Date_Claim_Made ASC LIMIT 1
问题: 所有清算的总结算金额是多少？

SQL: SELECT sum(Amount_Settled) FROM Settlements
问题: 计算所有结算的总结算量。

SQL: SELECT sum(Amount_Settled) FROM Settlements
问题: 谁有超过1个政策的客户？列出客户详细信息和ID。

SQL: SELECT T1.customer_details ,  T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id  =  T2.Customer_id GROUP BY T1.customer_id HAVING count(*)  >  1
问题: 找出具有超过一个政策的客户的详细信息和ID。

SQL: SELECT T1.customer_details ,  T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id  =  T2.Customer_id GROUP BY T1.customer_id HAVING count(*)  >  1
问题: 所有结算的索赔日期和结算日期是什么？

SQL: SELECT Date_Claim_Made ,  Date_Claim_Settled FROM Settlements
问题: 告诉我每个结算案件的索赔日期和结算日期。

SQL: SELECT Date_Claim_Made ,  Date_Claim_Settled FROM Settlements
问题: 什么是最流行的支付方式？

SQL: SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY count(*) DESC LIMIT 1
问题: 哪种付款方式最常被使用？

SQL: SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY count(*) DESC LIMIT 1
问题: 哪种支付方式处理的付款金额最少？

SQL: SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY count(*) ASC LIMIT 1
问题: 最少使用的付款方式是什么？

SQL: SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY count(*) ASC LIMIT 1
问题: 付款总额是多少？

SQL: SELECT sum(Amount_Payment) FROM Payments
问题: 计算处理的付款总额。

SQL: SELECT sum(Amount_Payment) FROM Payments
问题: 顾客的具体细节是什么？

SQL: SELECT DISTINCT customer_details FROM Customers
问题: 返回不同的客户详细信息。

SQL: SELECT DISTINCT customer_details FROM Customers
问题: 哪种政策类型是大多数客户选择的？

SQL: SELECT Policy_Type_Code FROM Customer_Policies GROUP BY Policy_Type_Code ORDER BY count(*) DESC LIMIT 1
问题: 找出大多数客户选择的策略类型。

SQL: SELECT Policy_Type_Code FROM Customer_Policies GROUP BY Policy_Type_Code ORDER BY count(*) DESC LIMIT 1
问题: 总共有多少次清算？

SQL: SELECT count(*) FROM Settlements
问题: 计算清算次数的数量。

SQL: SELECT count(*) FROM Settlements
问题: 哪些支付是用“信用卡”的？列出付款ID、日期和金额。

SQL: SELECT Payment_ID ,  Date_Payment_Made ,  Amount_Payment FROM Payments WHERE Payment_Method_Code  =  '信用卡'
问题: 给出使用“信用卡”处理的付款id，日期和数额。

SQL: SELECT Payment_ID ,  Date_Payment_Made ,  Amount_Payment FROM Payments WHERE Payment_Method_Code  =  '信用卡'
问题: 列出没有任何政策的客户的细节。

SQL: SELECT customer_details FROM Customers EXCEPT SELECT T1.customer_details FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.customer_id  =  T2.customer_id
问题: 哪些客户没有任何政策？找到这些客户的详细信息。

SQL: SELECT customer_details FROM Customers EXCEPT SELECT T1.customer_details FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.customer_id  =  T2.customer_id
问题: 列出只有一次清算的索赔中的索赔的日期，结算的日期以及所有索赔的清算金额。

SQL: SELECT T1.claim_id ,  T1.date_claim_made ,  T1.Date_Claim_Settled FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id  =  T2.Claim_id GROUP BY T1.claim_id HAVING count(*)  =  1
问题: 只有一次清算的索赔中的索赔的日期，结算的日期以及所有索赔的清算金额是什么？

SQL: SELECT T1.claim_id ,  T1.date_claim_made ,  T1.Date_Claim_Settled FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id  =  T2.Claim_id GROUP BY T1.claim_id HAVING count(*)  =  1
问题: 找出索赔的总金额。

SQL: SELECT sum(Amount_Claimed) FROM Claims
问题: 在所有索赔中，索赔总额是多少？

SQL: SELECT sum(Amount_Claimed) FROM Claims
问题: 哪个部门员工的人数最多？

SQL: SELECT name FROM department GROUP BY departmentID ORDER BY count(departmentID) DESC LIMIT 1;
问题: 找出员工最多的部门。

SQL: SELECT name FROM department GROUP BY departmentID ORDER BY count(departmentID) DESC LIMIT 1;
问题: 员工数最少的部门的领导的员工id是什么？

SQL: SELECT head FROM department GROUP BY departmentID ORDER BY count(departmentID) LIMIT 1;
问题: 给出员工数最少的部门的领导的员工id。

SQL: SELECT head FROM department GROUP BY departmentID ORDER BY count(departmentID) LIMIT 1;
问题: 员工人数最少的部门的负责人的姓名和职位是什么？

SQL: SELECT T2.name ,  T2.position FROM department AS T1 JOIN physician AS T2 ON T1.head  =  T2.EmployeeID GROUP BY departmentID ORDER BY count(departmentID) LIMIT 1;
问题: 找出雇员最少的部门的负责人的姓名和职位。

SQL: SELECT T2.name ,  T2.position FROM department AS T1 JOIN physician AS T2 ON T1.head  =  T2.EmployeeID GROUP BY departmentID ORDER BY count(departmentID) LIMIT 1;
问题: 预约病人的姓名是什么？

SQL: SELECT name FROM appointment AS T1 JOIN patient AS T2 ON T1.patient  =  T2.ssn
问题: 列出已预约的病人的姓名。

SQL: SELECT name FROM appointment AS T1 JOIN patient AS T2 ON T1.patient  =  T2.ssn
问题: 有超过一次预约的病人的姓名和电话号码是多少？

SQL: SELECT name ,  phone FROM appointment AS T1 JOIN patient AS T2 ON T1.patient  =  T2.ssn GROUP BY T1.patient HAVING count(*)  >  1
问题: 哪个病人预约不止一次？给出这些病人的姓名和电话号码。

SQL: SELECT name ,  phone FROM appointment AS T1 JOIN patient AS T2 ON T1.patient  =  T2.ssn GROUP BY T1.patient HAVING count(*)  >  1
问题: 找到在最近开始日期的预约的ID？

SQL: SELECT appointmentid FROM appointment ORDER BY START DESC LIMIT 1
问题: 最近开始的预约的ID是什么？

SQL: SELECT appointmentid FROM appointment ORDER BY START DESC LIMIT 1
问题: 列出一些预约医生的名字。

SQL: SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician  =  T2.EmployeeID
问题: 所有有预约的医生的名字是什么？

SQL: SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician  =  T2.EmployeeID
问题: 列出从来没有任何预约的医生的名字。

SQL: SELECT name FROM physician EXCEPT SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician  =  T2.EmployeeID
问题: 哪些医生从来没有预约过？找出他们的名字。

SQL: SELECT name FROM physician EXCEPT SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician  =  T2.EmployeeID
问题: 找出所有医师的姓名及其主要附属部门的名称。

SQL: SELECT T1.name ,  T3.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 T2.PrimaryAffiliation  =  1
问题: 每个医生的名字和主要附属部门的名称是什么？

SQL: SELECT T1.name ,  T3.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 T2.PrimaryAffiliation  =  1
问题: 最近一次预约的病人叫什么名字？

SQL: SELECT T1.name FROM patient AS T1 JOIN appointment AS T2 ON T1.ssn = T2.patient ORDER BY T2.start DESC LIMIT 1
问题: 查找最近一次预约的病人的名字。

SQL: SELECT T1.name FROM patient AS T1 JOIN appointment AS T2 ON T1.ssn = T2.patient ORDER BY T2.start DESC LIMIT 1
问题: 有多少病人住在112房间？

SQL: SELECT count(patient) FROM stay WHERE room  =  112
问题: 统计住112房间的病人的数量。

SQL: SELECT count(patient) FROM stay WHERE room  =  112
问题: “王涛”医生开了多少病人处方？

SQL: SELECT count(T1.SSN) FROM patient AS T1 JOIN prescribes AS T2 ON T1.SSN  =  T2.patient JOIN physician AS T3 ON T2.physician  =  T3.employeeid WHERE T3.name = "王涛"
问题: 找到“王涛”医生开的病人的处方数。

SQL: SELECT count(T1.SSN) FROM patient AS T1 JOIN prescribes AS T2 ON T1.SSN  =  T2.patient JOIN physician AS T3 ON T2.physician  =  T3.employeeid WHERE T3.name = "王涛"
问题: 找出在111号病房住院的病人用药的名称。

SQL: SELECT T4.name FROM stay AS T1 JOIN patient AS T2 ON T1.Patient  =  T2.SSN JOIN Prescribes AS T3 ON T3.Patient  =  T2.SSN JOIN Medication AS T4 ON T3.Medication  =  T4.Code WHERE room  =  111
问题: 在111房间住的病人使用的药物名称是什么？

SQL: SELECT T4.name FROM stay AS T1 JOIN patient AS T2 ON T1.Patient  =  T2.SSN JOIN Prescribes AS T3 ON T3.Patient  =  T2.SSN JOIN Medication AS T4 ON T3.Medication  =  T4.Code WHERE room  =  111
问题: 找到最近一次住在111房间的病人。

SQL: SELECT patient FROM stay WHERE room  =  111 ORDER BY staystart DESC LIMIT 1
问题: 最近住在111房间的病人的id是什么？

SQL: SELECT patient FROM stay WHERE room  =  111 ORDER BY staystart DESC LIMIT 1
问题: 又最多预约的护士的名字的是什么？

SQL: SELECT T1.name FROM nurse AS T1 JOIN appointment AS T2 ON T1.employeeid  =  T2.prepnurse GROUP BY T1.employeeid ORDER BY count(*) DESC LIMIT 1
问题: 找出预约数量最多的护士的名字。

SQL: SELECT T1.name FROM nurse AS T1 JOIN appointment AS T2 ON T1.employeeid  =  T2.prepnurse GROUP BY T1.employeeid ORDER BY count(*) DESC LIMIT 1
问题: 每个医生要照顾多少病人？列出他们照顾的病人的姓名和数量。

SQL: SELECT T1.name ,  count(*) FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid  =  T2.PCP GROUP BY T1.employeeid