jtjt520j/CSpider_for_Qwen huggingface dataset:
问题: 以抓举分数升序列出健美运动员的抓举得分和挺举得分。

SQL: SELECT Snatch ,  Clean_Jerk FROM body_builder ORDER BY Snatch ASC
问题: 健美运动员的平均抓举分数是多少？

SQL: SELECT avg(Snatch) FROM body_builder
问题: 总分最高的健美运动员的挺举成绩是多少？

SQL: SELECT Clean_Jerk FROM body_builder ORDER BY Total DESC LIMIT 1
问题: 按身高升序，人的生日是什么？

SQL: SELECT Birth_Date FROM People ORDER BY Height ASC
问题: 健美运动员的名字是什么？

SQL: SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID
问题: 总分高于300的健美运动员的名字是什么？

SQL: SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID WHERE T1.Total  >  300
问题: 体重最大的健美运动员叫什么名字？

SQL: SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T2.Weight DESC LIMIT 1
问题: 总分最高的健美运动员的出生日期和出生地点是什么？

SQL: SELECT T2.Birth_Date ,  T2.Birth_Place FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T1.Total DESC LIMIT 1
问题: 总分小于315的健美运动员身高是多少？

SQL: SELECT T2.Height FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID WHERE T1.Total  <  315
问题: 身高大于200的健美运动员平均总分是多少？

SQL: SELECT avg(T1.Total) FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID WHERE T2.Height  >  200
问题: 按总分降序排列，健美运动员的名字是什么？

SQL: SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T1.Total DESC
问题: 列出每个出生地以及那里的人数。

SQL: SELECT Birth_Place ,  COUNT(*) FROM people GROUP BY Birth_Place
问题: 出生人数最多的出生地是什么？

SQL: SELECT Birth_Place FROM people GROUP BY Birth_Place ORDER BY COUNT(*) DESC LIMIT 1
问题: 至少两个人共有的出生地是什么？

SQL: SELECT Birth_Place FROM people GROUP BY Birth_Place HAVING COUNT(*)  >=  2
问题: 按身高降序列出人的身高和体重。

SQL: SELECT Height ,  Weight FROM people ORDER BY Height DESC
问题: 显示每个健美运动员的所有信息。

SQL: SELECT * FROM body_builder
问题: 列出那些不是健美运动员的人的名字和出生地。

SQL: SELECT Name ,  birth_place FROM people EXCEPT SELECT T1.Name ,  T1.birth_place FROM people AS T1 JOIN body_builder AS T2 ON T1.people_id  =  T2.people_id
问题: 有多少不同的出生地？

SQL: SELECT count(DISTINCT Birth_Place) FROM people
问题: 有多少人不是健美运动员？

SQL: SELECT count(*) FROM people WHERE people_id NOT IN (SELECT People_ID FROM body_builder)
问题: 列出那些抓举成绩高于140分或身高高于200的健美运动员的体重。

SQL: SELECT T2.weight FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id  =  T2.people_id WHERE T1.snatch  >  140 OR T2.height  >  200;
问题: 那些生日里包含"一月"的健美运动员的总分数是多少？

SQL: SELECT T1.total FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id  =  T2.people_id WHERE T2.Birth_Date LIKE "一月";
问题: 最小抓举分数是多少？

SQL: SELECT min(snatch) FROM body_builder
问题: 有多少次选举？

SQL: SELECT count(*) FROM election
问题: 以降序列出选举的选票。

SQL: SELECT Votes FROM election ORDER BY Votes DESC
问题: 列出选举日期和投票率。

SQL: SELECT Date ,  Vote_Percent FROM election
问题: 选举的最低和最高票数是多少？

SQL: SELECT min(Vote_Percent) ,  max(Vote_Percent) FROM election
问题: 代表的姓名和政党是什么？

SQL: SELECT Name ,  Party FROM representative
问题: 不是“民主党”党人的代表的名字是什么？

SQL: SELECT Name FROM Representative WHERE Party != "民主党"
问题: “上海”州或“江西”代表的有效期是多少？

SQL: SELECT Lifespan FROM representative WHERE State  =  "上海" OR State  =  "江西"
问题: 代表姓名和他们参加的选举日期是什么？

SQL: SELECT T2.Name ,  T1.Date FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID  =  T2.Representative_ID
问题: 在选举中超过10000票的代表的名字是什么？

SQL: SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID  =  T2.Representative_ID WHERE Votes  >  10000
问题: 按投票下降顺序，代表的名字是什么？

SQL: SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID  =  T2.Representative_ID ORDER BY votes DESC
问题: 票数最少的代表属于哪一个党派？

SQL: SELECT T2.Party FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID  =  T2.Representative_ID ORDER BY votes ASC LIMIT 1
问题: 按投票率的降序排列，代表的有效期是什么？

SQL: SELECT T2.Lifespan FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID  =  T2.Representative_ID ORDER BY Vote_Percent DESC
问题: “民主党”党代表的平均票数是多少？

SQL: SELECT avg(T1.Votes) FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID  =  T2.Representative_ID WHERE T2.Party  =  "民主党"
问题: 代表的不同党派是什么？显示各党的党名和代表人数。

SQL: SELECT Party ,  COUNT(*) FROM representative GROUP BY Party
问题: 代表人数最多的政党是什么？

SQL: SELECT Party ,  COUNT(*) FROM representative GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1
问题: 什么党派至少有三名代表？

SQL: SELECT Party FROM representative GROUP BY Party HAVING COUNT(*)  >=  3
问题: 哪些州至少有两名代表？

SQL: SELECT State FROM representative GROUP BY State HAVING COUNT(*)  >=  2
问题: 列出没有参加这里列出的选举的代表的姓名。

SQL: SELECT Name FROM representative WHERE Representative_ID NOT IN (SELECT Representative_ID FROM election)
问题: 显示在“上海”州和“湖北”州都有代表的政党。

SQL: SELECT Party FROM representative WHERE State  =  "上海" INTERSECT SELECT Party FROM representative WHERE State  =  "湖北"
问题: 有多少不同的党派？

SQL: SELECT count(DISTINCT Party) FROM representative
问题: 总共有多少套公寓预订？

SQL: SELECT count(*) FROM Apartment_Bookings
问题: 统计公寓预订的总数。

SQL: SELECT count(*) FROM Apartment_Bookings
问题: 显示所有公寓预订的开始日期和结束日期。

SQL: SELECT booking_start_date ,  booking_end_date FROM Apartment_Bookings
问题: 每个公寓预订的开始日期和结束日期是什么？

SQL: SELECT booking_start_date ,  booking_end_date FROM Apartment_Bookings
问题: 显示所有不同的建筑描述。

SQL: SELECT DISTINCT building_description FROM Apartment_Buildings
问题: 给我一张清单，列出所有不同的建筑描述。

SQL: SELECT DISTINCT building_description FROM Apartment_Buildings
问题: 显示由“张力”管理的建筑物的缩写。

SQL: SELECT building_short_name FROM Apartment_Buildings WHERE building_manager	 =  "张力"
问题: “张力”管理的建筑物是什么？给我缩写。

SQL: SELECT building_short_name FROM Apartment_Buildings WHERE building_manager	 =  "张力"
问题: 显示“王刚”管理的所有建筑物的地址和电话。

SQL: SELECT building_address ,  building_phone FROM Apartment_Buildings WHERE building_manager	 =  "王刚"
问题: “王刚”管理的建筑物的地址和电话号码是多少？

SQL: SELECT building_address ,  building_phone FROM Apartment_Buildings WHERE building_manager	 =  "王刚"
问题: 包含“号码”一词的建筑物全称是什么？

SQL: SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE "号码"
问题: 找到包含“号码”一词的所有建筑物的全称。

SQL: SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE "号码"
问题: 所有公寓的浴室的最小和最大数量是多少？

SQL: SELECT min(bathroom_count) ,  max(bathroom_count) FROM Apartments
问题: 给我所有房间里最小和最大的浴室数。

SQL: SELECT min(bathroom_count) ,  max(bathroom_count) FROM Apartments
问题: 所有公寓的平均卧室数是多少？

SQL: SELECT avg(bedroom_count) FROM Apartments
问题: 找到所有公寓的平均卧室数。

SQL: SELECT avg(bedroom_count) FROM Apartments
问题: 返回每个公寓的公寓号和房间数量。

SQL: SELECT apt_number ,  room_count FROM Apartments
问题: 每个公寓的公寓号和房间数量是多少？

SQL: SELECT apt_number ,  room_count FROM Apartments
问题: 类型代码为“套房”的公寓的平均房间数是多少？

SQL: SELECT avg(room_count) FROM Apartments WHERE apt_type_code  =  "套房"
问题: 找到具有“套房”类型代码的公寓的平均房间数。

SQL: SELECT avg(room_count) FROM Apartments WHERE apt_type_code  =  "套房"
问题: 返回类型代码为“公寓”的公寓号码。

SQL: SELECT apt_number FROM Apartments WHERE apt_type_code  =  "公寓"
问题: 哪些公寓有“公寓”的代号？把他们的公寓号码给我。

SQL: SELECT apt_number FROM Apartments WHERE apt_type_code  =  "公寓"
问题: 返回所有客人的名字和姓氏。

SQL: SELECT guest_first_name ,  guest_last_name FROM Guests
问题: 所有客人的名字和姓氏是什么？

SQL: SELECT guest_first_name ,  guest_last_name FROM Guests
问题: 以性别代码“男性”返回所有客人的出生日期。

SQL: SELECT date_of_birth FROM Guests WHERE gender_code  =  "男性"
问题: 所有“男性”性别的客人出生日期是多少？

SQL: SELECT date_of_birth FROM Guests WHERE gender_code  =  "男性"
问题: 显示所有公寓预订的公寓号码、开始日期和结束日期。

SQL: SELECT T2.apt_number ,  T1.booking_start_date ,  T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id
问题: 每个公寓的预订号码是多少，开始日期和结束日期是多少？

SQL: SELECT T2.apt_number ,  T1.booking_start_date ,  T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id
问题: “双人房”型公寓的预订开始和结束日期是什么？

SQL: SELECT T1.booking_start_date ,  T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.apt_type_code  =  "双人房"
问题: 返回具有类型代码“双人房”的公寓的预订开始日期和结束日期。

SQL: SELECT T1.booking_start_date ,  T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.apt_type_code  =  "双人房"
问题: 有两间以上卧室的公寓的预订开始和结束日期是什么？

SQL: SELECT T1.booking_start_date ,  T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.bedroom_count  >  2
问题: 查找具有两个以上卧室的公寓的预订开始日期和结束日期。

SQL: SELECT T1.booking_start_date ,  T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.bedroom_count  >  2
问题: 公寓号码为“634”的公寓的预订状态码是多少？

SQL: SELECT T1.booking_status_code FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.apt_number  =  "634"
问题: 请告诉我“634”公寓的预订状态代码。

SQL: SELECT T1.booking_status_code FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.apt_number  =  "634"
问题: 显示具有状态码“确认”的预订的公寓的不同公寓号码。

SQL: SELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.booking_status_code  =  "确认"
问题: 哪些公寓预订有状态代码“确认”？返回他们的公寓号码。

SQL: SELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.booking_status_code  =  "确认"
问题: 显示具有预订状态码“临时”的公寓的平均房间数。

SQL: SELECT avg(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.booking_status_code  =  "临时"
问题: 预订状态代码为“临时”的公寓的平均房间数量是多少？

SQL: SELECT avg(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.booking_status_code  =  "临时"
问题: 显示客人的名字，开始日期和结束日期的所有公寓预订。

SQL: SELECT T2.guest_first_name ,  T1.booking_start_date ,  T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id  =  T2.guest_id
问题: 预订每套公寓的客人姓名、开始日期和结束日期是什么？

SQL: SELECT T2.guest_first_name ,  T1.booking_start_date ,  T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id  =  T2.guest_id
问题: 显示所有性别代码为“女”的客人所预订的公寓的开始日期和结束日期。

SQL: SELECT T1.booking_start_date ,  T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id  =  T2.guest_id WHERE T2.gender_code  =  "女"
问题: 女宾(性别代码为“女”)预订公寓的开始日期和结束日期是什么？

SQL: SELECT T1.booking_start_date ,  T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id  =  T2.guest_id WHERE T2.gender_code  =  "女"
问题: 显示状态码为“确认”的所有预定公寓的客人的名字和姓氏。

SQL: SELECT T2.guest_first_name ,  T2.guest_last_name FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id  =  T2.guest_id WHERE T1.booking_status_code  =  "确认"
问题: 哪些客人公寓预订的状态代码为“确认”？返回他们的名字和姓。

SQL: SELECT T2.guest_first_name ,  T2.guest_last_name FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id  =  T2.guest_id WHERE T1.booking_status_code  =  "确认"
问题: 展示多余4间卧室的公寓的设施代码。

SQL: SELECT T1.facility_code FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.bedroom_count  >  4
问题: 有多余四间卧室的公寓的设施代码是什么？

SQL: SELECT T1.facility_code FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.bedroom_count  >  4
问题: 显示全部有设施代码“体育馆”的公寓房间总数。

SQL: SELECT sum(T2.room_count) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.facility_code  =  "体育馆"
问题: 找出有设施代码“体育馆”的公寓里房间总数。

SQL: SELECT sum(T2.room_count) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.facility_code  =  "体育馆"
问题: 显示以“如家”为缩写的所有公寓的房间的数目。

SQL: SELECT sum(T2.room_count) FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id  =  T2.building_id WHERE T1.building_short_name  =  "如家"
问题: 简称为“如家”的这栋楼里共有多少个房间？

SQL: SELECT sum(T2.room_count) FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id  =  T2.building_id WHERE T1.building_short_name  =  "如家"
问题: 显示拥有超过两个浴室的公寓楼的地址。

SQL: SELECT T1.building_address FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id  =  T2.building_id WHERE T2.bathroom_count  >  2
问题: 哪些建筑物有两个以上浴室的公寓？把建筑的地址告诉我。

SQL: SELECT T1.building_address FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id  =  T2.building_id WHERE T2.bathroom_count  >  2
问题: 显示在“小波”管理的建筑物中公寓类型代码和公寓号码。

SQL: SELECT T2.apt_type_code ,  T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id  =  T2.building_id WHERE T1.building_manager  =  "小波"
问题: “小波”管理的建筑物有哪些公寓类型代码和公寓号码？

SQL: SELECT T2.apt_type_code ,  T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id  =  T2.building_id WHERE T1.building_manager  =  "小波"
问题: 显示预订状态代码和相应预定的数量。

SQL: SELECT 	booking_status_code ,  COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code
问题: 每个预订状态有多少预订？列出预订状态代码和相应预订的数量。

SQL: SELECT 	booking_status_code ,  COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code
问题: 按房间数升序，返回所有公寓的号码。

SQL: SELECT apt_number FROM Apartments ORDER BY room_count ASC
问题: 按房间数量的升序给公寓号排序。

SQL: SELECT apt_number FROM Apartments ORDER BY room_count ASC
问题: 返回卧室最多的房间号。

SQL: SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1
问题: 床最多的公寓的公寓号码是多少？

SQL: SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1
问题: 按公寓数量升序排序，显示公寓类型代码和对应的公寓数量。

SQL: SELECT apt_type_code ,  COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) ASC
问题: 按照公寓数量的升序，返回具有该公寓类型的公寓数量和每个公寓类型代码。

SQL: SELECT apt_type_code ,  COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) ASC
问题: 显示按平均房间数降序排列前3位的公寓类型代码。

SQL: SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY avg(room_count) DESC LIMIT 3
问题: 平均客房数量前三的公寓类型是什么？

SQL: SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY avg(room_count) DESC LIMIT 3
问题: 显示总房间数最多的公寓类型代码，以及浴室数量和卧室数量。

SQL: SELECT apt_type_code ,  bathroom_count ,  bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY sum(room_count) DESC LIMIT 1
问题: 哪一套公寓的总房数量最多？返回公寓类型代码，浴室的数量和卧室的数量。

SQL: SELECT apt_type_code ,  bathroom_count ,  bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY sum(room_count) DESC LIMIT 1
问题: 显示出现最多次数的公寓类型代码。

SQL: SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1
问题: 哪种公寓类型的代码出现次数最多？

SQL: SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1
问题: 显示超过1个浴室的公寓中出现次数最多的公寓类型代码。

SQL: SELECT apt_type_code FROM Apartments WHERE bathroom_count  >  1 GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1
问题: 在多于一间浴室的公寓中，哪种公寓类型代码出现的次数最多？

SQL: SELECT apt_type_code FROM Apartments WHERE bathroom_count  >  1 GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1
问题: 显示每个公寓类型代码，以及每个类型的最大和最小房间数量。

SQL: SELECT apt_type_code ,  max(room_count) ,  min(room_count) FROM Apartments GROUP BY apt_type_code
问题: 返回每种公寓类型代码以及每种类型中的最大和最小房间数量。

SQL: SELECT apt_type_code ,  max(room_count) ,  min(room_count) FROM Apartments GROUP BY apt_type_code
问题: 按数目按降序排序，显示每个性别代码和对应的客人的数目。

SQL: SELECT gender_code ,  COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC
问题: 按照客人数量的降序对性别代码进行排序。返回性别代码和数量。

SQL: SELECT gender_code ,  COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC
问题: 有多少公寓没有任何设施？

SQL: SELECT count(*) FROM Apartments WHERE apt_id NOT IN (SELECT apt_id FROM Apartment_Facilities)
问题: 找到没有设施的公寓数量。

SQL: SELECT count(*) FROM Apartments WHERE apt_id NOT IN (SELECT apt_id FROM Apartment_Facilities)
问题: 显示带有“临时”和“确认”状态代码的预订的公寓的公寓编号。

SQL: SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.booking_status_code  =  "确认" INTERSECT SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.booking_status_code  =  "临时"
问题: 哪些被预订的公寓的状态码为“临时”和“确认”？把公寓号码给我。

SQL: SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.booking_status_code  =  "确认" INTERSECT SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.booking_status_code  =  "临时"
问题: 显示单元状态可用性均为0和1的公寓数。

SQL: SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.available_yn  =  0 INTERSECT SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.available_yn  =  1
问题: 哪些公寓的单位可用性为0和1？返回他们的公寓号码。

SQL: SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.available_yn  =  0 INTERSECT SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.available_yn  =  1
问题: 2007赛季后有多少场比赛？

SQL: SELECT count(*) FROM game WHERE season  >  2007
问题: 按主队名称降序排列，列出比赛日期。

SQL: SELECT Date FROM game ORDER BY home_team DESC
问题: 列出所有比赛项目的赛季、主队、客场。

SQL: SELECT season ,  home_team ,  away_team FROM game
问题: 每个体育场举办的最大、最小和平均主场比赛是什么？

SQL: SELECT max(home_games) ,  min(home_games) ,  avg(home_games) FROM stadium
问题: 容量百分比高于100%的体育场馆的平均出勤率是多少？

SQL: SELECT average_attendance FROM stadium WHERE capacity_percentage  >  100
问题: 没有遭受“膝盖受伤”伤害的球员的名字，比赛的数量，以及球员的信息来源是什么？

SQL: SELECT player ,  number_of_matches ,  SOURCE FROM injury_accident WHERE injury != '膝盖受伤'
问题: 哪个赛季导致球员“郑智”受伤？

SQL: SELECT T1.season FROM game AS T1 JOIN injury_accident AS T2 ON T1.id  =  T2.game_id WHERE T2.player  =  '郑智'
问题: 造成至少两起伤害事故的比赛的ID、分数和日期是多少？

SQL: SELECT T1.id ,  T1.score ,  T1.date FROM game AS T1 JOIN injury_accident AS T2 ON T2.game_id  =  T1.id GROUP BY T1.id HAVING count(*)  >=  2
问题: 发生伤亡事故最多的体育场馆的ID和名称是什么？

SQL: SELECT T1.id ,  T1.name FROM stadium AS T1 JOIN game AS T2 ON T1.id  =  T2.stadium_id JOIN injury_accident AS T3 ON T2.id  =  T3.game_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1
问题: 查找发生伤害事故最多的体育场的ID和名称。

SQL: SELECT T1.id ,  T1.name FROM stadium AS T1 JOIN game AS T2 ON T1.id  =  T2.stadium_id JOIN injury_accident AS T3 ON T2.id  =  T3.game_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1
问题: 哪个赛季，哪个体育场有球员受伤类型为“脚部受伤”或“膝盖受伤”？

SQL: SELECT T1.season ,  T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.id JOIN injury_accident AS T3 ON T1.id  =  T3.game_id WHERE T3.injury  =  '脚部受伤' OR T3.injury  =  '膝盖受伤'
问题: 受伤事故有多少种不同的信息来源？

SQL: SELECT count(DISTINCT SOURCE) FROM injury_accident
问题: 有多少比赛没有伤害事故？

SQL: SELECT count(*) FROM game WHERE id NOT IN ( SELECT game_id FROM injury_accident )
问题: 2010赛季后发生了多少种不同的受伤？

SQL: SELECT count(DISTINCT T1.injury) FROM injury_accident AS T1 JOIN game AS T2 ON T1.game_id  =  T2.id WHERE T2.season  >  2010
问题: 列出球员“郑智” 和球员“于大宝”都受伤的体育场名称。

SQL: SELECT T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.id JOIN injury_accident AS T3 ON T1.id  =  T3.game_id WHERE T3.player  =  '郑智' INTERSECT SELECT T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.id JOIN injury_accident AS T3 ON T1.id  =  T3.game_id WHERE T3.player  =  '于大宝'
问题: 显示没有发生事故的体育场的名称、平均出勤率、总出勤率。

SQL: SELECT name ,  average_attendance ,  total_attendance FROM stadium EXCEPT SELECT T2.name ,  T2.average_attendance ,  T2.total_attendance FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.id JOIN injury_accident AS T3 ON T1.id  =  T3.game_id
问题: 哪个体育场名称包含子串“中心”？

SQL: SELECT name FROM stadium WHERE name LIKE "中心"
问题: 每个体育场有多少场比赛？

SQL: SELECT T1.id ,  count(*) FROM stadium AS T1 JOIN game AS T2 ON T1.id  =  T2.stadium_id GROUP BY T1.id
问题: 对于每次受伤事故，找出比赛日期和比赛中受伤球员的姓名，并将结果按赛季的顺序进行排序。

SQL: SELECT T1.date ,  T2.player FROM game AS T1 JOIN injury_accident AS T2 ON T1.id  =  T2.game_id ORDER BY T1.season DESC
问题: 列出所有国家和联赛名称。

SQL: SELECT T1.name ,  T2.name FROM Country AS T1 JOIN League AS T2 ON T1.id  =  T2.country_id
问题: “英国”有多少联赛？

SQL: SELECT count(*) FROM Country AS T1 JOIN League AS T2 ON T1.id  =  T2.country_id WHERE T1.name  =  "英格兰"
问题: 所有运动员的平均体重是多少？

SQL: SELECT avg(weight) FROM Player
问题: 所有球员的最大和最小高度是多少？

SQL: SELECT max(weight) ,  min(weight) FROM Player
问题: 列出总得分高于平均水平的球员的名字。

SQL: SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.overall_rating  >  ( SELECT avg(overall_rating) FROM Player_Attributes )
问题: 最好的运球运动员的名字是什么？

SQL: SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.dribbling  =  ( SELECT max(overall_rating) FROM Player_Attributes)
问题: 列出总得分高于90分、更喜欢右脚的球员的名字。

SQL: SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.crossing  >  90 AND T2.preferred_foot  =  "右"
问题: 列出总得分在85到90之间的左脚球员的名字。

SQL: SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.preferred_foot  =  "左" AND T2.overall_rating  >=  85 AND T2.overall_rating  <=  90
问题: 右脚球员和左脚球员的平均得分是多少？

SQL: SELECT preferred_foot ,  avg(overall_rating) FROM Player_Attributes GROUP BY preferred_foot
问题: 在总得分高于80的球员中，有多少是右脚和左脚的？

SQL: SELECT preferred_foot ,  count(*) FROM Player_Attributes WHERE overall_rating  >  80 GROUP BY preferred_foot
问题: 列出所有身高至少为180厘米和总分高于85的球员ID。

SQL: SELECT player_api_id FROM Player WHERE height  >=  180 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE overall_rating  >  85
问题: 列出所有身高在180厘米和190厘米之间的左脚球员的ID。

SQL: SELECT player_api_id FROM Player WHERE height  >=  180 AND height  <=  190 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE preferred_foot  =  "左"
问题: 总得分前3名的球员都是谁？

SQL: SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id  =  T2.player_api_id ORDER BY overall_rating DESC LIMIT 3
问题: 列出潜能前五名的球员的名字和生日。

SQL: SELECT DISTINCT T1.player_name ,  T1.birthday FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id  =  T2.player_api_id ORDER BY potential DESC LIMIT 5
问题: 有多少演出？

SQL: SELECT count(*) FROM performance
问题: 按出席率，列出主持人的演出。

SQL: SELECT HOST FROM performance ORDER BY Attendance ASC
问题: 演出的日期和地点是什么？

SQL: SELECT Date ,  LOCATION FROM performance
问题: 显示在“工人体育场”或“虹口体育场”演出的出席率。

SQL: SELECT Attendance FROM performance WHERE LOCATION  =  "工人体育场" OR LOCATION  =  "虹口体育场"
问题: 演出的的平均出席人数是多少？

SQL: SELECT avg(Attendance) FROM performance
问题: 参加者人数最多的表演日期是什么？

SQL: SELECT Date FROM performance ORDER BY Attendance DESC LIMIT 1
问题: 显示不同的地点和在每个地点表演的数量。

SQL: SELECT LOCATION ,  COUNT(*) FROM performance GROUP BY LOCATION
问题: 显示演出最多次的表演地点。

SQL: SELECT LOCATION FROM performance GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1
问题: 显示具有至少两个演出的地点。

SQL: SELECT LOCATION FROM performance GROUP BY LOCATION HAVING COUNT(*)  >=  2
问题: 显示有超过2000人参与的演出和不到1000人参与的演出的地点。

SQL: SELECT LOCATION FROM performance WHERE Attendance  >  2000 INTERSECT SELECT LOCATION FROM performance WHERE Attendance  <  1000
问题: 显示成员的姓名和他们参加的演出地点。

SQL: SELECT T2.Name ,  T3.Location FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID  =  T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID  =  T3.Performance_ID
问题: 按照名字的字母升序显示会员姓名和演出地点。

SQL: SELECT T2.Name ,  T3.Location FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID  =  T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID  =  T3.Performance_ID ORDER BY T2.Name ASC
问题: 显示演出的日期与以“小提琴”角色的出席成员。

SQL: SELECT T3.Date FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID  =  T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID  =  T3.Performance_ID WHERE T2.Role  =  "小提琴"
问题: 按照参加演出出席率的降序，显示会员姓名和演出日期。

SQL: SELECT T2.Name ,  T3.Date FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID  =  T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID  =  T3.Performance_ID ORDER BY T3.Attendance DESC
问题: 列出没有参加任何表演的成员的名字。

SQL: SELECT Name FROM member WHERE Member_ID NOT IN (SELECT Member_ID FROM member_attendance)
问题: 找到拥有容量超过50的房间的建筑物。

SQL: SELECT DISTINCT building FROM classroom WHERE capacity  >  50
问题: 哪些建筑的容量大于50？

SQL: SELECT DISTINCT building FROM classroom WHERE capacity  >  50
问题: 不在“教学”大厦的房间数量。

SQL: SELECT count(*) FROM classroom WHERE building != '教学'
问题: 不在“教学”的房间有多少？

SQL: SELECT count(*) FROM classroom WHERE building != '教学'
问题: 预算高于平均预算的部门的名称和建筑是什么？

SQL: SELECT dept_name ,  building FROM department WHERE budget  >  (SELECT avg(budget) FROM department)
问题: 给出预算大于平均预算的部门的名称和建筑。

SQL: SELECT dept_name ,  building FROM department WHERE budget  >  (SELECT avg(budget) FROM department)
问题: 查找可以容纳50到100名学生的房间的号码和建筑。

SQL: SELECT building ,  room_number FROM classroom WHERE capacity BETWEEN 50 AND 100
问题: 50到100个学生可以坐的教室号码和相应的建筑是什么？

SQL: SELECT building ,  room_number FROM classroom WHERE capacity BETWEEN 50 AND 100