jtjt520j/CSpider_for_Qwen huggingface dataset:
问题: 哪个县人口最多？给我这个县的名字。

SQL: SELECT County_name FROM county ORDER BY Population DESC LIMIT 1
问题: 展示人口最少的3个县。

SQL: SELECT County_name FROM county ORDER BY Population ASC LIMIT 3
问题: 人口最少的3个县是什么？给我县的名字。

SQL: SELECT County_name FROM county ORDER BY Population ASC LIMIT 3
问题: 显示至少有两名代表的县的名字。

SQL: SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District GROUP BY T1.County_id HAVING COUNT(*)  >=  2
问题: 哪个县有两个以上代表？给我县的名字。

SQL: SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District GROUP BY T1.County_id HAVING COUNT(*)  >=  2
问题: 显示具有至少两个记录的政党的名称。

SQL: SELECT Party FROM party GROUP BY Party HAVING COUNT(*)  >=  2
问题: 哪个政党有两个或两个以上的记录？

SQL: SELECT Party FROM party GROUP BY Party HAVING COUNT(*)  >=  2
问题: 显示具有最多代表的政党的名称。

SQL: SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID GROUP BY T1.Party ORDER BY COUNT(*) DESC LIMIT 1
问题: 代表人数最多的是哪一个政党？

SQL: SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID GROUP BY T1.Party ORDER BY COUNT(*) DESC LIMIT 1
问题: 显示那些曾经担任过州长的人。

SQL: SELECT Governor FROM party GROUP BY Governor ORDER BY COUNT(*) DESC LIMIT 1
问题: 哪个人成为州长的次数最多？

SQL: SELECT Governor FROM party GROUP BY Governor ORDER BY COUNT(*) DESC LIMIT 1
问题: 显示当监查官次数最多的人和相应的次数。

SQL: SELECT Comptroller ,  COUNT(*) FROM party GROUP BY Comptroller ORDER BY COUNT(*) DESC LIMIT 1
问题: 哪些人当监查官的次数最多？给我这个人的名字和次数。

SQL: SELECT Comptroller ,  COUNT(*) FROM party GROUP BY Comptroller ORDER BY COUNT(*) DESC LIMIT 1
问题: 在选举中没有代表的政党名称是什么？

SQL: SELECT Party FROM party WHERE Party_ID NOT IN (SELECT Party FROM election)
问题: 哪些政党在选举中没有代表？

SQL: SELECT Party FROM party WHERE Party_ID NOT IN (SELECT Party FROM election)
问题: 有代表参加“拨款”委员会和“经济问题”委员会的政党名字是什么？

SQL: SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T1.Committee  =  "拨款" INTERSECT SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T1.Committee  =  "经济问题"
问题: 哪些政党在“拨款”委员会和“经济问题”委员会都有代表？

SQL: SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T1.Committee  =  "拨款" INTERSECT SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T1.Committee  =  "经济问题"
问题: 哪个委员会有民主党和自由党的代表？

SQL: SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T2.Party  =  "民主" INTERSECT SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T2.Party  =  "自由"
问题: 找到有来自民主党和自由党的代表的委员会。

SQL: SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T2.Party  =  "民主" INTERSECT SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T2.Party  =  "自由"
问题: 那儿有多少记者？

SQL: SELECT count(*) FROM journalist
问题: 按工作年份升序列出记者姓名。

SQL: SELECT Name FROM journalist ORDER BY Years_working ASC
问题: 记者的国籍和年龄是多少？

SQL: SELECT Nationality ,  Age FROM journalist
问题: 显示来自“英格兰”或“威尔士”的记者姓名。

SQL: SELECT Name FROM journalist WHERE Nationality  =  "英格兰" OR Nationality  =  "威尔士"
问题: 记者平均工作年限是多少？

SQL: SELECT avg(Years_working) FROM journalist
问题: 工作年限最长的记者的国籍是什么？

SQL: SELECT Nationality FROM journalist ORDER BY Years_working DESC LIMIT 1
问题: 显示不同国籍和每个国家的记者人数。

SQL: SELECT Nationality ,  COUNT(*) FROM journalist GROUP BY Nationality
问题: 显示有最多记者的国家。

SQL: SELECT Nationality FROM journalist GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1
问题: 显示既拥有工作超过10年的新闻工作者，又拥有工作不到3年的新闻工作者的国家。

SQL: SELECT Nationality FROM journalist WHERE Years_working  >  10 INTERSECT SELECT Nationality FROM journalist WHERE Years_working  <  3
问题: 按照出席人数的下降顺序显示活动的日期、地点和名称。

SQL: SELECT Date ,  Name ,  venue FROM event ORDER BY Event_Attendance DESC
问题: 显示记者的姓名和他们报道的事件的日期。

SQL: SELECT T3.Name ,  T2.Date FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID  =  T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID  =  T3.journalist_ID
问题: 按升序显示记者姓名和他们报道的事件的名称。

SQL: SELECT T3.Name ,  T2.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID  =  T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID  =  T3.journalist_ID ORDER BY T2.Event_Attendance ASC
问题: 显示记者的姓名和他们报道的事件数量。

SQL: SELECT T3.Name ,  COUNT(*) FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID  =  T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID  =  T3.journalist_ID GROUP BY T3.Name
问题: 显示报道不止一个事件的记者的名字。

SQL: SELECT T3.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID  =  T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID  =  T3.journalist_ID GROUP BY T3.Name HAVING COUNT(*)  >  1
问题: 列出没有报道任何事件的记者的名字。

SQL: SELECT Name FROM journalist WHERE journalist_ID NOT IN (SELECT journalist_ID FROM news_report)
问题: 所有事件的平均和最大出席率是多少？

SQL: SELECT avg(Event_Attendance) ,  max(Event_Attendance) FROM event
问题: 找出不同角色类型记者的平均年龄和工作经历。

SQL: SELECT avg(t1.age) ,  avg(Years_working) ,  t2.work_type FROM journalist AS t1 JOIN news_report AS t2 ON t1.journalist_id  =  t2.journalist_id GROUP BY t2.work_type
问题: 列出参加人数最多的2个的活动的地点和名称。

SQL: SELECT venue ,  name FROM event ORDER BY Event_Attendance DESC LIMIT 2
问题: 给我看看所有的餐馆。

SQL: SELECT ResName FROM Restaurant;
问题: “全聚德”餐厅地址是什么？

SQL: SELECT Address FROM Restaurant WHERE ResName = "全聚德";
问题: “全聚德”餐厅评分是多少？

SQL: SELECT Rating FROM Restaurant WHERE ResName = "全聚德";
问题: 列出所有餐厅类型。

SQL: SELECT ResTypeName FROM Restaurant_Type;
问题: “烤鸭”类型餐厅的描述是什么？

SQL: SELECT ResTypeDescription FROM Restaurant_Type WHERE ResTypeName = "烤鸭";
问题: 哪家餐馆的评价最高？列出餐厅名称及其等级。

SQL: SELECT ResName , Rating FROM Restaurant ORDER BY Rating DESC LIMIT 1;
问题: “李” “琳”的年龄是多少？

SQL: SELECT Age FROM Student WHERE Fname = "李" AND Lname = "琳";
问题: 学生“李” “琳”的性别是什么？

SQL: SELECT Sex FROM Student WHERE Fname = "李" AND Lname = "琳";
问题: 列出所有修600专业的学生的名字和姓氏。

SQL: SELECT Fname , Lname FROM Student WHERE Major  =  600;
问题: 学生“李” “琳”住在哪个城市？

SQL: SELECT city_code FROM Student WHERE Fname = "李" AND Lname = "琳";
问题: 1121导师有多少学生？

SQL: SELECT count(*) FROM Student WHERE Advisor =  1121;
问题: 哪位导师的学生最多？列出导师和学生人数。

SQL: SELECT Advisor ,  count(*) FROM Student GROUP BY Advisor ORDER BY count(Advisor) DESC LIMIT 1;
问题: 哪个专业的学生最少？列出专业和学生人数。

SQL: SELECT Major ,  count(*) FROM Student GROUP BY Major ORDER BY count(Major) ASC LIMIT 1;
问题: 哪个专业有2到30名学生？列出专业和学生人数。

SQL: SELECT Major ,  count(*) FROM Student GROUP BY Major HAVING count(Major) BETWEEN 2 AND 30;
问题: 哪些学生年龄在18岁以上，主修600？列出每个学生的名和姓。

SQL: SELECT Fname , Lname FROM Student WHERE Age  >  18 AND Major = 600;
问题: 所有年龄在18岁以上，主修600的女学生。列出学生的名和姓氏。

SQL: SELECT Fname , Lname FROM Student WHERE Age  >  18 AND Major != 600 AND Sex = '女';
问题: “烤鸭”类型餐厅有多少家？

SQL: SELECT count(*) FROM Restaurant JOIN Type_Of_Restaurant ON Restaurant.ResID =  Type_Of_Restaurant.ResID JOIN Restaurant_Type ON Type_Of_Restaurant.ResTypeID = Restaurant_Type.ResTypeID GROUP BY Type_Of_Restaurant.ResTypeID HAVING Restaurant_Type.ResTypeName = '烤鸭'
问题: 学生“李” “琳”在餐厅花了多长时间？

SQL: SELECT sum(Spent) FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID WHERE Student.Fname = "李" AND Student.Lname = "琳";
问题: 学生“李” “琳”去过几次“全聚德”？

SQL: SELECT count(*) FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID WHERE Student.Fname = "李" AND Student.Lname = "琳" AND Restaurant.ResName = "全聚德";
问题: “李” “琳”什么时候去“全聚德”的？

SQL: SELECT TIME FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID WHERE Student.Fname = "李" AND Student.Lname = "琳" AND Restaurant.ResName = "全聚德";
问题: 学生们在哪家餐厅花费最少的时间？列出餐厅和学生的总花费时间。

SQL: SELECT Restaurant.ResName ,  sum(Visits_Restaurant.Spent) FROM Visits_Restaurant JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID GROUP BY Restaurant.ResID ORDER BY sum(Visits_Restaurant.Spent) ASC LIMIT 1;
问题: 哪个学生去餐厅的次数最多？列出学生的名和姓氏。

SQL: SELECT Student.Fname , Student.Lname FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID GROUP BY Student.StuID ORDER BY count(*) DESC LIMIT 1;
问题: 找出订单的ID，其状态是“成功”。

SQL: SELECT actual_order_id FROM actual_orders WHERE order_status_code  =  '成功'
问题: 查找订购次数最多的产品的名称和价格。

SQL: SELECT t1.product_name ,   t1.product_price FROM products AS t1 JOIN regular_order_products AS t2 ON t1.product_id  =  t2.product_id GROUP BY t2.product_id ORDER BY count(*) DESC LIMIT 1
问题: 找到客户总数。

SQL: SELECT count(*) FROM customers
问题: 有多少种不同的支付方式？

SQL: SELECT count(DISTINCT payment_method) FROM customers
问题: 按牌照号码的顺序显示所有卡车的细节。

SQL: SELECT truck_details FROM trucks ORDER BY truck_licence_number
问题: 找出最昂贵产品的名称。

SQL: SELECT product_name FROM products ORDER BY product_price DESC LIMIT 1
问题: 找到那些不住在“浙江”州的客户的名字。

SQL: SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id  =  t2.customer_id JOIN addresses AS t3 ON t2.address_id  =  t3.address_id WHERE t3.state_province_county  =  '浙江'
问题: 列出由“信用卡”卡支付的客户的姓名和电子邮件。

SQL: SELECT customer_email ,  customer_name FROM customers WHERE payment_method  =  '信用卡'
问题: 查找居住在“浙江”州的客户的姓名和电话号码。

SQL: SELECT t1.customer_name ,  t1.customer_phone FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id  =  t2.customer_id JOIN addresses AS t3 ON t2.address_id  =  t3.address_id WHERE t3.state_province_county  =  '浙江'
问题: 发现没有任何雇员在他们的记录中的状态。

SQL: SELECT state_province_county FROM addresses WHERE address_id NOT IN (SELECT employee_address_id FROM Employees)
问题: 列出所有客户的姓名、电话号码和电子邮件，按照成为客户的日期进行排序。

SQL: SELECT customer_name ,  customer_phone ,  customer_email FROM Customers ORDER BY date_became_customer
问题: 查找前5名客户的姓名。

SQL: SELECT customer_name FROM Customers ORDER BY date_became_customer LIMIT 5
问题: 找到最常用的支付方法。

SQL: SELECT payment_method FROM Customers GROUP BY payment_method ORDER BY count(*) DESC LIMIT 1
问题: 按字母顺序列出所有路线的名称。

SQL: SELECT route_name FROM Delivery_Routes ORDER BY route_name
问题: 查找具有最高交付次数的线路的名称。

SQL: SELECT t1.route_name FROM Delivery_Routes AS t1 JOIN Delivery_Route_Locations AS t2 ON t1.route_id  =  t2.route_id GROUP BY t1.route_id ORDER BY count(*) DESC LIMIT 1
问题: 列出每个州的名字和居住人数。

SQL: SELECT t2.state_province_county ,  count(*) FROM customer_addresses AS t1 JOIN addresses AS t2 ON t1.address_id  =  t2.address_id GROUP BY t2.state_province_county
问题: 有多少作者？

SQL: SELECT count(*) FROM authors
问题: 统计作者的数量。

SQL: SELECT count(*) FROM authors
问题: 有多少机构？

SQL: SELECT count(*) FROM inst
问题: 统计机构数量。

SQL: SELECT count(*) FROM inst
问题: 一共发表了多少篇论文？

SQL: SELECT count(*) FROM papers
问题: 统计总论文数。

SQL: SELECT count(*) FROM papers
问题: “刘” “珍”发表论文的题目是什么？

SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE  t1.fname  =  "刘" AND t1.lname  =  "珍"
问题: 找到“刘” “珍”所有论文的标题。

SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE  t1.fname  =  "刘" AND t1.lname  =  "珍"
问题: 找到所有由“周” “志华”发表的论文。

SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE  t1.fname  =  "周" AND t1.lname  =  "志华"
问题: 找到“周” “志华”所有论文的标题。

SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE  t1.fname  =  "周" AND t1.lname  =  "志华"
问题: “李” “航”发表了多少篇论文？

SQL: SELECT count(*) FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE  t1.fname  =  "李" AND t1.lname  =  "航"
问题: “李” “航”有多少篇论文？

SQL: SELECT count(*) FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE  t1.fname  =  "李" AND t1.lname  =  "航"
问题: “李” “牧”所属的机构名称是什么？

SQL: SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t1.fname  =  "李" AND t1.lname  =  "牧"
问题: 作者“李” “牧”属于哪个机构？给我这个机构的名字。

SQL: SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t1.fname  =  "李" AND t1.lname  =  "牧"
问题: “陈” “十一”属于哪一个机构？

SQL: SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t1.fname  =  "陈" AND t1.lname  =  "十一"
问题: 作者“陈” “十一”所属的机构名称是什么？

SQL: SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t1.fname  =  "陈" AND t1.lname  =  "十一"
问题: 谁属于“清华大学”这一机构？显示名和姓氏。

SQL: SELECT DISTINCT t1.fname ,  t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "清华大学"
问题: 查找作者的名和姓氏，并且作者的机构隶属是“清华大学”。

SQL: SELECT DISTINCT t1.fname ,  t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "清华大学"
问题: 哪些作者属于“百度”机构？显示名和姓氏。

SQL: SELECT DISTINCT t1.fname ,  t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "百度"
问题: 查找那些隶属于““百度””机构的作者的名和姓氏。

SQL: SELECT DISTINCT t1.fname ,  t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "百度"
问题: 论文标题为“转基因蛋白酶”的作者的姓氏是什么？

SQL: SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t3.title  =  "转基因蛋白酶"
问题: 谁是题为“转基因蛋白酶”的论文的作者？给我姓氏。

SQL: SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t3.title  =  "转基因蛋白酶"
问题: 找到写论文“注意力模型”的作者的姓氏。

SQL: SELECT t1.fname ,  t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t3.title  =  "注意力模型"
问题: 发表论文“注意力模型”的作者的姓氏是什么？

SQL: SELECT t1.fname ,  t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t3.title  =  "注意力模型"
问题: “中南大学”发表的论文有哪些？

SQL: SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid  =  t2.paperid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "中南大学"
问题: 列出来自“中南大学”机构的作者的论文标题。

SQL: SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid  =  t2.paperid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "中南大学"
问题: 找到“百度”出版的所有论文。

SQL: SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid  =  t2.paperid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "百度"
问题: “百度”的作者写了哪些论文？

SQL: SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid  =  t2.paperid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "百度"
问题: “福州大学”机构发表了多少篇论文？

SQL: SELECT count(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid  =  t2.paperid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "福州大学"
问题: 查找来自机构为“福州大学”的作者发表的论文数量。

SQL: SELECT count(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid  =  t2.paperid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "福州大学"
问题: 查找机构“浙江大学”发表的论文数量。

SQL: SELECT count(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid  =  t2.paperid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "浙江大学"
问题: “浙江大学”的作者写了多少篇论文？

SQL: SELECT count(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid  =  t2.paperid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "浙江大学"
问题: 找到作者中有“曹子建”的论文。

SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t1.fname  =  "曹" AND t1.lname  =  "子建"
问题: 作者“曹子建”写了哪些论文？给我论文名。

SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t1.fname  =  "曹" AND t1.lname  =  "子建"
问题: 哪些论文的作者中有“史俊文”？

SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t1.fname  =  "史" AND t1.lname  =  "俊文"
问题: 找到作者“史俊文”写的论文的标题。

SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t1.fname  =  "史" AND t1.lname  =  "俊文"
问题: 哪篇论文发表在“中国”的机构中，而且以“旭东”为第二作者？

SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid JOIN inst AS t4 ON t2.instid  =  t4.instid WHERE t4.country  =  "中国" AND t2.authorder  =  2 AND t1.lname  =  "旭东"
问题: 查找第二作者的姓为“旭东”并隶属于“中国”某机构的论文。

SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid JOIN inst AS t4 ON t2.instid  =  t4.instid WHERE t4.country  =  "中国" AND t2.authorder  =  2 AND t1.lname  =  "旭东"
问题: 找到第一作者隶属于“日本”某机构，而且姓“村上”的人发表的论文的标题。

SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid JOIN inst AS t4 ON t2.instid  =  t4.instid WHERE t4.country  =  "日本" AND t2.authorder  =  1 AND t1.lname  =  "村上"
问题: 哪篇论文的第一作者隶属于“日本”某机构，而且姓“村上”？把论文的标题给我。

SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid JOIN inst AS t4 ON t2.instid  =  t4.instid WHERE t4.country  =  "日本" AND t2.authorder  =  1 AND t1.lname  =  "村上"
问题: 发表论文最多的作者的姓氏是什么？

SQL: SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid GROUP BY t1.fname ,  t1.lname ORDER BY count(*) DESC LIMIT 1
问题: 哪位作者写的论文最多？找到他或她的姓。

SQL: SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid GROUP BY t1.fname ,  t1.lname ORDER BY count(*) DESC LIMIT 1
问题: 找到发表论文最多的国家。

SQL: SELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid  =  t2.instid JOIN papers AS t3 ON t2.paperid  =  t3.paperid GROUP BY t1.country ORDER BY count(*) DESC LIMIT 1
问题: 找到最多数的论文所属的国家。

SQL: SELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid  =  t2.instid JOIN papers AS t3 ON t2.paperid  =  t3.paperid GROUP BY t1.country ORDER BY count(*) DESC LIMIT 1
问题: 查找发表论文数量最多的组织机构的名称。

SQL: SELECT t1.name FROM inst AS t1 JOIN authorship AS t2 ON t1.instid  =  t2.instid JOIN papers AS t3 ON t2.paperid  =  t3.paperid GROUP BY t1.name ORDER BY count(*) DESC LIMIT 1
问题: 哪个机构发表的论文最多？查找机构名称。

SQL: SELECT t1.name FROM inst AS t1 JOIN authorship AS t2 ON t1.instid  =  t2.instid JOIN papers AS t3 ON t2.paperid  =  t3.paperid GROUP BY t1.name ORDER BY count(*) DESC LIMIT 1
问题: 找到包含“机械”一词的论文标题。

SQL: SELECT title FROM papers WHERE title LIKE "机械"
问题: 哪些论文的标题中有子字符串“机械”？返回论文的标题。

SQL: SELECT title FROM papers WHERE title LIKE "机械"
问题: 哪篇文章的标题包含“数据库”一词？

SQL: SELECT title FROM papers WHERE title LIKE "数据库"
问题: 哪些论文在标题中有子字符串“数据库”？显示论文的标题。

SQL: SELECT title FROM papers WHERE title LIKE "数据库"
问题: 找出所有写过标题包括“功能性”的论文的作者的名字。

SQL: SELECT t1.fname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t3.title LIKE "功能性"
问题: 哪些人写了标题中有“功能性”一词的论文？返回作者的名字。

SQL: SELECT t1.fname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t3.title LIKE "功能性"
问题: 查找标题包含“单细胞”的论文的所有作者的姓氏。

SQL: SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t3.title LIKE "单细胞"
问题: 哪些作者写过标题包含“单细胞”的论文？返回他们的姓氏。

SQL: SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t3.title LIKE "单细胞"
问题: 查找作者最多的论文的标题。

SQL: SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid  =  t2.paperid WHERE t1.authorder  =  (SELECT max(authorder) FROM authorship)
问题: 哪一篇论文的作者最多？给我论文题目。

SQL: SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid  =  t2.paperid WHERE t1.authorder  =  (SELECT max(authorder) FROM authorship)
问题: 姓“丁”的作者的名字是什么？

SQL: SELECT fname FROM authors WHERE lname  =  "丁"
问题: 哪些作者姓“丁”？列出他们的名字。

SQL: SELECT fname FROM authors WHERE lname  =  "丁"
问题: 找到名字叫“小鹏”的作者的姓氏。

SQL: SELECT lname FROM authors WHERE fname  =  "小鹏"
问题: 哪些作者的名字是“小鹏”？列出他们的姓。

SQL: SELECT lname FROM authors WHERE fname  =  "小鹏"
问题: 按照字母顺序排列，找出所有作者的名字。

SQL: SELECT fname FROM authors ORDER BY fname
问题: 按字母顺序给所有作者的名字排序。

SQL: SELECT fname FROM authors ORDER BY fname
问题: 按字母顺序检索所有作者的姓氏。

SQL: SELECT lname FROM authors ORDER BY lname
问题: 给我一份按字母顺序排序的作者的姓氏名单。

SQL: SELECT lname FROM authors ORDER BY lname
问题: 按照姓氏的字母顺序排序检索所有作者的名字和姓氏。

SQL: SELECT fname ,  lname FROM authors ORDER BY lname
问题: 按照姓氏的字母顺序排列列出所有作者的姓氏和名字。

SQL: SELECT fname ,  lname FROM authors ORDER BY lname
问题: 男女演员有多少不同的姓？

SQL: SELECT count(DISTINCT last_name) FROM actor
问题: 计算演员的不同姓氏的数量。

SQL: SELECT count(DISTINCT last_name) FROM actor
问题: 演员最流行的名字是什么？

SQL: SELECT first_name FROM actor GROUP BY first_name ORDER BY count(*) DESC LIMIT 1
问题: 返回所有演员中最常见的名字。

SQL: SELECT first_name FROM actor GROUP BY first_name ORDER BY count(*) DESC LIMIT 1
问题: 演员最受欢迎的全名是什么？

SQL: SELECT first_name ,  last_name FROM actor GROUP BY first_name ,  last_name ORDER BY count(*) DESC LIMIT 1
问题: 返回所有演员中最常见的全名。

SQL: SELECT first_name ,  last_name FROM actor GROUP BY first_name ,  last_name ORDER BY count(*) DESC LIMIT 1
问题: 哪个地区至少有两个地址？

SQL: SELECT district FROM address GROUP BY district HAVING count(*)  >=  2
问题: 给出有两个或两个以上地址的地区。

SQL: SELECT district FROM address GROUP BY district HAVING count(*)  >=  2
问题: 地址“中山东路15号”的电话号码和邮政编码是多少？

SQL: SELECT phone ,  postal_code FROM address WHERE address  =  '中山东路15号'
问题: 给出对应于地址“中山东路15号”的电话和邮政编码。

SQL: SELECT phone ,  postal_code FROM address WHERE address  =  '中山东路15号'
问题: 哪个城市的地址最多？列出城市名称、地址数量和城市ID。

SQL: SELECT T2.city ,  count(*) ,  T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id  =  T2.city_id GROUP BY T1.city_id ORDER BY count(*) DESC LIMIT 1
问题: 拥有最多地址的城市相对应的城市名称、id和地址的数量是什么？

SQL: SELECT T2.city ,  count(*) ,  T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id  =  T2.city_id GROUP BY T1.city_id ORDER BY count(*) DESC LIMIT 1
问题: “四川”地区有多少地址？

SQL: SELECT count(*) FROM address WHERE district  =  '四川'
问题: 统计“四川”地区的地址。

SQL: SELECT count(*) FROM address WHERE district  =  '四川'
问题: 哪部电影以0.99的租金出租并且存货少于3？列出电影片名和ID。

SQL: SELECT title ,  film_id FROM film WHERE rental_rate  =  0.99 INTERSECT SELECT T1.title ,  T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id  =  T2.film_id GROUP BY T1.film_id HAVING count(*)  <  3
问题: 租金为0.99而且存货少于3的电影的片名和id是什么？

SQL: SELECT title ,  film_id FROM film WHERE rental_rate  =  0.99 INTERSECT SELECT T1.title ,  T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id  =  T2.film_id GROUP BY T1.film_id HAVING count(*)  <  3
问题: “澳大利亚”有多少城市？

SQL: SELECT count(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id  =  T2.country_id WHERE T2.country  =  '澳大利亚'
问题: 统计“澳大利亚”的城市数量。

SQL: SELECT count(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id  =  T2.country_id WHERE T2.country  =  '澳大利亚'
问题: 哪些国家至少有3个城市？

SQL: SELECT T2.country FROM city AS T1 JOIN country AS T2 ON T1.country_id  =  T2.country_id GROUP BY T2.country_id HAVING count(*)  >=  3
问题: 包含3个或更多城市的国家是什么？

SQL: SELECT T2.country FROM city AS T1 JOIN country AS T2 ON T1.country_id  =  T2.country_id GROUP BY T2.country_id HAVING count(*)  >=  3
问题: 查找金额大于10而且由姓氏为“严”的工作人员处理的付款的日期。

SQL: SELECT payment_date FROM payment WHERE amount  >  10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id  =  T2.staff_id WHERE T2.first_name  =  '严'
问题: 金额大于10而且由姓氏为“严”的工作人员处理的任何付款的付款日期是什么？

SQL: SELECT payment_date FROM payment WHERE amount  >  10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id  =  T2.staff_id WHERE T2.first_name  =  '严'
问题: 有多少客户的活跃值为“1”？

SQL: SELECT count(*) FROM customer WHERE active = '1'