answer
stringlengths
18
552
context
stringlengths
30
393
question
stringlengths
5
73
SELECT advisor , count(*) FROM Student GROUP BY advisor
CREATE TABLE Student (advisor VARCHAR)
每位导师有多少学生?
SELECT advisor FROM Student GROUP BY advisor ORDER BY count(*) DESC LIMIT 1
CREATE TABLE Student (advisor VARCHAR)
哪位导师的学生最多?
SELECT advisor FROM Student GROUP BY advisor ORDER BY count(*) DESC LIMIT 1
CREATE TABLE Student (advisor VARCHAR)
给出最多学生的导师。
SELECT count(*) FROM Has_allergy WHERE Allergy = "猫"
CREATE TABLE Has_allergy (Allergy VARCHAR)
有多少学生患有“猫”过敏?
SELECT count(*) FROM Has_allergy WHERE Allergy = "猫"
CREATE TABLE Has_allergy (Allergy VARCHAR)
有多少学生受到“猫”过敏的影响?
SELECT StuID FROM Has_allergy GROUP BY StuID HAVING count(*) >= 2
CREATE TABLE Has_allergy (StuID VARCHAR)
显示所有至少有两种过敏症的学生。
SELECT StuID FROM Has_allergy GROUP BY StuID HAVING count(*) >= 2
CREATE TABLE Has_allergy (StuID VARCHAR)
有多个过敏反应的的学生的学生ID是什么?
SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy
CREATE TABLE Student (StuID VARCHAR), CREATE TABLE Has_allergy (StuID VARCHAR)
没有过敏的学生的学生ID是什么?
SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy
CREATE TABLE Student (StuID VARCHAR), CREATE TABLE Has_allergy (StuID VARCHAR)
哪些学生不受过敏影响?
SELECT count(*) FROM has_allergy AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.sex = "女" AND T1.allergy = "牛奶" OR T1.allergy = "鸡蛋"
CREATE TABLE has_allergy (allergy VARCHAR, StuID VARCHAR), CREATE TABLE Student (StuID VARCHAR, sex VARCHAR)
有多少女学生有“鸡蛋”或“牛奶”过敏?
SELECT count(*) FROM has_allergy AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.sex = "女" AND T1.allergy = "牛奶" OR T1.allergy = "鸡蛋"
CREATE TABLE has_allergy (allergy VARCHAR, StuID VARCHAR), CREATE TABLE Student (StuID VARCHAR, sex VARCHAR)
有多少女生对“鸡蛋”或“牛奶"过敏?
SELECT count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = "食物"
CREATE TABLE Has_allergy (allergy VARCHAR), CREATE TABLE Allergy_type (allergy VARCHAR, allergytype VARCHAR)
有多少学生有“食物”过敏?
SELECT count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = "食物"
CREATE TABLE Has_allergy (allergy VARCHAR), CREATE TABLE Allergy_type (allergy VARCHAR, allergytype VARCHAR)
有多少学生受“食物”过敏的影响?
SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY count(*) DESC LIMIT 1
CREATE TABLE Has_allergy (Allergy VARCHAR)
哪些过敏反应影响的学生数量最多?
SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY count(*) DESC LIMIT 1
CREATE TABLE Has_allergy (Allergy VARCHAR)
哪种过敏最常见?
SELECT Allergy , count(*) FROM Has_allergy GROUP BY Allergy
CREATE TABLE Has_allergy (Allergy VARCHAR)
显示所有受过敏影响的学生人数。
SELECT Allergy , count(*) FROM Has_allergy GROUP BY Allergy
CREATE TABLE Has_allergy (Allergy VARCHAR)
每种过敏反应有多少学生?
SELECT T2.allergytype , count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy GROUP BY T2.allergytype
CREATE TABLE Has_allergy (allergy VARCHAR), CREATE TABLE Allergy_type (allergy VARCHAR, allergytype VARCHAR)
显示所有过敏类型与受影响的学生数量。
SELECT T2.allergytype , count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy GROUP BY T2.allergytype
CREATE TABLE Has_allergy (allergy VARCHAR), CREATE TABLE Allergy_type (allergy VARCHAR, allergytype VARCHAR)
每一种过敏类型有多少学生受影响?
SELECT lname , age FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = "牛奶" INTERSECT SELECT StuID FROM Has_allergy WHERE Allergy = "猫")
CREATE TABLE Student (lname VARCHAR, Allergy VARCHAR, StuID VARCHAR, age VARCHAR), CREATE TABLE Has_allergy (lname VARCHAR, Allergy VARCHAR, StuID VARCHAR, age VARCHAR)
找出对“牛奶”和“猫”过敏的学生的姓氏和年龄。
SELECT lname , age FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = "牛奶" INTERSECT SELECT StuID FROM Has_allergy WHERE Allergy = "猫")
CREATE TABLE Student (lname VARCHAR, Allergy VARCHAR, StuID VARCHAR, age VARCHAR), CREATE TABLE Has_allergy (lname VARCHAR, Allergy VARCHAR, StuID VARCHAR, age VARCHAR)
对“牛奶”和“猫”过敏的学生的姓氏和年龄是多少?
SELECT T1.Allergy , T1.AllergyType FROM Allergy_type AS T1 JOIN Has_allergy AS T2 ON T1.Allergy = T2.Allergy JOIN Student AS T3 ON T3.StuID = T2.StuID WHERE T3.Fname = "莎莎" ORDER BY T1.Allergy
CREATE TABLE Allergy_type (AllergyType VARCHAR, Allergy VARCHAR), CREATE TABLE Has_allergy (StuID VARCHAR, Allergy VARCHAR), CREATE TABLE Student (Fname VARCHAR, StuID VARCHAR)
名字是“莎莎”的学生有哪些过敏症和过敏类型?并以过敏反应的名称来分类结果。
SELECT T1.Allergy , T1.AllergyType FROM Allergy_type AS T1 JOIN Has_allergy AS T2 ON T1.Allergy = T2.Allergy JOIN Student AS T3 ON T3.StuID = T2.StuID WHERE T3.Fname = "莎莎" ORDER BY T1.Allergy
CREATE TABLE Allergy_type (AllergyType VARCHAR, Allergy VARCHAR), CREATE TABLE Has_allergy (StuID VARCHAR, Allergy VARCHAR), CREATE TABLE Student (Fname VARCHAR, StuID VARCHAR)
那个叫“莎莎”的女孩有什么过敏反应?它们的类型是什么?并以过敏反应的名称来分类结果。
SELECT fname , sex FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = "牛奶" EXCEPT SELECT StuID FROM Has_allergy WHERE Allergy = "猫")
CREATE TABLE Student (StuID VARCHAR, Allergy VARCHAR, sex VARCHAR, fname VARCHAR), CREATE TABLE Has_allergy (StuID VARCHAR, Allergy VARCHAR, sex VARCHAR, fname VARCHAR)
找出对“牛奶”过敏但不对“猫”过敏的学生的名字和性别。
SELECT fname , sex FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = "牛奶" EXCEPT SELECT StuID FROM Has_allergy WHERE Allergy = "猫")
CREATE TABLE Student (StuID VARCHAR, Allergy VARCHAR, sex VARCHAR, fname VARCHAR), CREATE TABLE Has_allergy (StuID VARCHAR, Allergy VARCHAR, sex VARCHAR, fname VARCHAR)
对“牛奶”过敏但能忍受“猫”的学生的名字和性别是什么?
SELECT avg(age) FROM Student WHERE StuID IN ( SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "食物" INTERSECT SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "动物")
CREATE TABLE Student (StuID VARCHAR, age INTEGER), CREATE TABLE Has_allergy (StuID VARCHAR, Allergy VARCHAR), CREATE TABLE Allergy_Type (allergytype VARCHAR, Allergy VARCHAR)
找出对“动物”和“食物”类型过敏的学生的平均年龄。
SELECT avg(age) FROM Student WHERE StuID IN ( SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "食物" INTERSECT SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "动物")
CREATE TABLE Student (StuID VARCHAR, age INTEGER), CREATE TABLE Has_allergy (StuID VARCHAR, Allergy VARCHAR), CREATE TABLE Allergy_Type (allergytype VARCHAR, Allergy VARCHAR)
对“动物”和“食物”过敏的学生的平均年龄有多大?
SELECT fname , lname FROM Student WHERE StuID NOT IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "食物")
CREATE TABLE Student (lname VARCHAR, StuID VARCHAR, fname VARCHAR), CREATE TABLE Has_allergy (StuID VARCHAR, Allergy VARCHAR), CREATE TABLE Allergy_Type (allergytype VARCHAR, Allergy VARCHAR)
列出没有“食物”过敏的学生的名字和姓氏。
SELECT fname , lname FROM Student WHERE StuID NOT IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "食物")
CREATE TABLE Student (lname VARCHAR, StuID VARCHAR, fname VARCHAR), CREATE TABLE Has_allergy (StuID VARCHAR, Allergy VARCHAR), CREATE TABLE Allergy_Type (allergytype VARCHAR, Allergy VARCHAR)
对任何类型的“食物”都不过敏的每个学生的全名是什么?
SELECT count(*) FROM Student WHERE sex = "男" AND StuID IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "食物")
CREATE TABLE Student (StuID VARCHAR, sex VARCHAR), CREATE TABLE Has_allergy (Allergy VARCHAR), CREATE TABLE Allergy_Type (allergytype VARCHAR, Allergy VARCHAR)
找到有“食物”类型过敏的男性(性别是“男”)的数量。
SELECT count(*) FROM Student WHERE sex = "男" AND StuID IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "食物")
CREATE TABLE Student (StuID VARCHAR, sex VARCHAR), CREATE TABLE Has_allergy (Allergy VARCHAR), CREATE TABLE Allergy_Type (allergytype VARCHAR, Allergy VARCHAR)
有多少男学生(性别是“男”)对任何类型的“食物”过敏?
SELECT DISTINCT T1.fname , T1.city_code FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.stuid = T2.stuid WHERE T2.Allergy = "牛奶" OR T2.Allergy = "猫"
CREATE TABLE Student (stuid VARCHAR, city_code VARCHAR, fname VARCHAR), CREATE TABLE Has_Allergy (stuid VARCHAR, Allergy VARCHAR)
找出对“牛奶”或“猫”过敏的学生的不同名字和城市。
SELECT DISTINCT T1.fname , T1.city_code FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.stuid = T2.stuid WHERE T2.Allergy = "牛奶" OR T2.Allergy = "猫"
CREATE TABLE Student (stuid VARCHAR, city_code VARCHAR, fname VARCHAR), CREATE TABLE Has_Allergy (stuid VARCHAR, Allergy VARCHAR)
那些对“牛奶”或“猫”过敏的学生的不同名字和城市是什么?
SELECT count(*) FROM Student WHERE age > 18 AND StuID NOT IN ( SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "食物" OR T2.allergytype = "动物")
CREATE TABLE Student (StuID VARCHAR, age INTEGER), CREATE TABLE Has_allergy (Allergy VARCHAR), CREATE TABLE Allergy_Type (allergytype VARCHAR, Allergy VARCHAR)
找出18岁以上、对“食物”和“动物”不过敏的学生人数。
SELECT count(*) FROM Student WHERE age > 18 AND StuID NOT IN ( SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "食物" OR T2.allergytype = "动物")
CREATE TABLE Student (StuID VARCHAR, age INTEGER), CREATE TABLE Has_allergy (Allergy VARCHAR), CREATE TABLE Allergy_Type (allergytype VARCHAR, Allergy VARCHAR)
有多少学生超过18岁,对“食物”类型或“动物”类型不过敏?
SELECT fname , major FROM Student WHERE StuID NOT IN (SELECT StuID FROM Has_allergy WHERE Allergy = "大豆")
CREATE TABLE Student (major VARCHAR, StuID VARCHAR, Allergy VARCHAR, fname VARCHAR), CREATE TABLE Has_allergy (major VARCHAR, StuID VARCHAR, Allergy VARCHAR, fname VARCHAR)
找到对“大豆”不过敏的学生的名字和专业。
SELECT fname , major FROM Student WHERE StuID NOT IN (SELECT StuID FROM Has_allergy WHERE Allergy = "大豆")
CREATE TABLE Student (major VARCHAR, StuID VARCHAR, Allergy VARCHAR, fname VARCHAR), CREATE TABLE Has_allergy (major VARCHAR, StuID VARCHAR, Allergy VARCHAR, fname VARCHAR)
可以食用“大豆”的学生的名字和专业是什么?
SELECT billing_country , COUNT(*) FROM invoices GROUP BY billing_country ORDER BY count(*) DESC LIMIT 5;
CREATE TABLE invoices (billing_country VARCHAR)
给我一个发票数量前5的国家的列表。列出国家名称和发票数量。
SELECT billing_country , COUNT(*) FROM invoices GROUP BY billing_country ORDER BY count(*) DESC LIMIT 5;
CREATE TABLE invoices (billing_country VARCHAR)
发票数量最多的5个国家是什么?他们有多少发票?
SELECT billing_country , SUM(total) FROM invoices GROUP BY billing_country ORDER BY SUM(total) DESC LIMIT 8;
CREATE TABLE invoices (total INTEGER, billing_country VARCHAR)
一个发票总额前8的国家的列表。列出国家名称和发票总额。
SELECT billing_country , SUM(total) FROM invoices GROUP BY billing_country ORDER BY SUM(total) DESC LIMIT 8;
CREATE TABLE invoices (total INTEGER, billing_country VARCHAR)
按发票总额计算,前8个国家的名称是什么?那些总额有多大?
SELECT billing_country , AVG(total) FROM invoices GROUP BY billing_country ORDER BY AVG(total) DESC LIMIT 10;
CREATE TABLE invoices (total INTEGER, billing_country VARCHAR)
平均发票大小前10的国家的列表。列出国家名称和平均发票大小。
SELECT billing_country , AVG(total) FROM invoices GROUP BY billing_country ORDER BY AVG(total) DESC LIMIT 10;
CREATE TABLE invoices (total INTEGER, billing_country VARCHAR)
平均发票大小最大的国家的名称和平均发票大小是多少?
SELECT T1.first_name , T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY T2.invoice_date DESC LIMIT 5;
CREATE TABLE customers (last_name VARCHAR, id VARCHAR, first_name VARCHAR), CREATE TABLE invoices (invoice_date VARCHAR, customer_id VARCHAR)
找出最近购买了东西的5个客户。列出客户的名字和姓氏。
SELECT T1.first_name , T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY T2.invoice_date DESC LIMIT 5;
CREATE TABLE customers (last_name VARCHAR, id VARCHAR, first_name VARCHAR), CREATE TABLE invoices (invoice_date VARCHAR, customer_id VARCHAR)
最近买东西的5个顾客的名字和姓是什么?
SELECT T1.first_name , T1.last_name , COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 10;
CREATE TABLE customers (last_name VARCHAR, id VARCHAR, first_name VARCHAR), CREATE TABLE invoices (customer_id VARCHAR)
从订单总数中找出前10名客户。列出客户的姓氏和总订单数量。
SELECT T1.first_name , T1.last_name , COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 10;
CREATE TABLE customers (last_name VARCHAR, id VARCHAR, first_name VARCHAR), CREATE TABLE invoices (customer_id VARCHAR)
按订单总数计算,前十位客户的姓名和名字是什么?他们订了多少货?
SELECT T1.first_name , T1.last_name , SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY SUM(T2.total) DESC LIMIT 10;
CREATE TABLE customers (last_name VARCHAR, id VARCHAR, first_name VARCHAR), CREATE TABLE invoices (total INTEGER, customer_id VARCHAR)
列出总销售额的前10名客户。列出客户的姓名和总销售额。
SELECT T1.first_name , T1.last_name , SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY SUM(T2.total) DESC LIMIT 10;
CREATE TABLE customers (last_name VARCHAR, id VARCHAR, first_name VARCHAR), CREATE TABLE invoices (total INTEGER, customer_id VARCHAR)
销售总额最高的前10位客户的姓氏和名字是什么?销售量是多少?
SELECT T1.name , COUNT(*) FROM genres AS T1 JOIN tracks AS T2 ON T2.genre_id = T1.id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 5;
CREATE TABLE genres (name VARCHAR, id VARCHAR), CREATE TABLE tracks (genre_id VARCHAR)
按照曲目数列出前5的流派。列出流派名称和总曲目。
SELECT T1.name , COUNT(*) FROM genres AS T1 JOIN tracks AS T2 ON T2.genre_id = T1.id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 5;
CREATE TABLE genres (name VARCHAR, id VARCHAR), CREATE TABLE tracks (genre_id VARCHAR)
前5名的流派有多少曲目,名字是什么?
SELECT title FROM albums;
CREATE TABLE albums (title VARCHAR)
列出每一张专辑的标题。
SELECT title FROM albums;
CREATE TABLE albums (title VARCHAR)
所有专辑的标题是什么?
SELECT title FROM albums ORDER BY title;
CREATE TABLE albums (title VARCHAR)
按专辑标题升序排列,列出每张专辑。
SELECT title FROM albums ORDER BY title;
CREATE TABLE albums (title VARCHAR)
按字母升序排列的所有专辑的标题是什么?
SELECT title FROM albums WHERE title LIKE '安' ORDER BY title;
CREATE TABLE albums (title VARCHAR)
将标题以字母顺序排序,列出每个专辑。
SELECT title FROM albums WHERE title LIKE '安' ORDER BY title;
CREATE TABLE albums (title VARCHAR)
以字母顺序排序的所有专辑的标题是什么?
SELECT T1.first_name , T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY total LIMIT 10;
CREATE TABLE customers (last_name VARCHAR, id VARCHAR, first_name VARCHAR), CREATE TABLE invoices (customer_id VARCHAR)
列出10个最便宜的发票的客户的名字和姓氏。
SELECT T1.first_name , T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY total LIMIT 10;
CREATE TABLE customers (last_name VARCHAR, id VARCHAR, first_name VARCHAR), CREATE TABLE invoices (customer_id VARCHAR)
最便宜的10张发票的客户的姓名是什么?
SELECT sum(total) FROM invoices WHERE billing_city = "成都" AND billing_state = "四川";
CREATE TABLE invoices (billing_state VARCHAR, total INTEGER, billing_city VARCHAR)
列出“四川”,“成都”市发票总额。
SELECT sum(total) FROM invoices WHERE billing_city = "成都" AND billing_state = "四川";
CREATE TABLE invoices (billing_state VARCHAR, total INTEGER, billing_city VARCHAR)
“四川”州“成都”市的发票金额是多少?
SELECT COUNT(*) FROM invoices WHERE billing_city = "成都" AND billing_state = "四川";
CREATE TABLE invoices (billing_state VARCHAR, billing_city VARCHAR)
列出“四川”,“成都”的发票数量。
SELECT COUNT(*) FROM invoices WHERE billing_city = "成都" AND billing_state = "四川";
CREATE TABLE invoices (billing_state VARCHAR, billing_city VARCHAR)
从“四川”,“成都”开出多少发票?
SELECT billing_state , COUNT(*) FROM invoices WHERE billing_country = "美国" GROUP BY billing_state;
CREATE TABLE invoices (billing_state VARCHAR, billing_country VARCHAR)
列出按州分组的美国发票数量。
SELECT billing_state , COUNT(*) FROM invoices WHERE billing_country = "美国" GROUP BY billing_state;
CREATE TABLE invoices (billing_state VARCHAR, billing_country VARCHAR)
每个州有多少发票?
SELECT billing_state , COUNT(*) FROM invoices WHERE billing_country = "美国" GROUP BY billing_state ORDER BY COUNT(*) DESC LIMIT 1;
CREATE TABLE invoices (billing_state VARCHAR, billing_country VARCHAR)
列出美国发票最多的州。
SELECT billing_state , COUNT(*) FROM invoices WHERE billing_country = "美国" GROUP BY billing_state ORDER BY COUNT(*) DESC LIMIT 1;
CREATE TABLE invoices (billing_state VARCHAR, billing_country VARCHAR)
发票最多的州是什么州?
SELECT billing_state , COUNT(*) , SUM(total) FROM invoices WHERE billing_state = "浙江";
CREATE TABLE invoices (billing_state VARCHAR, total INTEGER)
列出“浙江”省的发票数量和发票总额。
SELECT billing_state , COUNT(*) , SUM(total) FROM invoices WHERE billing_state = "浙江";
CREATE TABLE invoices (billing_state VARCHAR, total INTEGER)
“浙江”省的发票金额和总金额是多少?
SELECT T1.title FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = "零点乐队";
CREATE TABLE albums (title VARCHAR, artist_id VARCHAR), CREATE TABLE artists (name VARCHAR, id VARCHAR)
列出“零点乐队”的专辑。
SELECT T1.title FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = "零点乐队";
CREATE TABLE albums (title VARCHAR, artist_id VARCHAR), CREATE TABLE artists (name VARCHAR, id VARCHAR)
所有“零点乐队”的专辑的标题是什么?
SELECT count(*) FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = "周杰伦";
CREATE TABLE albums (artist_id VARCHAR), CREATE TABLE artists (name VARCHAR, id VARCHAR)
“周杰伦”有多少张专辑?
SELECT count(*) FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = "周杰伦";
CREATE TABLE albums (artist_id VARCHAR), CREATE TABLE artists (name VARCHAR, id VARCHAR)
“周杰伦”发行了多少张专辑?
SELECT company FROM customers WHERE first_name = "宋" AND last_name = "志鹏";
CREATE TABLE customers (last_name VARCHAR, company VARCHAR, first_name VARCHAR)
“宋” “志鹏”是哪家公司的客户?
SELECT company FROM customers WHERE first_name = "宋" AND last_name = "志鹏";
CREATE TABLE customers (last_name VARCHAR, company VARCHAR, first_name VARCHAR)
客户为“宋” “志鹏”的公司是什么?
SELECT email , phone FROM customers WHERE first_name = "卢" AND last_name = "军";
CREATE TABLE customers (last_name VARCHAR, phone VARCHAR, email VARCHAR, first_name VARCHAR)
“卢” “军”的电子邮件和电话号码是多少?
SELECT email , phone FROM customers WHERE first_name = "卢" AND last_name = "军";
CREATE TABLE customers (last_name VARCHAR, phone VARCHAR, email VARCHAR, first_name VARCHAR)
客户“卢” “军”的电子邮件和电话号码是多少?
SELECT count(*) FROM customers WHERE city = "唐山";
CREATE TABLE customers (city VARCHAR)
“唐山”市有多少客户?
SELECT count(*) FROM customers WHERE city = "唐山";
CREATE TABLE customers (city VARCHAR)
“唐山”市有多少顾客?
SELECT count(*) FROM customers WHERE state = "浙江";
CREATE TABLE customers (state VARCHAR)
“浙江”州有多少客户?
SELECT count(*) FROM customers WHERE state = "浙江";
CREATE TABLE customers (state VARCHAR)
来自“浙江”的客户有多少?
SELECT country FROM customers WHERE first_name = "姜" AND last_name = "子玉";
CREATE TABLE customers (last_name VARCHAR, country VARCHAR, first_name VARCHAR)
“姜” “子玉”住在哪个国家?
SELECT country FROM customers WHERE first_name = "姜" AND last_name = "子玉";
CREATE TABLE customers (last_name VARCHAR, country VARCHAR, first_name VARCHAR)
“姜” “子玉”在哪个国家?
SELECT T2.title FROM artists AS T1 JOIN albums AS T2 ON T1.id = T2.artist_id WHERE T1.name LIKE '强'
CREATE TABLE artists (name VARCHAR, id VARCHAR), CREATE TABLE albums (title VARCHAR, artist_id VARCHAR)
列出由名为“强"的艺术家发布的专辑名称。
SELECT T2.title FROM artists AS T1 JOIN albums AS T2 ON T1.id = T2.artist_id WHERE T1.name LIKE '强'
CREATE TABLE artists (name VARCHAR, id VARCHAR), CREATE TABLE albums (title VARCHAR, artist_id VARCHAR)
名字为“强"的艺术家发行的专辑的名称是什么?
SELECT count(*) FROM employees AS T1 JOIN customers AS T2 ON T2.support_rep_id = T1.id WHERE T1.first_name = "马" AND T1.last_name = "志强";
CREATE TABLE employees (last_name VARCHAR, id VARCHAR, first_name VARCHAR), CREATE TABLE customers (support_rep_id VARCHAR)
“马” “志强”拥有多少客户?
SELECT count(*) FROM employees AS T1 JOIN customers AS T2 ON T2.support_rep_id = T1.id WHERE T1.first_name = "马" AND T1.last_name = "志强";
CREATE TABLE employees (last_name VARCHAR, id VARCHAR, first_name VARCHAR), CREATE TABLE customers (support_rep_id VARCHAR)
“马” “志强”拥有的客户数是多少?
SELECT title , phone , hire_date FROM employees WHERE first_name = "袁" AND last_name = "熙";
CREATE TABLE employees (title VARCHAR, last_name VARCHAR, phone VARCHAR, hire_date VARCHAR, first_name VARCHAR)
“袁” “熙”的头衔、电话和租用日期是什么?
SELECT title , phone , hire_date FROM employees WHERE first_name = "袁" AND last_name = "熙";
CREATE TABLE employees (title VARCHAR, last_name VARCHAR, phone VARCHAR, hire_date VARCHAR, first_name VARCHAR)
叫“袁” “熙”的员工的头衔、电话号码和雇佣日期是什么?
SELECT T2.first_name , T2.last_name FROM employees AS T1 JOIN employees AS T2 ON T1.id = T2.reports_to WHERE T1.first_name = "袁" AND T1.last_name = "熙";
CREATE TABLE employees (last_name VARCHAR, reports_to VARCHAR, first_name VARCHAR)
找到向“袁” “熙”汇报的员工的全名?
SELECT T2.first_name , T2.last_name FROM employees AS T1 JOIN employees AS T2 ON T1.id = T2.reports_to WHERE T1.first_name = "袁" AND T1.last_name = "熙";
CREATE TABLE employees (last_name VARCHAR, reports_to VARCHAR, first_name VARCHAR)
向“袁” “熙”汇报工作的员工的名和姓氏是什么?
SELECT address FROM employees WHERE first_name = "袁" AND last_name = "熙";
CREATE TABLE employees (last_name VARCHAR, address VARCHAR, first_name VARCHAR)
雇员“袁” “熙”的地址是什么?
SELECT address FROM employees WHERE first_name = "袁" AND last_name = "熙";
CREATE TABLE employees (last_name VARCHAR, address VARCHAR, first_name VARCHAR)
“袁” “熙”的地址是什么?
SELECT T1.first_name , T1.last_name FROM employees AS T1 JOIN customers AS T2 ON T1.id = T2.support_rep_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1
CREATE TABLE employees (last_name VARCHAR, id VARCHAR, first_name VARCHAR), CREATE TABLE customers (support_rep_id VARCHAR)
查找拥有最多客户的雇员的全名。
SELECT T1.first_name , T1.last_name FROM employees AS T1 JOIN customers AS T2 ON T1.id = T2.support_rep_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1
CREATE TABLE employees (last_name VARCHAR, id VARCHAR, first_name VARCHAR), CREATE TABLE customers (support_rep_id VARCHAR)
拥有最多客户的员工的全名是什么?
SELECT count(*) FROM employees WHERE country = "加拿大";
CREATE TABLE employees (country VARCHAR)
加拿大有多少员工?
SELECT count(*) FROM employees WHERE country = "加拿大";
CREATE TABLE employees (country VARCHAR)
加拿大有多少员工?
SELECT phone FROM employees WHERE first_name = "袁" AND last_name = "熙";
CREATE TABLE employees (last_name VARCHAR, phone VARCHAR, first_name VARCHAR)
“袁” “熙”的电话号码是什么?
SELECT phone FROM employees WHERE first_name = "袁" AND last_name = "熙";
CREATE TABLE employees (last_name VARCHAR, phone VARCHAR, first_name VARCHAR)
“袁” “熙”的电话号码是多少?
SELECT first_name , last_name FROM employees ORDER BY birth_date DESC LIMIT 1;
CREATE TABLE employees (last_name VARCHAR, birth_date VARCHAR, first_name VARCHAR)
谁是公司里最年轻的员工?列出员工的名字和姓氏。