jtjt520j/cspider_for_chinese_llama2_1.3b huggingface dataset:
Schema: CREATE TABLE products (product_category_code VARCHAR, product_name VARCHAR, color_code VARCHAR), CREATE TABLE ref_product_categories (product_category_code VARCHAR, unit_of_measure VARCHAR), CREATE TABLE ref_colors (color_code VARCHAR, color_description VARCHAR)
user: 哪些产品颜色不是“白色”，并且不以“一把”为单位进行测量？

assistant: SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code  =  t2.product_category_code JOIN ref_colors AS t3 ON t1.color_code  =  t3.color_code WHERE t3.color_description  =  "白色" AND t2.unit_of_measure != "一把"
Schema: CREATE TABLE products (color_code VARCHAR), CREATE TABLE ref_colors (color_code VARCHAR, color_description VARCHAR)
user: 最多数产品的颜色描述是什么？

assistant: SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code GROUP BY t2.color_description ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE products (color_code VARCHAR), CREATE TABLE ref_colors (color_code VARCHAR, color_description VARCHAR)
user: 返回所有产品中最常见的颜色描述。

assistant: SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code GROUP BY t2.color_description ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE products (color_code VARCHAR), CREATE TABLE ref_colors (color_code VARCHAR, color_description VARCHAR)
user: 对最少产品使用的颜色描述是什么？

assistant: SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code GROUP BY t2.color_description ORDER BY count(*) ASC LIMIT 1
Schema: CREATE TABLE products (color_code VARCHAR), CREATE TABLE ref_colors (color_code VARCHAR, color_description VARCHAR)
user: 给出产品间最不常见的颜色描述。

assistant: SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code GROUP BY t2.color_description ORDER BY count(*) ASC LIMIT 1
Schema: CREATE TABLE products (product_id VARCHAR), CREATE TABLE product_characteristics (product_id VARCHAR, characteristic_id VARCHAR), CREATE TABLE CHARACTERISTICS (characteristic_name VARCHAR, characteristic_id VARCHAR)
user: 大多数产品使用的特征名称是什么？

assistant: SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id GROUP BY t3.characteristic_name ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE products (product_id VARCHAR), CREATE TABLE product_characteristics (product_id VARCHAR, characteristic_id VARCHAR), CREATE TABLE CHARACTERISTICS (characteristic_name VARCHAR, characteristic_id VARCHAR)
user: 返回所有产品中最常见的特性名称。

assistant: SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id GROUP BY t3.characteristic_name ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE CHARACTERISTICS (other_characteristic_details VARCHAR, characteristic_data_type VARCHAR, characteristic_name VARCHAR, characteristic_id VARCHAR), CREATE TABLE product_characteristics (characteristic_id VARCHAR)
user: 那些从未被任何产品使用的特征的名称、细节和数据类型是什么？

assistant: SELECT characteristic_name ,  other_characteristic_details ,  characteristic_data_type FROM CHARACTERISTICS EXCEPT SELECT t1.characteristic_name ,  t1.other_characteristic_details ,  t1.characteristic_data_type FROM CHARACTERISTICS AS t1 JOIN product_characteristics AS t2 ON t1.characteristic_id  =  t2.characteristic_id
Schema: CREATE TABLE CHARACTERISTICS (other_characteristic_details VARCHAR, characteristic_data_type VARCHAR, characteristic_name VARCHAR, characteristic_id VARCHAR), CREATE TABLE product_characteristics (characteristic_id VARCHAR)
user: 给出任何产品中都没有的特征的名称、细节和数据类型。

assistant: SELECT characteristic_name ,  other_characteristic_details ,  characteristic_data_type FROM CHARACTERISTICS EXCEPT SELECT t1.characteristic_name ,  t1.other_characteristic_details ,  t1.characteristic_data_type FROM CHARACTERISTICS AS t1 JOIN product_characteristics AS t2 ON t1.characteristic_id  =  t2.characteristic_id
Schema: CREATE TABLE products (product_id VARCHAR), CREATE TABLE product_characteristics (product_id VARCHAR, characteristic_id VARCHAR), CREATE TABLE CHARACTERISTICS (characteristic_name VARCHAR, characteristic_id VARCHAR)
user: 在所有产品中，至少有两次使用的特征名称是什么？

assistant: SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id GROUP BY t3.characteristic_name HAVING count(*)  >= 2
Schema: CREATE TABLE products (product_id VARCHAR), CREATE TABLE product_characteristics (product_id VARCHAR, characteristic_id VARCHAR), CREATE TABLE CHARACTERISTICS (characteristic_name VARCHAR, characteristic_id VARCHAR)
user: 给出两个或多个产品的特性名称？

assistant: SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id GROUP BY t3.characteristic_name HAVING count(*)  >= 2
Schema: CREATE TABLE Ref_colors (color_code VARCHAR), CREATE TABLE products (color_code VARCHAR)
user: 什么颜色从来没有被任何产品使用？

assistant: SELECT count(*) FROM Ref_colors WHERE color_code NOT IN ( SELECT color_code FROM products )
Schema: CREATE TABLE Ref_colors (color_code VARCHAR), CREATE TABLE products (color_code VARCHAR)
user: 计算任何产品中没有使用的颜色的数量。

assistant: SELECT count(*) FROM Ref_colors WHERE color_code NOT IN ( SELECT color_code FROM products )
Schema: CREATE TABLE event (Id VARCHAR)
user: 有多少活动？

assistant: SELECT count(*) FROM event
Schema: CREATE TABLE event (name VARCHAR, YEAR VARCHAR)
user: 将所有事件名称按从最新到最老的年份列出。

assistant: SELECT name FROM event ORDER BY YEAR DESC
Schema: CREATE TABLE event (name VARCHAR, YEAR VARCHAR)
user: 最近的一年发生的事件的名称是什么？

assistant: SELECT name FROM event ORDER BY YEAR DESC LIMIT 1
Schema: CREATE TABLE stadium (Id VARCHAR)
user: 有多少个体育场？

assistant: SELECT count(*) FROM stadium
Schema: CREATE TABLE stadium (capacity VARCHAR, name VARCHAR)
user: 找出具有最大容量的体育场名称。

assistant: SELECT name FROM stadium ORDER BY capacity DESC LIMIT 1
Schema: CREATE TABLE stadium (name VARCHAR, capacity INTEGER)
user: 找出容量小于平均容量的体育场馆的名称。

assistant: SELECT name FROM stadium WHERE capacity  <  (SELECT avg(capacity) FROM stadium)
Schema: CREATE TABLE stadium (country VARCHAR)
user: 找到拥有最多球场的国家。

assistant: SELECT country FROM stadium GROUP BY country ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE stadium (country VARCHAR)
user: 哪个国家有最多3个体育场馆在名单上？

assistant: SELECT country FROM stadium GROUP BY country HAVING count(*)  <=  3
Schema: CREATE TABLE stadium (country VARCHAR, capacity INTEGER)
user: 哪个国家既有容量大于60000个的体育场馆，又有容量小于50000个的体育场？

assistant: SELECT country FROM stadium WHERE capacity  >  60000 INTERSECT SELECT country FROM stadium WHERE capacity  <  50000
Schema: CREATE TABLE stadium (city VARCHAR, opening_year INTEGER)
user: 有多少个城市有在2006年前开放的体育场？

assistant: SELECT count(DISTINCT city) FROM stadium WHERE opening_year  <  2006
Schema: CREATE TABLE stadium (country VARCHAR)
user: 每个国家有多少个体育场馆？

assistant: SELECT country ,  count(*) FROM stadium GROUP BY country
Schema: CREATE TABLE stadium (country VARCHAR, opening_year INTEGER)
user: 哪些国家没有在2006后开放的体育场？

assistant: SELECT country FROM stadium EXCEPT SELECT country FROM stadium WHERE opening_year  >  2006
Schema: CREATE TABLE stadium (country VARCHAR)
user: 在“俄罗斯”这个国家有多少个体育场？

assistant: SELECT count(*) FROM stadium WHERE country != '俄罗斯'
Schema: CREATE TABLE swimmer (name VARCHAR, meter_100 VARCHAR)
user: 找出所有游泳运动员的名字，按他们的100米成绩按升序排列。

assistant: SELECT name FROM swimmer ORDER BY meter_100
Schema: CREATE TABLE swimmer (nationality VARCHAR)
user: 游泳运动员来自多少个不同的国家？

assistant: SELECT count(DISTINCT nationality) FROM swimmer
Schema: CREATE TABLE swimmer (nationality VARCHAR)
user: 列出有一个以上游泳运动员的国家。

assistant: SELECT nationality ,  count(*) FROM swimmer GROUP BY nationality HAVING count(*)  >  1
Schema: CREATE TABLE swimmer (nationality VARCHAR, meter_300 VARCHAR, meter_200 VARCHAR)
user: 找出所有200米和300米游泳成绩且国籍是“澳大利亚”的游泳运动员。

assistant: SELECT meter_200 ,  meter_300 FROM swimmer WHERE nationality  =  '澳大利亚'
Schema: CREATE TABLE swimmer (id VARCHAR, name VARCHAR), CREATE TABLE record (swimmer_id VARCHAR)
user: 找出有结果是“胜利”的游泳运动员的名字。

assistant: SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id WHERE RESULT  =  '胜利'
Schema: CREATE TABLE stadium (id VARCHAR, name VARCHAR), CREATE TABLE event (stadium_id VARCHAR)
user: 举办最多赛事的体育场叫什么名字？

assistant: SELECT t1.name FROM stadium AS t1 JOIN event AS t2 ON t1.id  =  t2.stadium_id GROUP BY t2.stadium_id ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE stadium (capacity VARCHAR, name VARCHAR, id VARCHAR), CREATE TABLE event (name VARCHAR, stadium_id VARCHAR)
user: 找出“世界杯”活动发生的体育场的名称及其容量。

assistant: SELECT t1.name ,  t1.capacity FROM stadium AS t1 JOIN event AS t2 ON t1.id  =  t2.stadium_id WHERE t2.name  =  '世界杯'
Schema: CREATE TABLE stadium (id VARCHAR, name VARCHAR, stadium_id VARCHAR), CREATE TABLE event (id VARCHAR, name VARCHAR, stadium_id VARCHAR)
user: 找到那些从来没有举办过活动的体育场馆的名字。

assistant: SELECT name FROM stadium WHERE id NOT IN (SELECT stadium_id FROM event)
Schema: CREATE TABLE swimmer (id VARCHAR, name VARCHAR), CREATE TABLE record (swimmer_id VARCHAR)
user: 找出有最多数量记录的游泳者的名字。

assistant: SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id GROUP BY t2.swimmer_id ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE swimmer (id VARCHAR, name VARCHAR), CREATE TABLE record (swimmer_id VARCHAR)
user: 找到至少有2条记录的游泳运动员的名字。

assistant: SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id GROUP BY t2.swimmer_id HAVING count(*)  >=  2
Schema: CREATE TABLE swimmer (id VARCHAR, name VARCHAR, nationality VARCHAR), CREATE TABLE record (swimmer_id VARCHAR)
user: 找出“胜利”1次以上比赛的游泳运动员的姓名和国籍。

assistant: SELECT t1.name ,  t1.nationality FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id WHERE RESULT  =  '胜利' GROUP BY t2.swimmer_id HAVING count(*)  >  1
Schema: CREATE TABLE swimmer (id VARCHAR, name VARCHAR, swimmer_id VARCHAR), CREATE TABLE record (id VARCHAR, name VARCHAR, swimmer_id VARCHAR)
user: 找出没有记录的游泳运动员的名字。

assistant: SELECT name FROM swimmer WHERE id NOT IN (SELECT swimmer_id FROM record)
Schema: CREATE TABLE swimmer (id VARCHAR, name VARCHAR), CREATE TABLE record (swimmer_id VARCHAR)
user: 找出在记录中同时有“胜利”和“失败”结果的游泳运动员的名字。

assistant: SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id WHERE RESULT  =  '胜利' INTERSECT SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id WHERE RESULT  =  '输'
Schema: CREATE TABLE swimmer (id VARCHAR, nationality VARCHAR), CREATE TABLE record (event_id VARCHAR, swimmer_id VARCHAR), CREATE TABLE event (id VARCHAR, stadium_id VARCHAR), CREATE TABLE stadium (id VARCHAR, name VARCHAR)
user: 找出“澳大利亚”游泳运动员去过的体育场馆的名字。

assistant: SELECT t4.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id JOIN event AS t3 ON t2.event_id  =  t3.id JOIN stadium AS t4 ON t4.id  =  t3.stadium_id WHERE t1.nationality  =  '澳大利亚'
Schema: CREATE TABLE record (event_id VARCHAR), CREATE TABLE event (id VARCHAR, stadium_id VARCHAR), CREATE TABLE stadium (id VARCHAR, name VARCHAR)
user: 找出那些游泳运动员去过的体育场馆的名称。

assistant: SELECT t3.name FROM record AS t1 JOIN event AS t2 ON t1.event_id  =  t2.id JOIN stadium AS t3 ON t3.id  =  t2.stadium_id GROUP BY t2.stadium_id ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE swimmer (Id VARCHAR)
user: 找出每个游泳运动员的所有细节。

assistant: SELECT * FROM swimmer
Schema: CREATE TABLE stadium (opening_year VARCHAR, capacity INTEGER)
user: 2005年度开放的体育场的平均容量是多少？

assistant: SELECT avg(capacity) FROM stadium WHERE opening_year  =  2005
Schema: CREATE TABLE railway (Id VARCHAR)
user: 有多少条铁路？

assistant: SELECT count(*) FROM railway
Schema: CREATE TABLE railway (Builder VARCHAR)
user: 按字母顺序升序排列列出铁路的建设者。

assistant: SELECT Builder FROM railway ORDER BY Builder ASC
Schema: CREATE TABLE railway (Wheels VARCHAR, LOCATION VARCHAR)
user: 列出铁路的轮子和位置。

assistant: SELECT Wheels ,  LOCATION FROM railway
Schema: CREATE TABLE manager (Country VARCHAR, LEVEL INTEGER)
user: 那些国籍不是“澳大利亚”经理的最高水平是什么？

assistant: SELECT max(LEVEL) FROM manager WHERE Country != "澳大利亚"
Schema: CREATE TABLE manager (Age INTEGER)
user: 所有经理的平均年龄是多少？

assistant: SELECT avg(Age) FROM manager
Schema: CREATE TABLE manager (LEVEL VARCHAR, Name VARCHAR)
user: 按等级升序排列经理的姓名是什么？

assistant: SELECT Name FROM manager ORDER BY LEVEL ASC
Schema: CREATE TABLE train (Arrival VARCHAR, Name VARCHAR)
user: 列车的名称和到达时间是多少？

assistant: SELECT Name ,  Arrival FROM train
Schema: CREATE TABLE manager (Age VARCHAR, Name VARCHAR)
user: 最老的经理叫什么名字？

assistant: SELECT Name FROM manager ORDER BY Age DESC LIMIT 1
Schema: CREATE TABLE railway (Location VARCHAR, Railway_ID VARCHAR), CREATE TABLE train (Name VARCHAR, Railway_ID VARCHAR)
user: 显示火车的名称和他们所在铁路的位置。

assistant: SELECT T2.Name ,  T1.Location FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID  =  T2.Railway_ID
Schema: CREATE TABLE railway (Builder VARCHAR, Railway_ID VARCHAR), CREATE TABLE train (Name VARCHAR, Railway_ID VARCHAR)
user: 显示与“和谐号”列车相关的铁路建设商。

assistant: SELECT T1.Builder FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID  =  T2.Railway_ID WHERE T2.Name  =  "和谐号"
Schema: CREATE TABLE railway (Location VARCHAR, Railway_ID VARCHAR), CREATE TABLE train (Railway_ID VARCHAR)
user: 显示与超过一辆列车关联的铁路的ID和位置。

assistant: SELECT T2.Railway_ID ,  T1.Location FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID  =  T2.Railway_ID GROUP BY T2.Railway_ID HAVING COUNT(*)  >  1
Schema: CREATE TABLE railway (Builder VARCHAR, Railway_ID VARCHAR), CREATE TABLE train (Railway_ID VARCHAR)
user: 显示与做多数量列车相关的铁路的ID和建设者。

assistant: SELECT T2.Railway_ID ,  T1.Builder FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID  =  T2.Railway_ID GROUP BY T2.Railway_ID ORDER BY COUNT(*) DESC LIMIT 1
Schema: CREATE TABLE railway (Builder VARCHAR)
user: 显示不同的铁路建设者，以及使用每个建设者建设的相应数量的铁路。

assistant: SELECT Builder ,  COUNT(*) FROM railway GROUP BY Builder
Schema: CREATE TABLE railway (Builder VARCHAR)
user: 展示铁路最常见的建设者。

assistant: SELECT Builder FROM railway GROUP BY Builder ORDER BY COUNT(*) DESC LIMIT 1
Schema: CREATE TABLE railway (LOCATION VARCHAR)
user: 显示不同位置的铁路以及每个位置的相应铁路的数量。

assistant: SELECT LOCATION ,  COUNT(*) FROM railway GROUP BY LOCATION
Schema: CREATE TABLE railway (LOCATION VARCHAR)
user: 显示有超过一条铁路的位置。

assistant: SELECT LOCATION FROM railway GROUP BY LOCATION HAVING COUNT(*)  >  1
Schema: CREATE TABLE railway (ObjectNumber VARCHAR, Railway_ID VARCHAR), CREATE TABLE train (ObjectNumber VARCHAR, Railway_ID VARCHAR)
user: 列出没有火车的铁路的目标数。

assistant: SELECT ObjectNumber FROM railway WHERE Railway_ID NOT IN (SELECT Railway_ID FROM train)
Schema: CREATE TABLE manager (Country VARCHAR, Age INTEGER)
user: 展示那些既有50岁以上经理又有46岁以下经理的国家。

assistant: SELECT Country FROM manager WHERE Age  >  50 INTERSECT SELECT Country FROM manager WHERE Age  <  46
Schema: CREATE TABLE manager (Country VARCHAR)
user: 展示管理者的不同国家。

assistant: SELECT DISTINCT Country FROM manager
Schema: CREATE TABLE manager (LEVEL VARCHAR, Working_year_starts VARCHAR)
user: 按级别顺序递减显示经理的工作年限。

assistant: SELECT Working_year_starts FROM manager ORDER BY LEVEL DESC
Schema: CREATE TABLE manager (Country VARCHAR, Age INTEGER)
user: 显示年龄在50岁以上或46岁以下的管理人员所在的国家。

assistant: SELECT Country FROM manager WHERE Age  >  50 OR Age  <  46
Schema: CREATE TABLE addresses (country VARCHAR)
user: “中国”这个国家有多少个地址？

assistant: SELECT count(*) FROM addresses WHERE country  =  '中国'
Schema: CREATE TABLE addresses (city VARCHAR)
user: 显示在地址记录中的所有不同的城市。

assistant: SELECT DISTINCT city FROM addresses
Schema: CREATE TABLE addresses (state_province_county VARCHAR)
user: 显示每个省和每个省中的地址数量。

assistant: SELECT state_province_county ,  count(*) FROM addresses GROUP BY state_province_county
Schema: CREATE TABLE customers (customer_phone VARCHAR, customer_name VARCHAR, customer_id VARCHAR), CREATE TABLE customer_address_history (customer_phone VARCHAR, customer_name VARCHAR, customer_id VARCHAR)
user: 显示没有地址信息的客户的姓名和电话。

assistant: SELECT customer_name ,  customer_phone FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM customer_address_history)
Schema: CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR), CREATE TABLE customer_orders (customer_id VARCHAR)
user: 显示订单量最多的客户的名字。

assistant: SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE products (product_type_code VARCHAR)
user: 显示具有至少两个产品的产品类型代码。

assistant: SELECT product_type_code FROM products GROUP BY product_type_code HAVING count(*)  >=  2
Schema: CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR), CREATE TABLE customer_orders (order_status_code VARCHAR, customer_id VARCHAR)
user: 显示既具有“完成”状态的订单又具有“部分”状态的订单的客户的名字。

assistant: SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.order_status_code  =  '完成' INTERSECT SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.order_status_code  =  '部分'
Schema: CREATE TABLE customers (customer_phone VARCHAR, customer_name VARCHAR, payment_method_code VARCHAR, customer_number VARCHAR)
user: 按照客户编号的降序显示所有客户的名称、电话和支付方法代码。

assistant: SELECT customer_name ,  customer_phone ,  payment_method_code FROM customers ORDER BY customer_number DESC
Schema: CREATE TABLE products (product_id VARCHAR, product_name VARCHAR), CREATE TABLE order_items (order_quantity INTEGER, product_id VARCHAR)
user: 显示每个产品的产品名称和总订单数量。

assistant: SELECT T1.product_name ,  sum(T2.order_quantity) FROM products AS T1 JOIN order_items AS T2 ON T1.product_id  =  T2.product_id GROUP BY T1.product_id
Schema: CREATE TABLE products (product_price INTEGER)
user: 显示所有产品的最小，最大，平均价格。

assistant: SELECT min(product_price) ,  max(product_price) ,  avg(product_price) FROM products
Schema: CREATE TABLE products (product_price INTEGER)
user: 有多少产品的价格高于平均水平？

assistant: SELECT count(*) FROM products WHERE product_price  >  (SELECT avg(product_price) FROM products)
Schema: CREATE TABLE customer_address_history (date_from VARCHAR, customer_id VARCHAR, date_to VARCHAR, address_id VARCHAR), CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR), CREATE TABLE addresses (address_id VARCHAR, city VARCHAR)
user: 显示每个客户地址历史的客户名称、客户地址城市、起始日期和送达日期。

assistant: SELECT T2.customer_name ,  T3.city ,  T1.date_from ,  T1.date_to FROM customer_address_history AS T1 JOIN customers AS T2 ON T1.customer_id  =  T2.customer_id JOIN addresses AS T3 ON T1.address_id  =  T3.address_id
Schema: CREATE TABLE customers (customer_name VARCHAR, payment_method_code VARCHAR, customer_id VARCHAR), CREATE TABLE customer_orders (customer_id VARCHAR)
user: 显示使用“信用卡”付款方式并有2个以上订单的客户的姓名。

assistant: SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id WHERE T1.payment_method_code  =  '信用卡' GROUP BY T1.customer_id HAVING count(*)  >  2
Schema: CREATE TABLE customers (customer_phone VARCHAR, customer_name VARCHAR, customer_id VARCHAR), CREATE TABLE customer_orders (order_id VARCHAR, customer_id VARCHAR), CREATE TABLE order_items (order_quantity INTEGER, order_id VARCHAR)
user: 订购数量最多的顾客的姓名和电话是什么？

assistant: SELECT  T1.customer_name ,  T1.customer_phone FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id JOIN order_items AS T3 ON T3.order_id  =  T2.order_id GROUP BY T1.customer_id ORDER BY sum(T3.order_quantity) DESC LIMIT 1
Schema: CREATE TABLE products (product_price INTEGER, product_name VARCHAR, product_type_code VARCHAR)
user: 显示价格高于1000或低于500的产品类型和名称。

assistant: SELECT product_type_code ,  product_name FROM products WHERE product_price  >  1000 OR product_price  <  500
Schema: CREATE TABLE dorm (gender VARCHAR, dorm_name VARCHAR)
user: 找出仅为女性使用的宿舍名称（“女性”性别）。

assistant: SELECT dorm_name FROM dorm WHERE gender  =  'F'
Schema: CREATE TABLE dorm (gender VARCHAR, dorm_name VARCHAR)
user: 仅为“女性”使用的宿舍的名字是什么？

assistant: SELECT dorm_name FROM dorm WHERE gender  =  'F'
Schema: CREATE TABLE dorm (dorm_name VARCHAR, student_capacity INTEGER)
user: 找出能容纳超过300名学生的宿舍名称。

assistant: SELECT dorm_name FROM dorm WHERE student_capacity  >  300
Schema: CREATE TABLE dorm (dorm_name VARCHAR, student_capacity INTEGER)
user: 可以容纳超过300名学生住宿的宿舍名字是什么？

assistant: SELECT dorm_name FROM dorm WHERE student_capacity  >  300
Schema: CREATE TABLE student (sex VARCHAR, age INTEGER)
user: 年龄在25岁以下的女生有多少？（性别是“女性”）

assistant: SELECT count(*) FROM student WHERE sex  =  'F' AND age  <  25
Schema: CREATE TABLE student (sex VARCHAR, age INTEGER)
user: 25岁以下的“女”学生有多少？

assistant: SELECT count(*) FROM student WHERE sex  =  'F' AND age  <  25
Schema: CREATE TABLE student (fname VARCHAR, age INTEGER)
user: 找出20岁以上的学生的名字。

assistant: SELECT fname FROM student WHERE age  >  20
Schema: CREATE TABLE student (fname VARCHAR, age INTEGER)
user: 20岁以上的学生的名字是什么？

assistant: SELECT fname FROM student WHERE age  >  20
Schema: CREATE TABLE student (fname VARCHAR, age INTEGER, city_code VARCHAR)
user: 找出年龄在20到25岁之间且住在城市“天津”的学生的名字。

assistant: SELECT fname FROM student WHERE city_code  =  '天津' AND age BETWEEN 20 AND 25
Schema: CREATE TABLE student (fname VARCHAR, age INTEGER, city_code VARCHAR)
user: 住在"天津"市的20至25岁学生的名字是什么？

assistant: SELECT fname FROM student WHERE city_code  =  '天津' AND age BETWEEN 20 AND 25
Schema: CREATE TABLE dorm (Id VARCHAR)
user: 有多少宿舍？

assistant: SELECT count(*) FROM dorm
Schema: CREATE TABLE dorm (Id VARCHAR)
user: 数据库中有多少个宿舍？

assistant: SELECT count(*) FROM dorm
Schema: CREATE TABLE dorm_amenity (Id VARCHAR)
user: 找出不同的宿舍设施的数量。

assistant: SELECT count(*) FROM dorm_amenity
Schema: CREATE TABLE dorm_amenity (Id VARCHAR)
user: 有多少不同的宿舍设施？

assistant: SELECT count(*) FROM dorm_amenity
Schema: CREATE TABLE dorm (student_capacity INTEGER)
user: 找到所有宿舍的总容量。

assistant: SELECT sum(student_capacity) FROM dorm
Schema: CREATE TABLE dorm (student_capacity INTEGER)
user: 所有宿舍的学生总人数是多少？

assistant: SELECT sum(student_capacity) FROM dorm
Schema: CREATE TABLE student (Id VARCHAR)
user: 有多少学生？

assistant: SELECT count(*) FROM student
Schema: CREATE TABLE student (age INTEGER, city_code VARCHAR)
user: 找出每个城市学生的平均年龄。

assistant: SELECT avg(age) ,  city_code FROM student GROUP BY city_code
Schema: CREATE TABLE student (age INTEGER, city_code VARCHAR)
user: 每个城市的平均年龄是什么？那些城市是什么？

assistant: SELECT avg(age) ,  city_code FROM student GROUP BY city_code
Schema: CREATE TABLE dorm (gender VARCHAR, student_capacity INTEGER)
user: 找出具有性别是“X”的学生宿舍的平均容量和总容量。

assistant: SELECT avg(student_capacity) ,  sum(student_capacity) FROM dorm WHERE gender  =  'X'
Schema: CREATE TABLE dorm (gender VARCHAR, student_capacity INTEGER)
user: 所有性别为“X”的宿舍的平均和总容量是多少？

assistant: SELECT avg(student_capacity) ,  sum(student_capacity) FROM dorm WHERE gender  =  'X'
Schema: CREATE TABLE has_amenity (dormid VARCHAR)
user: 找到一些有宿舍设施的宿舍。

assistant: SELECT count(DISTINCT dormid) FROM has_amenity
Schema: CREATE TABLE has_amenity (dormid VARCHAR)
user: 有多少宿舍有设施？

assistant: SELECT count(DISTINCT dormid) FROM has_amenity
Schema: CREATE TABLE dorm (dormid VARCHAR, dorm_name VARCHAR), CREATE TABLE has_amenity (dormid VARCHAR, dorm_name VARCHAR)
user: 找到没有设施的宿舍的名字

assistant: SELECT dorm_name FROM dorm WHERE dormid NOT IN (SELECT dormid FROM has_amenity)
Schema: CREATE TABLE dorm (dormid VARCHAR, dorm_name VARCHAR), CREATE TABLE has_amenity (dormid VARCHAR, dorm_name VARCHAR)
user: 所有没有设施的宿舍的名字是什么？

assistant: SELECT dorm_name FROM dorm WHERE dormid NOT IN (SELECT dormid FROM has_amenity)
Schema: CREATE TABLE dorm (gender VARCHAR)
user: 找出宿舍的不同性别的数量。

assistant: SELECT count(DISTINCT gender) FROM dorm
Schema: CREATE TABLE dorm (gender VARCHAR)
user: 宿舍里有多少不同性别的人？

assistant: SELECT count(DISTINCT gender) FROM dorm
Schema: CREATE TABLE dorm (student_capacity VARCHAR, gender VARCHAR, dorm_name VARCHAR)
user: 找出名字中包含“慧”字的宿舍中学生的能力和性别.

assistant: SELECT student_capacity ,  gender FROM dorm WHERE dorm_name LIKE '慧'