jtjt520j/cspider_for_chinese_llama2_1.3b huggingface dataset:
Schema: CREATE TABLE products (product_id VARCHAR, product_name VARCHAR), CREATE TABLE complaints (product_id VARCHAR)
user: 所有不同的产品名称是什么 ，以及每个收到多少投诉？

assistant: SELECT t1.product_name ,  count(*) FROM products AS t1 JOIN complaints AS t2 ON t1.product_id  =  t2.product_id GROUP BY t1.product_name
Schema: CREATE TABLE customers (customer_id VARCHAR, email_address VARCHAR), CREATE TABLE complaints (customer_id VARCHAR)
user: 找出那些对产品投诉最多的那个客户的电子邮件。

assistant: SELECT t1.email_address FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id  =  t2.customer_id GROUP BY t1.customer_id ORDER BY count(*) LIMIT 1
Schema: CREATE TABLE customers (customer_id VARCHAR, email_address VARCHAR), CREATE TABLE complaints (customer_id VARCHAR)
user: 对产品投诉最多的客户的电子邮件是什么？

assistant: SELECT t1.email_address FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id  =  t2.customer_id GROUP BY t1.customer_id ORDER BY count(*) LIMIT 1
Schema: CREATE TABLE products (product_id VARCHAR, product_name VARCHAR), CREATE TABLE complaints (product_id VARCHAR), CREATE TABLE customers (customer_id VARCHAR)
user: 哪些产品被最少的客户投诉？

assistant: SELECT DISTINCT t1.product_name FROM products AS t1 JOIN complaints AS t2 ON t1.product_id  =  t2.product_id JOIN customers AS t3 GROUP BY t3.customer_id ORDER BY count(*) LIMIT 1
Schema: CREATE TABLE products (product_id VARCHAR, product_name VARCHAR), CREATE TABLE complaints (product_id VARCHAR), CREATE TABLE customers (customer_id VARCHAR)
user: 返回提交最少客户投诉的产品名称。

assistant: SELECT DISTINCT t1.product_name FROM products AS t1 JOIN complaints AS t2 ON t1.product_id  =  t2.product_id JOIN customers AS t3 GROUP BY t3.customer_id ORDER BY count(*) LIMIT 1
Schema: CREATE TABLE customers (customer_id VARCHAR, phone_number VARCHAR), CREATE TABLE complaints (date_complaint_raised VARCHAR, customer_id VARCHAR)
user: 最近投诉的客户的电话号码是多少？

assistant: SELECT t1.phone_number FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id  =  t2.customer_id ORDER BY t2.date_complaint_raised DESC LIMIT 1
Schema: CREATE TABLE customers (customer_id VARCHAR, phone_number VARCHAR), CREATE TABLE complaints (date_complaint_raised VARCHAR, customer_id VARCHAR)
user: 返回最近提出的投诉的客户的电话号码。

assistant: SELECT t1.phone_number FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id  =  t2.customer_id ORDER BY t2.date_complaint_raised DESC LIMIT 1
Schema: CREATE TABLE customers (customer_id VARCHAR, phone_number VARCHAR, email_address VARCHAR), CREATE TABLE complaints (customer_id VARCHAR, phone_number VARCHAR, email_address VARCHAR)
user: 找出以前从未提出过投诉的客户的电子邮件和电话号码。

assistant: SELECT email_address ,  phone_number FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM complaints)
Schema: CREATE TABLE customers (customer_id VARCHAR, phone_number VARCHAR, email_address VARCHAR), CREATE TABLE complaints (customer_id VARCHAR, phone_number VARCHAR, email_address VARCHAR)
user: 那些从未提出投诉的顾客的电子邮件和电话号码是什么？

assistant: SELECT email_address ,  phone_number FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM complaints)
Schema: CREATE TABLE customers (phone_number VARCHAR), CREATE TABLE staff (phone_number VARCHAR)
user: 找出所有客户和员工的电话号码。

assistant: SELECT phone_number FROM customers UNION SELECT phone_number FROM staff
Schema: CREATE TABLE customers (phone_number VARCHAR), CREATE TABLE staff (phone_number VARCHAR)
user: 所有客户和所有员工的电话号码是多少？

assistant: SELECT phone_number FROM customers UNION SELECT phone_number FROM staff
Schema: CREATE TABLE products (product_description VARCHAR, product_name VARCHAR)
user: 对“巧克力”的描述是什么？

assistant: SELECT product_description FROM products WHERE product_name  =  "巧克力"
Schema: CREATE TABLE products (product_description VARCHAR, product_name VARCHAR)
user: 返回被称为“巧克力”的产品的描述。

assistant: SELECT product_description FROM products WHERE product_name  =  "巧克力"
Schema: CREATE TABLE products (product_category_code VARCHAR, product_name VARCHAR, product_price VARCHAR)
user: 找出最贵产品的名称和类别。

assistant: SELECT product_name ,  product_category_code FROM products ORDER BY product_price DESC LIMIT 1
Schema: CREATE TABLE products (product_category_code VARCHAR, product_name VARCHAR, product_price VARCHAR)
user: 价格最高的产品名称和类别代码是什么？

assistant: SELECT product_name ,  product_category_code FROM products ORDER BY product_price DESC LIMIT 1
Schema: CREATE TABLE products (product_id VARCHAR, product_price VARCHAR), CREATE TABLE complaints (product_id VARCHAR, product_price VARCHAR)
user: 找出未收到过投诉的产品的价格。

assistant: SELECT product_price FROM products WHERE product_id NOT IN (SELECT product_id FROM complaints)
Schema: CREATE TABLE products (product_id VARCHAR, product_price VARCHAR), CREATE TABLE complaints (product_id VARCHAR, product_price VARCHAR)
user: 没有投诉的产品的价格是多少？

assistant: SELECT product_price FROM products WHERE product_id NOT IN (SELECT product_id FROM complaints)
Schema: CREATE TABLE products (product_category_code VARCHAR, product_price INTEGER)
user: 每种类别产品的平均价格是多少？

assistant: SELECT avg(product_price) ,  product_category_code FROM products GROUP BY product_category_code
Schema: CREATE TABLE products (product_category_code VARCHAR, product_price INTEGER)
user: 返回具有每个类别代码的产品的平均价格。

assistant: SELECT avg(product_price) ,  product_category_code FROM products GROUP BY product_category_code
Schema: CREATE TABLE staff (staff_id VARCHAR, last_name VARCHAR), CREATE TABLE complaints (product_id VARCHAR, staff_id VARCHAR), CREATE TABLE products (product_id VARCHAR, product_price VARCHAR)
user: 找出处理最便宜产品投诉的工作人员的姓氏。

assistant: SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id  =  t2.staff_id JOIN products AS t3 ON t2.product_id  =  t3.product_id ORDER BY t3.product_price LIMIT 1
Schema: CREATE TABLE staff (staff_id VARCHAR, last_name VARCHAR), CREATE TABLE complaints (product_id VARCHAR, staff_id VARCHAR), CREATE TABLE products (product_id VARCHAR, product_price VARCHAR)
user: 负责投诉产品价格最低的工作人员的姓氏是什么？

assistant: SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id  =  t2.staff_id JOIN products AS t3 ON t2.product_id  =  t3.product_id ORDER BY t3.product_price LIMIT 1
Schema: CREATE TABLE complaints (complaint_status_code VARCHAR)
user: 哪种投诉状态在文件上有超过3条记录？

assistant: SELECT complaint_status_code FROM complaints GROUP BY complaint_status_code HAVING count(*)  >  3
Schema: CREATE TABLE complaints (complaint_status_code VARCHAR)
user: 返回投诉状态代码有超过3个的相应投诉？

assistant: SELECT complaint_status_code FROM complaints GROUP BY complaint_status_code HAVING count(*)  >  3
Schema: CREATE TABLE staff (last_name VARCHAR, email_address VARCHAR)
user: 查找其电子邮件地址包含“westlake”的员工的姓氏。

assistant: SELECT last_name FROM staff WHERE email_address LIKE "%westlake%"
Schema: CREATE TABLE staff (last_name VARCHAR, email_address VARCHAR)
user: 包含子字符串“westlake”的电子邮件地址的工作人员的姓氏是什么？

assistant: SELECT last_name FROM staff WHERE email_address LIKE "%westlake%"
Schema: CREATE TABLE customers (customer_type_code VARCHAR)
user: 客户最多的客户类型有多少客户？

assistant: SELECT count(*) FROM customers GROUP BY customer_type_code ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE customers (customer_type_code VARCHAR)
user: 计算具有最常见的客户类型的客户数量。

assistant: SELECT count(*) FROM customers GROUP BY customer_type_code ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE staff (staff_id VARCHAR, last_name VARCHAR), CREATE TABLE complaints (staff_id VARCHAR, date_complaint_raised VARCHAR)
user: 处理过第一次投诉的员工的姓氏是什么？

assistant: SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id  =  t2.staff_id ORDER BY t2.date_complaint_raised LIMIT 1
Schema: CREATE TABLE staff (staff_id VARCHAR, last_name VARCHAR), CREATE TABLE complaints (staff_id VARCHAR, date_complaint_raised VARCHAR)
user: 返回以最早的日期处理投诉的工作人员的姓氏。

assistant: SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id  =  t2.staff_id ORDER BY t2.date_complaint_raised LIMIT 1
Schema: CREATE TABLE complaints (complaint_type_code VARCHAR)
user: 数据库中有多少不同的投诉类型代码？

assistant: SELECT count(DISTINCT complaint_type_code) FROM complaints
Schema: CREATE TABLE complaints (complaint_type_code VARCHAR)
user: 计算不同类型投诉代码的数量。

assistant: SELECT count(DISTINCT complaint_type_code) FROM complaints
Schema: CREATE TABLE customers (address_line_2 VARCHAR, address_line_1 VARCHAR, email_address VARCHAR)
user: 用电子邮件“vbogisich@qq.org”查找客户地址的第1行和第2行。

assistant: SELECT address_line_1 ,  address_line_2 FROM customers WHERE email_address  =  "vbogisich@qq.org"
Schema: CREATE TABLE customers (address_line_2 VARCHAR, address_line_1 VARCHAR, email_address VARCHAR)
user: 电子邮件“vbogisich@qq.org”中客户地址的第一行和第二行是什么？

assistant: SELECT address_line_1 ,  address_line_2 FROM customers WHERE email_address  =  "vbogisich@qq.org"
Schema: CREATE TABLE complaints (complaint_status_code VARCHAR, complaint_type_code VARCHAR)
user: 为每个投诉状态找出具有“产品故障”类型的投诉数量。

assistant: SELECT complaint_status_code ,  count(*) FROM complaints WHERE complaint_type_code  =  "产品故障" GROUP BY complaint_status_code
Schema: CREATE TABLE complaints (complaint_status_code VARCHAR, complaint_type_code VARCHAR)
user: 对于“产品故障”类型代码的投诉，每个不同的状态代码有多少个？

assistant: SELECT complaint_status_code ,  count(*) FROM complaints WHERE complaint_type_code  =  "产品故障" GROUP BY complaint_status_code
Schema: CREATE TABLE staff (staff_id VARCHAR, first_name VARCHAR), CREATE TABLE complaints (staff_id VARCHAR)
user: 处理投诉最多的前5名员工的名字是什么？

assistant: SELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id  =  t2.staff_id GROUP BY t2.staff_id ORDER BY count(*) LIMIT 5
Schema: CREATE TABLE staff (staff_id VARCHAR, first_name VARCHAR), CREATE TABLE complaints (staff_id VARCHAR)
user: 返回处理投诉最多的5名员工的名字。

assistant: SELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id  =  t2.staff_id GROUP BY t2.staff_id ORDER BY count(*) LIMIT 5
Schema: CREATE TABLE customers (state VARCHAR)
user: 哪个省的客户最多？

assistant: SELECT state FROM customers GROUP BY state ORDER BY count(*) LIMIT 1
Schema: CREATE TABLE customers (state VARCHAR)
user: 给出拥有最多顾客的省。

assistant: SELECT state FROM customers GROUP BY state ORDER BY count(*) LIMIT 1
Schema: CREATE TABLE submission (Id VARCHAR)
user: 有多少提交意见？

assistant: SELECT count(*) FROM submission
Schema: CREATE TABLE submission (Id VARCHAR)
user: 统计提交的数量。

assistant: SELECT count(*) FROM submission
Schema: CREATE TABLE submission (Author VARCHAR, Scores VARCHAR)
user: 按分数升序排列提交的作者。

assistant: SELECT Author FROM submission ORDER BY Scores ASC
Schema: CREATE TABLE submission (Author VARCHAR, Scores VARCHAR)
user: 找出每个提交的作者，并按提交分数的升序列出它们。

assistant: SELECT Author FROM submission ORDER BY Scores ASC
Schema: CREATE TABLE submission (Author VARCHAR, College VARCHAR)
user: 提交的作者和他们的学院是什么？

assistant: SELECT Author ,  College FROM submission
Schema: CREATE TABLE submission (Author VARCHAR, College VARCHAR)
user: 对于每一个提交，显示作者及其附属学院。

assistant: SELECT Author ,  College FROM submission
Schema: CREATE TABLE submission (Author VARCHAR, College VARCHAR)
user: 显示“浙江”大学或“南京”大学的作者姓名

assistant: SELECT Author FROM submission WHERE College  =  "浙江" OR College  =  "南京"
Schema: CREATE TABLE submission (Author VARCHAR, College VARCHAR)
user: 哪些提交的作者来自“浙江”大学或“南京”大学？

assistant: SELECT Author FROM submission WHERE College  =  "浙江" OR College  =  "南京"
Schema: CREATE TABLE submission (Scores INTEGER)
user: 提交的平均分数是多少？

assistant: SELECT avg(Scores) FROM submission
Schema: CREATE TABLE submission (Scores INTEGER)
user: 计算提交的平均分数。

assistant: SELECT avg(Scores) FROM submission
Schema: CREATE TABLE submission (Author VARCHAR, Scores VARCHAR)
user: 提交分数最高的作者是什么？

assistant: SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1
Schema: CREATE TABLE submission (Author VARCHAR, Scores VARCHAR)
user: 找出在提交中获得最高分数的作者。

assistant: SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1
Schema: CREATE TABLE submission (College VARCHAR)
user: 显示不同的大学以及每个学大学提交论文的作者数量。

assistant: SELECT College ,  COUNT(*) FROM submission GROUP BY College
Schema: CREATE TABLE submission (College VARCHAR)
user: 对于每个大学，返回大学名称和从该大学提交的作者计数。

assistant: SELECT College ,  COUNT(*) FROM submission GROUP BY College
Schema: CREATE TABLE submission (College VARCHAR)
user: 显示最常见的大学提交的作者。

assistant: SELECT College FROM submission GROUP BY College ORDER BY COUNT(*) DESC LIMIT 1
Schema: CREATE TABLE submission (College VARCHAR)
user: 哪一所大学的提交的作者最多？

assistant: SELECT College FROM submission GROUP BY College ORDER BY COUNT(*) DESC LIMIT 1
Schema: CREATE TABLE submission (College VARCHAR, Scores INTEGER)
user: 显示那些提交分数大于90的作者和提交分数小于80的作者的大学。

assistant: SELECT College FROM submission WHERE Scores  >  90 INTERSECT SELECT College FROM submission WHERE Scores  <  80
Schema: CREATE TABLE submission (College VARCHAR, Scores INTEGER)
user: 哪些大学有提交分数在90以上的作者和80以下的作者？

assistant: SELECT College FROM submission WHERE Scores  >  90 INTERSECT SELECT College FROM submission WHERE Scores  <  80
Schema: CREATE TABLE acceptance (Submission_ID VARCHAR, Result VARCHAR), CREATE TABLE submission (Author VARCHAR, Submission_ID VARCHAR)
user: 显示提交的作者及其提交的接受结果。

assistant: SELECT T2.Author ,  T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID  =  T2.Submission_ID
Schema: CREATE TABLE acceptance (Submission_ID VARCHAR, Result VARCHAR), CREATE TABLE submission (Author VARCHAR, Submission_ID VARCHAR)
user: 对于每个提交，找出其作者和接受结果。

assistant: SELECT T2.Author ,  T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID  =  T2.Submission_ID
Schema: CREATE TABLE acceptance (Submission_ID VARCHAR, Result VARCHAR), CREATE TABLE submission (Submission_ID VARCHAR, Scores VARCHAR)
user: 显示最高分数的提交结果。

assistant: SELECT T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID  =  T2.Submission_ID ORDER BY T2.Scores DESC LIMIT 1
Schema: CREATE TABLE acceptance (Submission_ID VARCHAR, Result VARCHAR), CREATE TABLE submission (Submission_ID VARCHAR, Scores VARCHAR)
user: 在录取结果中，录取分数最高。把结果显示给我。

assistant: SELECT T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID  =  T2.Submission_ID ORDER BY T2.Scores DESC LIMIT 1
Schema: CREATE TABLE acceptance (Submission_ID VARCHAR, workshop_id VARCHAR), CREATE TABLE submission (Author VARCHAR, Submission_ID VARCHAR)
user: 显示每个作者和他们提交的研习会数量。

assistant: SELECT T2.Author ,  COUNT(DISTINCT T1.workshop_id) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID  =  T2.Submission_ID GROUP BY T2.Author
Schema: CREATE TABLE acceptance (Submission_ID VARCHAR, workshop_id VARCHAR), CREATE TABLE submission (Author VARCHAR, Submission_ID VARCHAR)
user: 每个作者提交了多少个研习会？返回作者姓名和研习会的数量。

assistant: SELECT T2.Author ,  COUNT(DISTINCT T1.workshop_id) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID  =  T2.Submission_ID GROUP BY T2.Author
Schema: CREATE TABLE acceptance (Submission_ID VARCHAR, workshop_id VARCHAR), CREATE TABLE submission (Author VARCHAR, Submission_ID VARCHAR)
user: 显示提交给一个以上研习会的作者。

assistant: SELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID  =  T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_id)  >  1
Schema: CREATE TABLE acceptance (Submission_ID VARCHAR, workshop_id VARCHAR), CREATE TABLE submission (Author VARCHAR, Submission_ID VARCHAR)
user: 哪些作者提交了一个以上的研习会？

assistant: SELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID  =  T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_id)  >  1
Schema: CREATE TABLE workshop (Date VARCHAR, Venue VARCHAR)
user: 按照场地的升序显示每个研讨会的日期和地点。

assistant: SELECT Date ,  Venue FROM workshop ORDER BY Venue
Schema: CREATE TABLE workshop (Date VARCHAR, Venue VARCHAR)
user: 按场地的字母顺序对每个研习会进行排序。返回每个研习会的日期和地点。

assistant: SELECT Date ,  Venue FROM workshop ORDER BY Venue
Schema: CREATE TABLE submission (Author VARCHAR, Submission_ID VARCHAR), CREATE TABLE acceptance (Author VARCHAR, Submission_ID VARCHAR)
user: 列出没有提交到任何研习会的作者。

assistant: SELECT Author FROM submission WHERE Submission_ID NOT IN (SELECT Submission_ID FROM acceptance)
Schema: CREATE TABLE submission (Author VARCHAR, Submission_ID VARCHAR), CREATE TABLE acceptance (Author VARCHAR, Submission_ID VARCHAR)
user: 哪些作者没有提交任何研习会？

assistant: SELECT Author FROM submission WHERE Submission_ID NOT IN (SELECT Submission_ID FROM acceptance)
Schema: CREATE TABLE INVESTORS (Id VARCHAR)
user: 找出投资者总数。

assistant: SELECT count(*) FROM INVESTORS
Schema: CREATE TABLE INVESTORS (Investor_details VARCHAR)
user: 显示所有投资者的详细信息。

assistant: SELECT Investor_details FROM INVESTORS
Schema: CREATE TABLE LOTS (lot_details VARCHAR)
user: 显示所有不同批次的细节。

assistant: SELECT DISTINCT lot_details FROM LOTS
Schema: CREATE TABLE TRANSACTIONS (amount_of_transaction INTEGER)
user: 显示最大交易量。

assistant: SELECT max(amount_of_transaction) FROM TRANSACTIONS
Schema: CREATE TABLE TRANSACTIONS (date_of_transaction VARCHAR, share_count VARCHAR)
user: 显示交易的所有日期和份额数。

assistant: SELECT date_of_transaction ,  share_count FROM TRANSACTIONS
Schema: CREATE TABLE TRANSACTIONS (share_count INTEGER)
user: 交易的总份额是多少？

assistant: SELECT sum(share_count) FROM TRANSACTIONS
Schema: CREATE TABLE TRANSACTIONS (transaction_id VARCHAR, transaction_type_code VARCHAR)
user: 显示所有带有“PUR”的交易码的交易ID 。

assistant: SELECT transaction_id FROM TRANSACTIONS WHERE transaction_type_code  =  "PUR"
Schema: CREATE TABLE TRANSACTIONS (date_of_transaction VARCHAR, transaction_type_code VARCHAR)
user: 显示类型代码为“销售中”的所有交易的日期。

assistant: SELECT date_of_transaction FROM TRANSACTIONS WHERE transaction_type_code  =  "销售中"
Schema: CREATE TABLE TRANSACTIONS (amount_of_transaction INTEGER, transaction_type_code VARCHAR)
user: 显示类型代码为“销售中”的平均交易量。

assistant: SELECT avg(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code  =  "销售中"
Schema: CREATE TABLE Ref_Transaction_Types (transaction_type_description VARCHAR, transaction_type_code VARCHAR)
user: 显示代码为“PUR”的交易类型的描述。

assistant: SELECT transaction_type_description FROM Ref_Transaction_Types WHERE transaction_type_code	  =  "PUR"
Schema: CREATE TABLE TRANSACTIONS (amount_of_transaction INTEGER, share_count INTEGER, transaction_type_code VARCHAR)
user: 显示类型代码为“PUR”且份额数大于50的交易的最小数量。

assistant: SELECT min(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code  =  "PUR" AND share_count  >  50
Schema: CREATE TABLE TRANSACTIONS (amount_of_transaction INTEGER, share_count INTEGER)
user: 显示金额小于10000的交易的最大份额数

assistant: SELECT max(share_count) FROM TRANSACTIONS WHERE amount_of_transaction  <  10000
Schema: CREATE TABLE TRANSACTIONS (amount_of_transaction INTEGER, share_count INTEGER, date_of_transaction VARCHAR)
user: 显示份额数大于100且数量大于1000的交易日期。

assistant: SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count  >  100 OR amount_of_transaction  >  1000
Schema: CREATE TABLE Ref_Transaction_Types (transaction_type_description VARCHAR, transaction_type_code VARCHAR), CREATE TABLE TRANSACTIONS (share_count INTEGER, date_of_transaction VARCHAR, transaction_type_code VARCHAR)
user: 显示份额数小于10的交易类型描述和日期。

assistant: SELECT T1.transaction_type_description ,  T2.date_of_transaction FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code  =  T2.transaction_type_code WHERE T2.share_count  <  10
Schema: CREATE TABLE INVESTORS (investor_id VARCHAR, Investor_details VARCHAR), CREATE TABLE TRANSACTIONS (investor_id VARCHAR, share_count INTEGER)
user: 显示所有作出任何交易且股票计数超过100的投资者的细节。

assistant: SELECT T1.Investor_details FROM  INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id  =  T2.investor_id WHERE T2.share_count  >  100
Schema: CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR)
user: 在交易中使用了多少种不同的交易类型？

assistant: SELECT COUNT(DISTINCT transaction_type_code) FROM TRANSACTIONS
Schema: CREATE TABLE LOTS (investor_id VARCHAR, lot_details VARCHAR)
user: 返回批次细节和投资者ID 。

assistant: SELECT lot_details ,  investor_id FROM LOTS
Schema: CREATE TABLE INVESTORS (investor_id VARCHAR, Investor_details VARCHAR), CREATE TABLE LOTS (investor_id VARCHAR, lot_details VARCHAR)
user: 返回属于以细节“l”的投资者的大量批次细节。

assistant: SELECT T2.lot_details FROM INVESTORS AS T1 JOIN LOTS AS T2 ON  T1.investor_id  =  T2.investor_id WHERE T1.Investor_details  =  "l"
Schema: CREATE TABLE PURCHASES (purchase_details VARCHAR, purchase_transaction_id VARCHAR), CREATE TABLE TRANSACTIONS (transaction_id VARCHAR, amount_of_transaction INTEGER)
user: 购买金额大于10000的交易详情是什么？

assistant: SELECT T1.purchase_details FROM PURCHASES AS T1 JOIN TRANSACTIONS AS T2 ON T1.purchase_transaction_id  =  T2.transaction_id WHERE T2.amount_of_transaction  >  10000
Schema: CREATE TABLE SALES (sales_details VARCHAR, sales_transaction_id VARCHAR), CREATE TABLE TRANSACTIONS (transaction_id VARCHAR, amount_of_transaction INTEGER, date_of_transaction VARCHAR)
user: 金额小于3000的交易的销售细节和日期是什么？

assistant: SELECT T1.sales_details ,  T2.date_of_transaction FROM SALES AS T1 JOIN TRANSACTIONS AS T2 ON T1.sales_transaction_id  =  T2.transaction_id WHERE T2.amount_of_transaction  <  3000
Schema: CREATE TABLE LOTS (lot_id VARCHAR, lot_details VARCHAR), CREATE TABLE TRANSACTIONS_LOTS (transaction_id VARCHAR), CREATE TABLE TRANSACTIONS (transaction_id VARCHAR, share_count INTEGER)
user: 与份额数小于50的交易相关的批次的批次细节是什么？

assistant: SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id  =  T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id  =  T3.transaction_id WHERE T3.share_count  <  50
Schema: CREATE TABLE LOTS (lot_id VARCHAR, lot_details VARCHAR), CREATE TABLE TRANSACTIONS_LOTS (transaction_id VARCHAR), CREATE TABLE TRANSACTIONS (transaction_id VARCHAR, share_count INTEGER, transaction_type_code VARCHAR)
user: 与份额数大于100且类型代码为“PUR”的交易相关的批次的批次细节是什么？

assistant: SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON  T1.lot_id  =  T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id  =  T3.transaction_id WHERE T3.share_count  >  100 AND T3.transaction_type_code  =  "PUR"
Schema: CREATE TABLE TRANSACTIONS (amount_of_transaction INTEGER, transaction_type_code VARCHAR)
user: 显示不同交易类型的平均交易量。

assistant: SELECT transaction_type_code ,  avg(amount_of_transaction) FROM TRANSACTIONS GROUP BY transaction_type_code
Schema: CREATE TABLE TRANSACTIONS (share_count INTEGER, transaction_type_code VARCHAR)
user: 显示不同交易类型的最大和最小份额数。

assistant: SELECT transaction_type_code ,  max(share_count) ,  min(share_count) FROM TRANSACTIONS GROUP BY transaction_type_code
Schema: CREATE TABLE TRANSACTIONS (investor_id VARCHAR, share_count INTEGER)
user: 显示不同投资者的平均交易份额数。

assistant: SELECT investor_id ,  avg(share_count) FROM TRANSACTIONS GROUP BY investor_id
Schema: CREATE TABLE TRANSACTIONS (investor_id VARCHAR, share_count INTEGER)
user: 显示按平均份额数排序的每个投资者的交易平均份额数。

assistant: SELECT investor_id ,  avg(share_count) FROM TRANSACTIONS GROUP BY investor_id ORDER BY avg(share_count)
Schema: CREATE TABLE TRANSACTIONS (investor_id VARCHAR, amount_of_transaction INTEGER)
user: 显示不同投资者的平均交易量。

assistant: SELECT investor_id ,  avg(amount_of_transaction) FROM TRANSACTIONS GROUP BY investor_id
Schema: CREATE TABLE TRANSACTIONS (transaction_id VARCHAR), CREATE TABLE Transactions_Lots (lot_id VARCHAR, transaction_id VARCHAR)
user: 显示不同批次的平均交易量。

assistant: SELECT T2.lot_id ,  avg(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id  =  T2.transaction_id GROUP BY T2.lot_id
Schema: CREATE TABLE TRANSACTIONS (transaction_id VARCHAR), CREATE TABLE Transactions_Lots (lot_id VARCHAR, transaction_id VARCHAR)
user: 显示按平均交易量排序的不同批次的平均交易量。

assistant: SELECT T2.lot_id ,  avg(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id  =  T2.transaction_id GROUP BY T2.lot_id ORDER BY avg(amount_of_transaction)
Schema: CREATE TABLE TRANSACTIONS (investor_id VARCHAR, transaction_type_code VARCHAR)
user: 如果交易类型代码大于0，则显示不同投资者的交易编码为“销售中”的交易数量。

assistant: SELECT investor_id ,  COUNT(*) FROM TRANSACTIONS WHERE transaction_type_code  =  "销售中" GROUP BY investor_id
Schema: CREATE TABLE TRANSACTIONS (investor_id VARCHAR)
user: 显示不同投资者的交易数量。

assistant: SELECT investor_id ,  COUNT(*) FROM TRANSACTIONS GROUP BY investor_id
Schema: CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR)
user: 显示最少发生的交易类型代码。

assistant: SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) ASC LIMIT 1