jtjt520j/cspider_for_chinese_llama2_1.3b huggingface dataset:
Schema: CREATE TABLE election (Representative_ID VARCHAR), CREATE TABLE representative (Representative_ID VARCHAR, Name VARCHAR)
user: 在选举中超过10000票的代表的名字是什么？

assistant: SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID  =  T2.Representative_ID WHERE Votes  >  10000
Schema: CREATE TABLE election (Representative_ID VARCHAR), CREATE TABLE representative (Representative_ID VARCHAR, Name VARCHAR)
user: 按投票下降顺序，代表的名字是什么？

assistant: SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID  =  T2.Representative_ID ORDER BY votes DESC
Schema: CREATE TABLE election (Representative_ID VARCHAR), CREATE TABLE representative (Representative_ID VARCHAR, Party VARCHAR)
user: 票数最少的代表属于哪一个党派？

assistant: SELECT T2.Party FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID  =  T2.Representative_ID ORDER BY votes ASC LIMIT 1
Schema: CREATE TABLE election (Representative_ID VARCHAR), CREATE TABLE representative (Representative_ID VARCHAR, Lifespan VARCHAR)
user: 按投票率的降序排列，代表的有效期是什么？

assistant: SELECT T2.Lifespan FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID  =  T2.Representative_ID ORDER BY Vote_Percent DESC
Schema: CREATE TABLE election (Votes INTEGER, Representative_ID VARCHAR), CREATE TABLE representative (Representative_ID VARCHAR, Party VARCHAR)
user: “民主党”党代表的平均票数是多少？

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

assistant: SELECT Party ,  COUNT(*) FROM representative GROUP BY Party
Schema: CREATE TABLE representative (Party VARCHAR)
user: 代表人数最多的政党是什么？

assistant: SELECT Party ,  COUNT(*) FROM representative GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1
Schema: CREATE TABLE representative (Party VARCHAR)
user: 什么党派至少有三名代表？

assistant: SELECT Party FROM representative GROUP BY Party HAVING COUNT(*)  >=  3
Schema: CREATE TABLE representative (State VARCHAR)
user: 哪些州至少有两名代表？

assistant: SELECT State FROM representative GROUP BY State HAVING COUNT(*)  >=  2
Schema: CREATE TABLE representative (Representative_ID VARCHAR, Name VARCHAR), CREATE TABLE election (Representative_ID VARCHAR, Name VARCHAR)
user: 列出没有参加这里列出的选举的代表的姓名。

assistant: SELECT Name FROM representative WHERE Representative_ID NOT IN (SELECT Representative_ID FROM election)
Schema: CREATE TABLE representative (State VARCHAR, Party VARCHAR)
user: 显示在“上海”州和“湖北”州都有代表的政党。

assistant: SELECT Party FROM representative WHERE State  =  "上海" INTERSECT SELECT Party FROM representative WHERE State  =  "湖北"
Schema: CREATE TABLE representative (Party VARCHAR)
user: 有多少不同的党派？

assistant: SELECT count(DISTINCT Party) FROM representative
Schema: CREATE TABLE Apartment_Bookings (Id VARCHAR)
user: 总共有多少套公寓预订？

assistant: SELECT count(*) FROM Apartment_Bookings
Schema: CREATE TABLE Apartment_Bookings (Id VARCHAR)
user: 统计公寓预订的总数。

assistant: SELECT count(*) FROM Apartment_Bookings
Schema: CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, booking_end_date VARCHAR)
user: 显示所有公寓预订的开始日期和结束日期。

assistant: SELECT booking_start_date ,  booking_end_date FROM Apartment_Bookings
Schema: CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, booking_end_date VARCHAR)
user: 每个公寓预订的开始日期和结束日期是什么？

assistant: SELECT booking_start_date ,  booking_end_date FROM Apartment_Bookings
Schema: CREATE TABLE Apartment_Buildings (building_description VARCHAR)
user: 显示所有不同的建筑描述。

assistant: SELECT DISTINCT building_description FROM Apartment_Buildings
Schema: CREATE TABLE Apartment_Buildings (building_description VARCHAR)
user: 给我一张清单，列出所有不同的建筑描述。

assistant: SELECT DISTINCT building_description FROM Apartment_Buildings
Schema: CREATE TABLE Apartment_Buildings (building_short_name VARCHAR, building_manager VARCHAR)
user: 显示由“张力”管理的建筑物的缩写。

assistant: SELECT building_short_name FROM Apartment_Buildings WHERE building_manager	 =  "张力"
Schema: CREATE TABLE Apartment_Buildings (building_short_name VARCHAR, building_manager VARCHAR)
user: “张力”管理的建筑物是什么？给我缩写。

assistant: SELECT building_short_name FROM Apartment_Buildings WHERE building_manager	 =  "张力"
Schema: CREATE TABLE Apartment_Buildings (building_address VARCHAR, building_phone VARCHAR, building_manager VARCHAR)
user: 显示“王刚”管理的所有建筑物的地址和电话。

assistant: SELECT building_address ,  building_phone FROM Apartment_Buildings WHERE building_manager	 =  "王刚"
Schema: CREATE TABLE Apartment_Buildings (building_address VARCHAR, building_phone VARCHAR, building_manager VARCHAR)
user: “王刚”管理的建筑物的地址和电话号码是多少？

assistant: SELECT building_address ,  building_phone FROM Apartment_Buildings WHERE building_manager	 =  "王刚"
Schema: CREATE TABLE Apartment_Buildings (building_full_name VARCHAR)
user: 包含“号码”一词的建筑物全称是什么？

assistant: SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE "号码"
Schema: CREATE TABLE Apartment_Buildings (building_full_name VARCHAR)
user: 找到包含“号码”一词的所有建筑物的全称。

assistant: SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE "号码"
Schema: CREATE TABLE Apartments (bathroom_count INTEGER)
user: 所有公寓的浴室的最小和最大数量是多少？

assistant: SELECT min(bathroom_count) ,  max(bathroom_count) FROM Apartments
Schema: CREATE TABLE Apartments (bathroom_count INTEGER)
user: 给我所有房间里最小和最大的浴室数。

assistant: SELECT min(bathroom_count) ,  max(bathroom_count) FROM Apartments
Schema: CREATE TABLE Apartments (bedroom_count INTEGER)
user: 所有公寓的平均卧室数是多少？

assistant: SELECT avg(bedroom_count) FROM Apartments
Schema: CREATE TABLE Apartments (bedroom_count INTEGER)
user: 找到所有公寓的平均卧室数。

assistant: SELECT avg(bedroom_count) FROM Apartments
Schema: CREATE TABLE Apartments (apt_number VARCHAR, room_count VARCHAR)
user: 返回每个公寓的公寓号和房间数量。

assistant: SELECT apt_number ,  room_count FROM Apartments
Schema: CREATE TABLE Apartments (apt_number VARCHAR, room_count VARCHAR)
user: 每个公寓的公寓号和房间数量是多少？

assistant: SELECT apt_number ,  room_count FROM Apartments
Schema: CREATE TABLE Apartments (room_count INTEGER, apt_type_code VARCHAR)
user: 类型代码为“套房”的公寓的平均房间数是多少？

assistant: SELECT avg(room_count) FROM Apartments WHERE apt_type_code  =  "套房"
Schema: CREATE TABLE Apartments (room_count INTEGER, apt_type_code VARCHAR)
user: 找到具有“套房”类型代码的公寓的平均房间数。

assistant: SELECT avg(room_count) FROM Apartments WHERE apt_type_code  =  "套房"
Schema: CREATE TABLE Apartments (apt_number VARCHAR, apt_type_code VARCHAR)
user: 返回类型代码为“公寓”的公寓号码。

assistant: SELECT apt_number FROM Apartments WHERE apt_type_code  =  "公寓"
Schema: CREATE TABLE Apartments (apt_number VARCHAR, apt_type_code VARCHAR)
user: 哪些公寓有“公寓”的代号？把他们的公寓号码给我。

assistant: SELECT apt_number FROM Apartments WHERE apt_type_code  =  "公寓"
Schema: CREATE TABLE Guests (guest_last_name VARCHAR, guest_first_name VARCHAR)
user: 返回所有客人的名字和姓氏。

assistant: SELECT guest_first_name ,  guest_last_name FROM Guests
Schema: CREATE TABLE Guests (guest_last_name VARCHAR, guest_first_name VARCHAR)
user: 所有客人的名字和姓氏是什么？

assistant: SELECT guest_first_name ,  guest_last_name FROM Guests
Schema: CREATE TABLE Guests (date_of_birth VARCHAR, gender_code VARCHAR)
user: 以性别代码“男性”返回所有客人的出生日期。

assistant: SELECT date_of_birth FROM Guests WHERE gender_code  =  "男性"
Schema: CREATE TABLE Guests (date_of_birth VARCHAR, gender_code VARCHAR)
user: 所有“男性”性别的客人出生日期是多少？

assistant: SELECT date_of_birth FROM Guests WHERE gender_code  =  "男性"
Schema: CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, apt_id VARCHAR), CREATE TABLE Apartments (apt_number VARCHAR, apt_id VARCHAR)
user: 显示所有公寓预订的公寓号码、开始日期和结束日期。

assistant: 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
Schema: CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, apt_id VARCHAR), CREATE TABLE Apartments (apt_number VARCHAR, apt_id VARCHAR)
user: 每个公寓的预订号码是多少，开始日期和结束日期是多少？

assistant: 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
Schema: CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, apt_id VARCHAR), CREATE TABLE Apartments (apt_type_code VARCHAR, apt_id VARCHAR)
user: “双人房”型公寓的预订开始和结束日期是什么？

assistant: 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  =  "双人房"
Schema: CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, apt_id VARCHAR), CREATE TABLE Apartments (apt_type_code VARCHAR, apt_id VARCHAR)
user: 返回具有类型代码“双人房”的公寓的预订开始日期和结束日期。

assistant: 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  =  "双人房"
Schema: CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, apt_id VARCHAR), CREATE TABLE Apartments (bedroom_count INTEGER, apt_id VARCHAR)
user: 有两间以上卧室的公寓的预订开始和结束日期是什么？

assistant: 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
Schema: CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, apt_id VARCHAR), CREATE TABLE Apartments (bedroom_count INTEGER, apt_id VARCHAR)
user: 查找具有两个以上卧室的公寓的预订开始日期和结束日期。

assistant: 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
Schema: CREATE TABLE Apartment_Bookings (apt_id VARCHAR, booking_status_code VARCHAR), CREATE TABLE Apartments (apt_number VARCHAR, apt_id VARCHAR)
user: 公寓号码为“634”的公寓的预订状态码是多少？

assistant: 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"
Schema: CREATE TABLE Apartment_Bookings (apt_id VARCHAR, booking_status_code VARCHAR), CREATE TABLE Apartments (apt_number VARCHAR, apt_id VARCHAR)
user: 请告诉我“634”公寓的预订状态代码。

assistant: 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"
Schema: CREATE TABLE Apartment_Bookings (apt_id VARCHAR, booking_status_code VARCHAR), CREATE TABLE Apartments (apt_number VARCHAR, apt_id VARCHAR)
user: 显示具有状态码“确认”的预订的公寓的不同公寓号码。

assistant: 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  =  "确认"
Schema: CREATE TABLE Apartment_Bookings (apt_id VARCHAR, booking_status_code VARCHAR), CREATE TABLE Apartments (apt_number VARCHAR, apt_id VARCHAR)
user: 哪些公寓预订有状态代码“确认”？返回他们的公寓号码。

assistant: 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  =  "确认"
Schema: CREATE TABLE Apartment_Bookings (apt_id VARCHAR, booking_status_code VARCHAR), CREATE TABLE Apartments (apt_id VARCHAR)
user: 显示具有预订状态码“临时”的公寓的平均房间数。

assistant: 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  =  "临时"
Schema: CREATE TABLE Apartment_Bookings (apt_id VARCHAR, booking_status_code VARCHAR), CREATE TABLE Apartments (apt_id VARCHAR)
user: 预订状态代码为“临时”的公寓的平均房间数量是多少？

assistant: 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  =  "临时"
Schema: CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, guest_id VARCHAR), CREATE TABLE Guests (guest_id VARCHAR, guest_first_name VARCHAR)
user: 显示客人的名字，开始日期和结束日期的所有公寓预订。

assistant: 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
Schema: CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, guest_id VARCHAR), CREATE TABLE Guests (guest_id VARCHAR, guest_first_name VARCHAR)
user: 预订每套公寓的客人姓名、开始日期和结束日期是什么？

assistant: 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
Schema: CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, guest_id VARCHAR), CREATE TABLE Guests (guest_id VARCHAR, gender_code VARCHAR)
user: 显示所有性别代码为“女”的客人所预订的公寓的开始日期和结束日期。

assistant: 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  =  "女"
Schema: CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, guest_id VARCHAR), CREATE TABLE Guests (guest_id VARCHAR, gender_code VARCHAR)
user: 女宾(性别代码为“女”)预订公寓的开始日期和结束日期是什么？

assistant: 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  =  "女"
Schema: CREATE TABLE Apartment_Bookings (guest_id VARCHAR, booking_status_code VARCHAR), CREATE TABLE Guests (guest_id VARCHAR, guest_last_name VARCHAR, guest_first_name VARCHAR)
user: 显示状态码为“确认”的所有预定公寓的客人的名字和姓氏。

assistant: 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  =  "确认"
Schema: CREATE TABLE Apartment_Bookings (guest_id VARCHAR, booking_status_code VARCHAR), CREATE TABLE Guests (guest_id VARCHAR, guest_last_name VARCHAR, guest_first_name VARCHAR)
user: 哪些客人公寓预订的状态代码为“确认”？返回他们的名字和姓。

assistant: 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  =  "确认"
Schema: CREATE TABLE Apartment_Facilities (facility_code VARCHAR, apt_id VARCHAR), CREATE TABLE Apartments (bedroom_count INTEGER, apt_id VARCHAR)
user: 展示多余4间卧室的公寓的设施代码。

assistant: 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
Schema: CREATE TABLE Apartment_Facilities (facility_code VARCHAR, apt_id VARCHAR), CREATE TABLE Apartments (bedroom_count INTEGER, apt_id VARCHAR)
user: 有多余四间卧室的公寓的设施代码是什么？

assistant: 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
Schema: CREATE TABLE Apartment_Facilities (facility_code VARCHAR, apt_id VARCHAR), CREATE TABLE Apartments (room_count INTEGER, apt_id VARCHAR)
user: 显示全部有设施代码“体育馆”的公寓房间总数。

assistant: 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  =  "体育馆"
Schema: CREATE TABLE Apartment_Facilities (facility_code VARCHAR, apt_id VARCHAR), CREATE TABLE Apartments (room_count INTEGER, apt_id VARCHAR)
user: 找出有设施代码“体育馆”的公寓里房间总数。

assistant: 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  =  "体育馆"
Schema: CREATE TABLE Apartment_Buildings (building_id VARCHAR, building_short_name VARCHAR), CREATE TABLE Apartments (building_id VARCHAR, room_count INTEGER)
user: 显示以“如家”为缩写的所有公寓的房间的数目。

assistant: 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  =  "如家"
Schema: CREATE TABLE Apartment_Buildings (building_id VARCHAR, building_short_name VARCHAR), CREATE TABLE Apartments (building_id VARCHAR, room_count INTEGER)
user: 简称为“如家”的这栋楼里共有多少个房间？

assistant: 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  =  "如家"
Schema: CREATE TABLE Apartment_Buildings (building_id VARCHAR, building_address VARCHAR), CREATE TABLE Apartments (bathroom_count INTEGER, building_id VARCHAR)
user: 显示拥有超过两个浴室的公寓楼的地址。

assistant: 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
Schema: CREATE TABLE Apartment_Buildings (building_id VARCHAR, building_address VARCHAR), CREATE TABLE Apartments (bathroom_count INTEGER, building_id VARCHAR)
user: 哪些建筑物有两个以上浴室的公寓？把建筑的地址告诉我。

assistant: 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
Schema: CREATE TABLE Apartment_Buildings (building_id VARCHAR, building_manager VARCHAR), CREATE TABLE Apartments (building_id VARCHAR, apt_number VARCHAR, apt_type_code VARCHAR)
user: 显示在“小波”管理的建筑物中公寓类型代码和公寓号码。

assistant: 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  =  "小波"
Schema: CREATE TABLE Apartment_Buildings (building_id VARCHAR, building_manager VARCHAR), CREATE TABLE Apartments (building_id VARCHAR, apt_number VARCHAR, apt_type_code VARCHAR)
user: “小波”管理的建筑物有哪些公寓类型代码和公寓号码？

assistant: 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  =  "小波"
Schema: CREATE TABLE Apartment_Bookings (booking_status_code VARCHAR)
user: 显示预订状态代码和相应预定的数量。

assistant: SELECT 	booking_status_code ,  COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code
Schema: CREATE TABLE Apartment_Bookings (booking_status_code VARCHAR)
user: 每个预订状态有多少预订？列出预订状态代码和相应预订的数量。

assistant: SELECT 	booking_status_code ,  COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code
Schema: CREATE TABLE Apartments (apt_number VARCHAR, room_count VARCHAR)
user: 按房间数升序，返回所有公寓的号码。

assistant: SELECT apt_number FROM Apartments ORDER BY room_count ASC
Schema: CREATE TABLE Apartments (apt_number VARCHAR, room_count VARCHAR)
user: 按房间数量的升序给公寓号排序。

assistant: SELECT apt_number FROM Apartments ORDER BY room_count ASC
Schema: CREATE TABLE Apartments (bedroom_count VARCHAR, apt_number VARCHAR)
user: 返回卧室最多的房间号。

assistant: SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1
Schema: CREATE TABLE Apartments (bedroom_count VARCHAR, apt_number VARCHAR)
user: 床最多的公寓的公寓号码是多少？

assistant: SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1
Schema: CREATE TABLE Apartments (apt_type_code VARCHAR)
user: 按公寓数量升序排序，显示公寓类型代码和对应的公寓数量。

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

assistant: SELECT apt_type_code ,  COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) ASC
Schema: CREATE TABLE Apartments (room_count INTEGER, apt_type_code VARCHAR)
user: 显示按平均房间数降序排列前3位的公寓类型代码。

assistant: SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY avg(room_count) DESC LIMIT 3
Schema: CREATE TABLE Apartments (room_count INTEGER, apt_type_code VARCHAR)
user: 平均客房数量前三的公寓类型是什么？

assistant: SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY avg(room_count) DESC LIMIT 3
Schema: CREATE TABLE Apartments (bedroom_count VARCHAR, room_count INTEGER, bathroom_count VARCHAR, apt_type_code VARCHAR)
user: 显示总房间数最多的公寓类型代码，以及浴室数量和卧室数量。

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

assistant: SELECT apt_type_code ,  bathroom_count ,  bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY sum(room_count) DESC LIMIT 1
Schema: CREATE TABLE Apartments (apt_type_code VARCHAR)
user: 显示出现最多次数的公寓类型代码。

assistant: SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE Apartments (apt_type_code VARCHAR)
user: 哪种公寓类型的代码出现次数最多？

assistant: SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE Apartments (bathroom_count INTEGER, apt_type_code VARCHAR)
user: 显示超过1个浴室的公寓中出现次数最多的公寓类型代码。

assistant: SELECT apt_type_code FROM Apartments WHERE bathroom_count  >  1 GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE Apartments (bathroom_count INTEGER, apt_type_code VARCHAR)
user: 在多于一间浴室的公寓中，哪种公寓类型代码出现的次数最多？

assistant: SELECT apt_type_code FROM Apartments WHERE bathroom_count  >  1 GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE Apartments (room_count INTEGER, apt_type_code VARCHAR)
user: 显示每个公寓类型代码，以及每个类型的最大和最小房间数量。

assistant: SELECT apt_type_code ,  max(room_count) ,  min(room_count) FROM Apartments GROUP BY apt_type_code
Schema: CREATE TABLE Apartments (room_count INTEGER, apt_type_code VARCHAR)
user: 返回每种公寓类型代码以及每种类型中的最大和最小房间数量。

assistant: SELECT apt_type_code ,  max(room_count) ,  min(room_count) FROM Apartments GROUP BY apt_type_code
Schema: CREATE TABLE Guests (gender_code VARCHAR)
user: 按数目按降序排序，显示每个性别代码和对应的客人的数目。

assistant: SELECT gender_code ,  COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC
Schema: CREATE TABLE Guests (gender_code VARCHAR)
user: 按照客人数量的降序对性别代码进行排序。返回性别代码和数量。

assistant: SELECT gender_code ,  COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC
Schema: CREATE TABLE Apartments (apt_id VARCHAR), CREATE TABLE Apartment_Facilities (apt_id VARCHAR)
user: 有多少公寓没有任何设施？

assistant: SELECT count(*) FROM Apartments WHERE apt_id NOT IN (SELECT apt_id FROM Apartment_Facilities)
Schema: CREATE TABLE Apartments (apt_id VARCHAR), CREATE TABLE Apartment_Facilities (apt_id VARCHAR)
user: 找到没有设施的公寓数量。

assistant: SELECT count(*) FROM Apartments WHERE apt_id NOT IN (SELECT apt_id FROM Apartment_Facilities)
Schema: CREATE TABLE Apartment_Bookings (apt_id VARCHAR, booking_status_code VARCHAR), CREATE TABLE Apartments (apt_number VARCHAR, apt_id VARCHAR)
user: 显示带有“临时”和“确认”状态代码的预订的公寓的公寓编号。

assistant: 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  =  "临时"
Schema: CREATE TABLE Apartment_Bookings (apt_id VARCHAR, booking_status_code VARCHAR), CREATE TABLE Apartments (apt_number VARCHAR, apt_id VARCHAR)
user: 哪些被预订的公寓的状态码为“临时”和“确认”？把公寓号码给我。

assistant: 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  =  "临时"
Schema: CREATE TABLE Apartments (apt_number VARCHAR, apt_id VARCHAR), CREATE TABLE View_Unit_Status (available_yn VARCHAR, apt_id VARCHAR)
user: 显示单元状态可用性均为0和1的公寓数。

assistant: 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
Schema: CREATE TABLE Apartments (apt_number VARCHAR, apt_id VARCHAR), CREATE TABLE View_Unit_Status (available_yn VARCHAR, apt_id VARCHAR)
user: 哪些公寓的单位可用性为0和1？返回他们的公寓号码。

assistant: 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
Schema: CREATE TABLE game (season INTEGER)
user: 2007赛季后有多少场比赛？

assistant: SELECT count(*) FROM game WHERE season  >  2007
Schema: CREATE TABLE game (Date VARCHAR, home_team VARCHAR)
user: 按主队名称降序排列，列出比赛日期。

assistant: SELECT Date FROM game ORDER BY home_team DESC
Schema: CREATE TABLE game (season VARCHAR, away_team VARCHAR, home_team VARCHAR)
user: 列出所有比赛项目的赛季、主队、客场。

assistant: SELECT season ,  home_team ,  away_team FROM game
Schema: CREATE TABLE stadium (home_games INTEGER)
user: 每个体育场举办的最大、最小和平均主场比赛是什么？

assistant: SELECT max(home_games) ,  min(home_games) ,  avg(home_games) FROM stadium