jtjt520j/CSpider_for_Qwen huggingface dataset:
问题: 列举不同的注册日期和选举周期。

SQL: SELECT DISTINCT Registration_Date ,  Election_Cycle FROM VOTING_RECORD
问题: 不同的注册日期和选举周期是什么？

SQL: SELECT DISTINCT Registration_Date ,  Election_Cycle FROM VOTING_RECORD
问题: 报告不同的主席投票和副主席的投票。

SQL: SELECT DISTINCT President_Vote ,  VICE_President_Vote FROM VOTING_RECORD
问题: 列出所有不同的主席选票和副主席的选票。

SQL: SELECT DISTINCT President_Vote ,  VICE_President_Vote FROM VOTING_RECORD
问题: 找出有学生会主席选票的学生的不同姓氏。

SQL: SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.CLASS_President_VOTE
问题: 有学生会主席选票的学生的不同姓氏是什么？

SQL: SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.CLASS_President_VOTE
问题: 找出那些有班干部选票的学生的名字。

SQL: SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.CLASS_Senator_VOTE
问题: 有学生会主席投票的学生的不同的名字是什么？

SQL: SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.CLASS_Senator_VOTE
问题: 找出“秋季”选举周期中有秘书投票的学生的不同年龄。

SQL: SELECT DISTINCT T1.Age FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.Secretary_Vote WHERE T2.Election_Cycle  =  "秋季"
问题: 在“秋季”的选举周期中，有秘书投票的学生的不同年龄是什么？

SQL: SELECT DISTINCT T1.Age FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.Secretary_Vote WHERE T2.Election_Cycle  =  "秋季"
问题: 找出那些在“春季”选举周期中拥有财务员选票的学生中的不同的导师。

SQL: SELECT DISTINCT T1.Advisor FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.Treasurer_Vote WHERE T2.Election_Cycle  =  "春天"
问题: 谁担任过在“春季”选举周期中有财务员的选票的学生的导师？

SQL: SELECT DISTINCT T1.Advisor FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.Treasurer_Vote WHERE T2.Election_Cycle  =  "春天"
问题: 找出那些有财务员选票的学生的主修课程。

SQL: SELECT DISTINCT T1.Major FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.Treasurer_Vote
问题: 有财务员的选票的学生正在学习那些不同的主修课程？

SQL: SELECT DISTINCT T1.Major FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.Treasurer_Vote
问题: 找出所有有主席选票的女性（性别是“女性”）学生的名字和姓氏。

SQL: SELECT DISTINCT T1.Fname ,  T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.President_VOTE WHERE T1.sex  =  "F"
问题: 所有有主席选票的“女性”性别学生的名字和姓氏是什么？

SQL: SELECT DISTINCT T1.Fname ,  T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.President_VOTE WHERE T1.sex  =  "F"
问题: 找出所有有副主席投票的18岁学生的名字和姓氏。

SQL: SELECT DISTINCT T1.Fname ,  T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.VICE_President_VOTE WHERE T1.age  =  18
问题: 年龄是18岁且有副校长选票的学生的姓名是什么？

SQL: SELECT DISTINCT T1.Fname ,  T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.VICE_President_VOTE WHERE T1.age  =  18
问题: 在“秋季”的选举周期中，有多少男（"男性"）学生有班级干部成员的选票？

SQL: SELECT count(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  Class_Senator_Vote WHERE T1.Sex  =  "男" AND T2.Election_Cycle  =  "秋季"
问题: 计算“秋季”选举周期中拥有班级干部成员选票的性别是“男性”的学生的人数。

SQL: SELECT count(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  Class_Senator_Vote WHERE T1.Sex  =  "男" AND T2.Election_Cycle  =  "秋季"
问题: 找出城市编号为“上海”且在“春季”选举周期中有班级干部选票的学生的人数。

SQL: SELECT count(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  Class_Senator_Vote WHERE T1.city_code  =  "上海" AND T2.Election_Cycle  =  "春天"
问题: 哪些学生居住在代号为“上海”的城市，并在“春季”选举周期有班级干部的选票？统计其数量。

SQL: SELECT count(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  Class_Senator_Vote WHERE T1.city_code  =  "上海" AND T2.Election_Cycle  =  "春天"
问题: 找出居住在城市代号“上海”的城市并在“春季”选举周期有秘书投票的学生的平均年龄。

SQL: SELECT avg(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  SECRETARY_Vote WHERE T1.city_code  =  "上海" AND T2.Election_Cycle  =  "春天"
问题: 居住在城市代号“上海”的城市并在“春季”选举周期有秘书投票的学生的平均年龄是多少？

SQL: SELECT avg(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  SECRETARY_Vote WHERE T1.city_code  =  "上海" AND T2.Election_Cycle  =  "春天"
问题: 找出在“春季”选举周期有秘书投票的女性（性别是“女性”）学生的平均年龄。

SQL: SELECT avg(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  SECRETARY_Vote WHERE T1.Sex  =  "F" AND T2.Election_Cycle  =  "春天"
问题: 在“春季”选举周期中，有秘书投票的性别是“女性”学生的平均年龄是多少？

SQL: SELECT avg(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  SECRETARY_Vote WHERE T1.Sex  =  "F" AND T2.Election_Cycle  =  "春天"
问题: 找出所有拥有副主席选票且所在城市代码不是“沪”的学生的不同名字。

SQL: SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.VICE_PRESIDENT_Vote EXCEPT SELECT DISTINCT Fname FROM STUDENT WHERE city_code  =  "沪"
问题: 那些有副主席选票并居住在城市代码不是“沪”的城市的学生的名字是什么？

SQL: SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.VICE_PRESIDENT_Vote EXCEPT SELECT DISTINCT Fname FROM STUDENT WHERE city_code  =  "沪"
问题: 找出所有有主席选票且导师不是“2192”的学生的姓氏。

SQL: SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  PRESIDENT_Vote EXCEPT SELECT DISTINCT LName FROM STUDENT WHERE Advisor  =  "2192"
问题: 有主席选票但不是“2192”担任导师的学生有哪些不同的姓氏？

SQL: SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  PRESIDENT_Vote EXCEPT SELECT DISTINCT LName FROM STUDENT WHERE Advisor  =  "2192"
问题: 找出所有有主席选票且导师是“8741”的学生的姓氏。

SQL: SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  PRESIDENT_Vote INTERSECT SELECT DISTINCT LName FROM STUDENT WHERE Advisor  =  "8741"
问题: 同时拥有主席选票且其导师为“8741”的学生的不同姓氏有那些？

SQL: SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  PRESIDENT_Vote INTERSECT SELECT DISTINCT LName FROM STUDENT WHERE Advisor  =  "8741"
问题: 对于每位导师，报告接受其辅导的学生总数。

SQL: SELECT Advisor ,  count(*) FROM STUDENT GROUP BY Advisor
问题: 每位导师有多少学生？

SQL: SELECT Advisor ,  count(*) FROM STUDENT GROUP BY Advisor
问题: 报告所有指导超过2名学生的导师。

SQL: SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*)  >  2
问题: 哪些导师有指导两个以上的学生？

SQL: SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*)  >  2
问题: 报告所有少于3名学生的专业。

SQL: SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*)  <  3
问题: 什么专业只有不到三名学生在学习？

SQL: SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*)  <  3
问题: 对于每个选举周期，报告投票记录的数量。

SQL: SELECT Election_Cycle ,  count(*) FROM VOTING_RECORD GROUP BY Election_Cycle
问题: 统计每个选举周期的投票记录数。

SQL: SELECT Election_Cycle ,  count(*) FROM VOTING_RECORD GROUP BY Election_Cycle
问题: 哪个专业的学生最多？

SQL: SELECT Major FROM STUDENT GROUP BY major ORDER BY count(*) DESC LIMIT 1
问题: 找出学生人数最多的专业。

SQL: SELECT Major FROM STUDENT GROUP BY major ORDER BY count(*) DESC LIMIT 1
问题: “女性”学生中最常见的专业是什么？

SQL: SELECT Major FROM STUDENT WHERE Sex  =  "F" GROUP BY major ORDER BY count(*) DESC LIMIT 1
问题: 找到大多数“女生”学习的专业。

SQL: SELECT Major FROM STUDENT WHERE Sex  =  "F" GROUP BY major ORDER BY count(*) DESC LIMIT 1
问题: 大多数学生居住的城市的城市代码是什么？

SQL: SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY count(*) DESC LIMIT 1
问题: 返回拥有最多学生数量的城市代码。

SQL: SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY count(*) DESC LIMIT 1
问题: 报告有超过2名学生的不同的导师。

SQL: SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING count(*)  >  2
问题: 哪些导师指导超过2名学生？

SQL: SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING count(*)  >  2
问题: 有多少产品？

SQL: SELECT count(*) FROM products
问题: 统计产品的数量。

SQL: SELECT count(*) FROM products
问题: 有多少种颜色？

SQL: SELECT count(*) FROM ref_colors
问题: 计算颜色的数量。

SQL: SELECT count(*) FROM ref_colors
问题: 有多少特征？

SQL: SELECT count(*) FROM CHARACTERISTICS
问题: 计数特征数。

SQL: SELECT count(*) FROM CHARACTERISTICS
问题: 所有产品的名称和购买价格是多少？

SQL: SELECT product_name ,  typical_buying_price FROM products
问题: 返回所有产品的名称和各自的购买价格。

SQL: SELECT product_name ,  typical_buying_price FROM products
问题: 列出所有颜色的描述。

SQL: SELECT color_description FROM ref_colors
问题: 每种颜色的描述是什么？

SQL: SELECT color_description FROM ref_colors
问题: 找出所有产品特性的名称。

SQL: SELECT DISTINCT characteristic_name FROM CHARACTERISTICS
问题: 产品特性的不同名称是什么？

SQL: SELECT DISTINCT characteristic_name FROM CHARACTERISTICS
问题: 在“香料”类中产品的名称是什么？

SQL: SELECT product_name FROM products WHERE product_category_code  =  "香料"
问题: 返回在“香料”类中的产品名称。

SQL: SELECT product_name FROM products WHERE product_category_code  =  "香料"
问题: 列出“香草”类产品的名称、颜色描述和产品描述。

SQL: SELECT T1.product_name ,  T2.color_description ,  T1.product_description FROM products AS T1 JOIN Ref_colors AS T2 ON T1.color_code  =  T2.color_code WHERE product_category_code  =  "香草"
问题: “香草”类产品的名称、颜色描述和产品描述是什么？

SQL: SELECT T1.product_name ,  T2.color_description ,  T1.product_description FROM products AS T1 JOIN Ref_colors AS T2 ON T1.color_code  =  T2.color_code WHERE product_category_code  =  "香草"
问题: “种子”类别中有多少种产品？

SQL: SELECT count(*) FROM products WHERE product_category_code  =  "种子"
问题: 计算“种子”类别中的产品数量。

SQL: SELECT count(*) FROM products WHERE product_category_code  =  "种子"
问题: 找出产品类别为“香料”并且通常销售超过1000的产品的数量。

SQL: SELECT count(*) FROM products WHERE product_category_code  =  "香料" AND typical_buying_price  >  1000
问题: 有多少产品属于“香料”类别且通常价格超过1000？

SQL: SELECT count(*) FROM products WHERE product_category_code  =  "香料" AND typical_buying_price  >  1000
问题: 名为“茴香”的产品的类别和通常的购买价格是多少？

SQL: SELECT product_category_code ,  typical_buying_price FROM products WHERE product_name  =  "茴香"
问题: 返回“茴香”的分类代码和通常的价格。

SQL: SELECT product_category_code ,  typical_buying_price FROM products WHERE product_name  =  "茴香"
问题: 名为“亚麻”的产品属于哪一类？

SQL: SELECT product_category_code FROM products WHERE product_name  =  "亚麻"
问题: 名称为“亚麻”的产品所属类别的代码是什么？

SQL: SELECT product_category_code FROM products WHERE product_name  =  "亚麻"
问题: 颜色描述为“黄色”的产品名字是什么？

SQL: SELECT T1.product_name FROM products AS T1 JOIN ref_colors AS T2 ON T1.color_code  =  T2.color_code WHERE T2.color_description  =  '黄色'
问题: 给出具有颜色描述为“黄色”的产品的名称。

SQL: SELECT T1.product_name FROM products AS T1 JOIN ref_colors AS T2 ON T1.color_code  =  T2.color_code WHERE T2.color_description  =  '黄色'
问题: 查找描述中包括“强”的产品对应的类别描述。

SQL: SELECT T1.product_category_description FROM ref_product_categories AS T1 JOIN products AS T2 ON T1.product_category_code  =  T2.product_category_code WHERE T2.product_description LIKE '强'
问题: 产品描述重包含汉字强”的产品其类别描述是什么？

SQL: SELECT T1.product_category_description FROM ref_product_categories AS T1 JOIN products AS T2 ON T1.product_category_code  =  T2.product_category_code WHERE T2.product_description LIKE '强'
问题: 名称是“君子兰”产品的颜色描述是什么？

SQL: SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code WHERE t1.product_name  =  "君子兰"
问题: 给出产品“君子兰”的颜色描述。

SQL: SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code WHERE t1.product_name  =  "君子兰"
问题: 名字叫“鼠标”产品的颜色代码和描述是什么？

SQL: SELECT t1.color_code ,  t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code WHERE t1.product_name  =  "鼠标"
问题: 返回名称为“鼠标”的产品的颜色代码和描述。

SQL: SELECT t1.color_code ,  t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code WHERE t1.product_name  =  "鼠标"
问题: 查找具有至少两个特征的产品的id和颜色描述。

SQL: SELECT t1.product_id ,  t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code JOIN product_characteristics AS t3 ON t1.product_id  =  t3.product_id GROUP BY t1.product_id HAVING count(*)  >=  2
问题: 对于具有两个或多个特征的产品其产品标识和颜色描述是什么？

SQL: SELECT t1.product_id ,  t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code JOIN product_characteristics AS t3 ON t1.product_id  =  t3.product_id GROUP BY t1.product_id HAVING count(*)  >=  2
问题: 列出所有有颜色描述为“白色”的产品的名称。

SQL: SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code WHERE t2.color_description  =  "白色"
问题: 以“白色”作为其颜色描述的产品名称是什么？

SQL: SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code WHERE t2.color_description  =  "白色"
问题: 颜色被描述为“黄色”的产品的名称和通常的买卖价格是什么？

SQL: SELECT t1.product_name ,  t1.typical_buying_price ,  t1.typical_selling_price FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code WHERE t2.color_description  =  "黄色"
问题: 返回具有“黄色”作为颜色描述的产品的名称及其通常买卖的价格。

SQL: SELECT t1.product_name ,  t1.typical_buying_price ,  t1.typical_selling_price FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code WHERE t2.color_description  =  "黄色"
问题: 名为“芝麻”的产品有多少个特点？

SQL: SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id WHERE t1.product_name  =  "芝麻"
问题: 计算“芝麻”产品的特征数量。

SQL: SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id WHERE t1.product_name  =  "芝麻"
问题: 产品“芝麻”有多少个不同的特性名称？

SQL: SELECT count(DISTINCT 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 WHERE t1.product_name  =  "芝麻"
问题: 计算产品“芝麻”的不同特征名称的数量。

SQL: SELECT count(DISTINCT 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 WHERE t1.product_name  =  "芝麻"
问题: “芝麻”产品的所有特征名称是什么？

SQL: 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 WHERE t1.product_name  =  "芝麻"
问题: 返回产品名为“芝麻”的特征名称。

SQL: 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 WHERE t1.product_name  =  "芝麻"
问题: 列出产品“茴香”的所有特征名称和数据类型。

SQL: SELECT t3.characteristic_name ,  t3.characteristic_data_type 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 WHERE t1.product_name  =  "茴香"
问题: “茴香”产品的名称和数据类型是什么？

SQL: SELECT t3.characteristic_name ,  t3.characteristic_data_type 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 WHERE t1.product_name  =  "茴香"
问题: 列出具有“等级”的代码的“芝麻”产品的所有特征，。

SQL: 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 WHERE t1.product_name  =  "芝麻" AND t3.characteristic_type_code  =  "等级"
问题: 具有特征类型代码为“等级”的产品“芝麻”的特征的名称是什么？

SQL: 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 WHERE t1.product_name  =  "芝麻" AND t3.characteristic_type_code  =  "等级"
问题: 名为“月桂树”的产品有几个特点？

SQL: SELECT count(*) 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 WHERE t1.product_name  =  "月桂树"
问题: 计算名为“月桂树”的产品的数量。

SQL: SELECT count(*) 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 WHERE t1.product_name  =  "月桂树"
问题: 找出产品“亚麻”所具有的特性。

SQL: SELECT count(*) 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 WHERE t1.product_name  =  "亚麻"
问题: 计算“亚麻”产品的特征数量。

SQL: SELECT count(*) 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 WHERE t1.product_name  =  "亚麻"
问题: 查找具有颜色描述“红色”并且具有特征名称是“快速”的产品名称。

SQL: SELECT product_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 JOIN ref_colors AS t4 ON t1.color_code  =  t4.color_code WHERE t4.color_description  =  "红色" AND t3.characteristic_name  =  "快速"
问题: 哪些产品具有“红色”的颜色描述和“快速”的特征？

SQL: SELECT product_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 JOIN ref_colors AS t4 ON t1.color_code  =  t4.color_code WHERE t4.color_description  =  "红色" AND t3.characteristic_name  =  "快速"
问题: 有多少产品具有特证名是“热”的特性？

SQL: SELECT count(*) 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 WHERE t3.characteristic_name  =  "热"
问题: 计算具有“热”特性的产品的数量。

SQL: SELECT count(*) 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 WHERE t3.characteristic_name  =  "热"
问题: 列出具有“温暖”特征的所有产品的不同名称。

SQL: SELECT DISTINCT t1.product_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 WHERE t3.characteristic_name  =  "温暖"
问题: 对于具有“温暖”特性的产品，有哪些不同的产品名称？

SQL: SELECT DISTINCT t1.product_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 WHERE t3.characteristic_name  =  "温暖"
问题: 找出那些颜色描述为“红色”并具有“缓慢”特征的产品的数量。

SQL: SELECT count(*) 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 JOIN ref_colors AS t4 ON t1.color_code  =  t4.color_code WHERE t4.color_description  =  "红色" AND t3.characteristic_name  =  "缓慢"
问题: 有多少数量的产品具有颜色描述为“红色”和特征名称是“缓慢”？

SQL: SELECT count(*) 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 JOIN ref_colors AS t4 ON t1.color_code  =  t4.color_code WHERE t4.color_description  =  "红色" AND t3.characteristic_name  =  "缓慢"
问题: 数有颜色描述是“白色”或有特色名称是“热”的产品。

SQL: SELECT count(*) 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 JOIN ref_colors AS t4 ON t1.color_code  =  t4.color_code WHERE t4.color_description  =  "白色" OR t3.characteristic_name  =  "热"
问题: 有多少产品被描述为“白色”或有“热”这个名称的特征？

SQL: SELECT count(*) 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 JOIN ref_colors AS t4 ON t1.color_code  =  t4.color_code WHERE t4.color_description  =  "白色" OR t3.characteristic_name  =  "热"
问题: 产品类别代码“香草”的计量单位是什么？

SQL: SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code  =  "香草"
问题: 返回“香草”类别产品的计量单位。

SQL: SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code  =  "香草"
问题: 使用代码为“香料”查找产品类别的产品类别描述。

SQL: SELECT product_category_description FROM ref_product_categories WHERE product_category_code  =  "香料"
问题: 用代码“香料”的产品类别描述是什么？

SQL: SELECT product_category_description FROM ref_product_categories WHERE product_category_code  =  "香料"
问题: 什么是“香草”类的产品类别描述和测量单位？

SQL: SELECT product_category_description ,  unit_of_measure FROM ref_product_categories WHERE product_category_code  =  "香草"
问题: 返回“香草”类产品的描述和测量单位。

SQL: SELECT product_category_description ,  unit_of_measure FROM ref_product_categories WHERE product_category_code  =  "香草"
问题: “茴香”产品的计量单位是什么？

SQL: SELECT t2.unit_of_measure FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code  =  t2.product_category_code WHERE t1.product_name  =  "茴香"
问题: 给出“茴香”产品的计量单位。

SQL: SELECT t2.unit_of_measure FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code  =  t2.product_category_code WHERE t1.product_name  =  "茴香"
问题: 找出“鼠标”产品的计量单位和产品类别代码。

SQL: SELECT t2.unit_of_measure ,  t2.product_category_code FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code  =  t2.product_category_code WHERE t1.product_name  =  "鼠标"
问题: “鼠标”产品的度量单位和分类代码是什么？

SQL: SELECT t2.unit_of_measure ,  t2.product_category_code FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code  =  t2.product_category_code WHERE t1.product_name  =  "鼠标"
问题: 找出颜色为“白色”但没有测量单位“一把”的产品名称。

SQL: 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 != "一把"
问题: 哪些产品颜色不是“白色”，并且不以“一把”为单位进行测量？

SQL: 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 != "一把"
问题: 最多数产品的颜色描述是什么？

SQL: 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
问题: 返回所有产品中最常见的颜色描述。

SQL: 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
问题: 对最少产品使用的颜色描述是什么？

SQL: 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
问题: 给出产品间最不常见的颜色描述。

SQL: 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
问题: 大多数产品使用的特征名称是什么？

SQL: 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
问题: 返回所有产品中最常见的特性名称。

SQL: 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
问题: 那些从未被任何产品使用的特征的名称、细节和数据类型是什么？

SQL: 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
问题: 给出任何产品中都没有的特征的名称、细节和数据类型。

SQL: 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
问题: 在所有产品中，至少有两次使用的特征名称是什么？

SQL: 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
问题: 给出两个或多个产品的特性名称？

SQL: 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
问题: 什么颜色从来没有被任何产品使用？

SQL: SELECT count(*) FROM Ref_colors WHERE color_code NOT IN ( SELECT color_code FROM products )
问题: 计算任何产品中没有使用的颜色的数量。

SQL: SELECT count(*) FROM Ref_colors WHERE color_code NOT IN ( SELECT color_code FROM products )
问题: 有多少活动？

SQL: SELECT count(*) FROM event
问题: 将所有事件名称按从最新到最老的年份列出。

SQL: SELECT name FROM event ORDER BY YEAR DESC
问题: 最近的一年发生的事件的名称是什么？

SQL: SELECT name FROM event ORDER BY YEAR DESC LIMIT 1
问题: 有多少个体育场？

SQL: SELECT count(*) FROM stadium
问题: 找出具有最大容量的体育场名称。

SQL: SELECT name FROM stadium ORDER BY capacity DESC LIMIT 1
问题: 找出容量小于平均容量的体育场馆的名称。

SQL: SELECT name FROM stadium WHERE capacity  <  (SELECT avg(capacity) FROM stadium)
问题: 找到拥有最多球场的国家。

SQL: SELECT country FROM stadium GROUP BY country ORDER BY count(*) DESC LIMIT 1