system
stringlengths 30
393
| conversations
list |
---|---|
CREATE TABLE weather (mean_sea_level_pressure_inches INTEGER, date VARCHAR) | [
{
"from": "user",
"value": "哪些日子的平均海平面气压在30.3到31之间?"
},
{
"from": "assistant",
"value": "SELECT date FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31"
}
] |
CREATE TABLE weather (max_temperature_f VARCHAR, min_temperature_f VARCHAR, date VARCHAR) | [
{
"from": "user",
"value": "找出最大温度与最小温度之差最小的一天。并报告差异。"
},
{
"from": "assistant",
"value": "SELECT date , max_temperature_f - min_temperature_f FROM weather ORDER BY max_temperature_f - min_temperature_f LIMIT 1"
}
] |
CREATE TABLE weather (max_temperature_f VARCHAR, min_temperature_f VARCHAR, date VARCHAR) | [
{
"from": "user",
"value": "哪些天具有最小的温度范围,那个范围是什么?"
},
{
"from": "assistant",
"value": "SELECT date , max_temperature_f - min_temperature_f FROM weather ORDER BY max_temperature_f - min_temperature_f LIMIT 1"
}
] |
CREATE TABLE station (name VARCHAR, id VARCHAR), CREATE TABLE status (station_id VARCHAR, bikes_available INTEGER) | [
{
"from": "user",
"value": "有超过12辆可用自行车的车站的ID和名称是什么?"
},
{
"from": "assistant",
"value": "SELECT DISTINCT T1.id , T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available > 12"
}
] |
CREATE TABLE station (name VARCHAR, id VARCHAR), CREATE TABLE status (station_id VARCHAR, bikes_available INTEGER) | [
{
"from": "user",
"value": "有超过12辆可用自行车的车站有哪些不同的ID和名称?"
},
{
"from": "assistant",
"value": "SELECT DISTINCT T1.id , T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available > 12"
}
] |
CREATE TABLE weather (mean_humidity INTEGER, zip_code VARCHAR), CREATE TABLE trip (mean_humidity INTEGER, zip_code VARCHAR) | [
{
"from": "user",
"value": "给我平均湿度低于70,至少有100个路线的地区邮编。"
},
{
"from": "assistant",
"value": "SELECT zip_code FROM weather GROUP BY zip_code HAVING avg(mean_humidity) < 70 INTERSECT SELECT zip_code FROM trip GROUP BY zip_code HAVING count(*) >= 100"
}
] |
CREATE TABLE weather (mean_humidity INTEGER, zip_code VARCHAR), CREATE TABLE trip (mean_humidity INTEGER, zip_code VARCHAR) | [
{
"from": "user",
"value": "平均湿度低于70并且至少有100次旅行的邮政编码是什么?"
},
{
"from": "assistant",
"value": "SELECT zip_code FROM weather GROUP BY zip_code HAVING avg(mean_humidity) < 70 INTERSECT SELECT zip_code FROM trip GROUP BY zip_code HAVING count(*) >= 100"
}
] |
CREATE TABLE station (city VARCHAR, name VARCHAR, end_station_name VARCHAR), CREATE TABLE trip (city VARCHAR, name VARCHAR, end_station_name VARCHAR) | [
{
"from": "user",
"value": "位于“西安”市但没能成为100次以上路线的终点的车站叫什么名字?"
},
{
"from": "assistant",
"value": "SELECT name FROM station WHERE city = \"西安\" EXCEPT SELECT end_station_name FROM trip GROUP BY end_station_name HAVING count(*) > 100"
}
] |
CREATE TABLE station (city VARCHAR, name VARCHAR, end_station_name VARCHAR), CREATE TABLE trip (city VARCHAR, name VARCHAR, end_station_name VARCHAR) | [
{
"from": "user",
"value": "位于“西安”但从未成为路线终点的车站叫什么名字?"
},
{
"from": "assistant",
"value": "SELECT name FROM station WHERE city = \"西安\" EXCEPT SELECT end_station_name FROM trip GROUP BY end_station_name HAVING count(*) > 100"
}
] |
CREATE TABLE station (city VARCHAR, id VARCHAR), CREATE TABLE trip (end_station_id VARCHAR, id VARCHAR) | [
{
"from": "user",
"value": "从“重庆”出发到“西安”有多少路线?"
},
{
"from": "assistant",
"value": "SELECT count(*) FROM station AS T1 JOIN trip AS T2 JOIN station AS T3 JOIN trip AS T4 ON T1.id = T2.start_station_id AND T2.id = T4.id AND T3.id = T4.end_station_id WHERE T1.city = \"重庆\" AND T3.city = \"西安\""
}
] |
CREATE TABLE station (city VARCHAR, id VARCHAR), CREATE TABLE trip (end_station_id VARCHAR, id VARCHAR) | [
{
"from": "user",
"value": "从“重庆”的一个车站到“西安”的一个车站,总共有多少次旅行?"
},
{
"from": "assistant",
"value": "SELECT count(*) FROM station AS T1 JOIN trip AS T2 JOIN station AS T3 JOIN trip AS T4 ON T1.id = T2.start_station_id AND T2.id = T4.id AND T3.id = T4.end_station_id WHERE T1.city = \"重庆\" AND T3.city = \"西安\""
}
] |
CREATE TABLE station (id VARCHAR, long INTEGER, lat INTEGER), CREATE TABLE trip (start_station_id VARCHAR) | [
{
"from": "user",
"value": "所有路线起点的平均纬度和经度是多少?"
},
{
"from": "assistant",
"value": "SELECT avg(T1.lat) , avg(T1.long) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id"
}
] |
CREATE TABLE station (id VARCHAR, long INTEGER, lat INTEGER), CREATE TABLE trip (start_station_id VARCHAR) | [
{
"from": "user",
"value": "所有出发站的平均纬度和经度是多少?"
},
{
"from": "assistant",
"value": "SELECT avg(T1.lat) , avg(T1.long) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id"
}
] |
CREATE TABLE book (Id VARCHAR) | [
{
"from": "user",
"value": "有多少本书?"
},
{
"from": "assistant",
"value": "SELECT count(*) FROM book"
}
] |
CREATE TABLE book (Writer VARCHAR) | [
{
"from": "user",
"value": "按字母顺序列出书的作者。"
},
{
"from": "assistant",
"value": "SELECT Writer FROM book ORDER BY Writer ASC"
}
] |
CREATE TABLE book (Issues VARCHAR, Title VARCHAR) | [
{
"from": "user",
"value": "按出版升序排列,列出书名。"
},
{
"from": "assistant",
"value": "SELECT Title FROM book ORDER BY Issues ASC"
}
] |
CREATE TABLE book (Writer VARCHAR, Title VARCHAR) | [
{
"from": "user",
"value": "作者不是“钱钟书”的书名是什么?"
},
{
"from": "assistant",
"value": "SELECT Title FROM book WHERE Writer != \"钱钟书\""
}
] |
CREATE TABLE book (Issues VARCHAR, Title VARCHAR) | [
{
"from": "user",
"value": "书的题目和出版是什么?"
},
{
"from": "assistant",
"value": "SELECT Title , Issues FROM book"
}
] |
CREATE TABLE publication (Price VARCHAR, Publication_Date VARCHAR) | [
{
"from": "user",
"value": "按价格降序排列的出版物日期是什么?"
},
{
"from": "assistant",
"value": "SELECT Publication_Date FROM publication ORDER BY Price DESC"
}
] |
CREATE TABLE publication (Price INTEGER, Publisher VARCHAR) | [
{
"from": "user",
"value": "哪些不同出版商有格高于5000000的出版物?"
},
{
"from": "assistant",
"value": "SELECT DISTINCT Publisher FROM publication WHERE Price > 5000000"
}
] |
CREATE TABLE publication (Price VARCHAR, Publisher VARCHAR) | [
{
"from": "user",
"value": "列出出版物价格最高的出版商。"
},
{
"from": "assistant",
"value": "SELECT Publisher FROM publication ORDER BY Price DESC LIMIT 1"
}
] |
CREATE TABLE publication (Price VARCHAR, Publication_Date VARCHAR) | [
{
"from": "user",
"value": "列出3个最低价格的出版物的出版日期。"
},
{
"from": "assistant",
"value": "SELECT Publication_Date FROM publication ORDER BY Price ASC LIMIT 3"
}
] |
CREATE TABLE book (Book_ID VARCHAR, Title VARCHAR), CREATE TABLE publication (Book_ID VARCHAR, Publication_Date VARCHAR) | [
{
"from": "user",
"value": "显示图书的书名和出版日期。"
},
{
"from": "assistant",
"value": "SELECT T1.Title , T2.Publication_Date FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID"
}
] |
CREATE TABLE book (Book_ID VARCHAR, Writer VARCHAR), CREATE TABLE publication (Book_ID VARCHAR, Price INTEGER) | [
{
"from": "user",
"value": "显示已经出版的一本价格超过4000000的书的作家。"
},
{
"from": "assistant",
"value": "SELECT T1.Writer FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID WHERE T2.Price > 4000000"
}
] |
CREATE TABLE book (Book_ID VARCHAR, Title VARCHAR), CREATE TABLE publication (Book_ID VARCHAR, Price VARCHAR) | [
{
"from": "user",
"value": "按出版物价格的顺序显示书名。"
},
{
"from": "assistant",
"value": "SELECT T1.Title FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID ORDER BY T2.Price DESC"
}
] |
CREATE TABLE publication (Publisher VARCHAR) | [
{
"from": "user",
"value": "显示有不止一个出版物的出版商。"
},
{
"from": "assistant",
"value": "SELECT Publisher FROM publication GROUP BY Publisher HAVING COUNT(*) > 1"
}
] |
CREATE TABLE publication (Publisher VARCHAR) | [
{
"from": "user",
"value": "展示不同的出版商以及他们出版的出版物数量。"
},
{
"from": "assistant",
"value": "SELECT Publisher , COUNT(*) FROM publication GROUP BY Publisher"
}
] |
CREATE TABLE publication (Publication_Date VARCHAR) | [
{
"from": "user",
"value": "请显示最常见的出版日期。"
},
{
"from": "assistant",
"value": "SELECT Publication_Date FROM publication GROUP BY Publication_Date ORDER BY COUNT(*) DESC LIMIT 1"
}
] |
CREATE TABLE book (Writer VARCHAR) | [
{
"from": "user",
"value": "列出那些写过不止一本书的作家。"
},
{
"from": "assistant",
"value": "SELECT Writer FROM book GROUP BY Writer HAVING COUNT(*) > 1"
}
] |
CREATE TABLE book (Book_ID VARCHAR, Title VARCHAR), CREATE TABLE publication (Book_ID VARCHAR, Title VARCHAR) | [
{
"from": "user",
"value": "列出未出版的书名。"
},
{
"from": "assistant",
"value": "SELECT Title FROM book WHERE Book_ID NOT IN (SELECT Book_ID FROM publication)"
}
] |
CREATE TABLE publication (Price INTEGER, Publisher VARCHAR) | [
{
"from": "user",
"value": "显示价格高于10000000和价格低于50000000的出版物的出版商。"
},
{
"from": "assistant",
"value": "SELECT Publisher FROM publication WHERE Price > 10000000 INTERSECT SELECT Publisher FROM publication WHERE Price < 5000000"
}
] |
CREATE TABLE publication (Publication_Date VARCHAR) | [
{
"from": "user",
"value": "不同出版日期的出版物数量是多少?"
},
{
"from": "assistant",
"value": "SELECT COUNT (DISTINCT Publication_Date) FROM publication"
}
] |
CREATE TABLE publication (Publication_Date VARCHAR) | [
{
"from": "user",
"value": "我们的记录中有多少种不同的出版日期?"
},
{
"from": "assistant",
"value": "SELECT COUNT (DISTINCT Publication_Date) FROM publication"
}
] |
CREATE TABLE publication (Price VARCHAR, Publisher VARCHAR) | [
{
"from": "user",
"value": "显示出版商是“文学”或“机械”的出版物价格。"
},
{
"from": "assistant",
"value": "SELECT Price FROM publication WHERE Publisher = \"文学\" OR Publisher = \"机械\""
}
] |
CREATE TABLE actor (Id VARCHAR) | [
{
"from": "user",
"value": "那儿有多少演员?"
},
{
"from": "assistant",
"value": "SELECT count(*) FROM actor"
}
] |
CREATE TABLE actor (Id VARCHAR) | [
{
"from": "user",
"value": "统计演员的数量。"
},
{
"from": "assistant",
"value": "SELECT count(*) FROM actor"
}
] |
CREATE TABLE actor (Name VARCHAR) | [
{
"from": "user",
"value": "按照升序字母顺序列出演员的名字。"
},
{
"from": "assistant",
"value": "SELECT Name FROM actor ORDER BY Name ASC"
}
] |
CREATE TABLE actor (Name VARCHAR) | [
{
"from": "user",
"value": "演员的名字是什么,按字母顺序排列?"
},
{
"from": "assistant",
"value": "SELECT Name FROM actor ORDER BY Name ASC"
}
] |
CREATE TABLE actor (Character VARCHAR, Duration VARCHAR) | [
{
"from": "user",
"value": "演员的角色和持续时间是什么?"
},
{
"from": "assistant",
"value": "SELECT Character , Duration FROM actor"
}
] |
CREATE TABLE actor (Character VARCHAR, Duration VARCHAR) | [
{
"from": "user",
"value": "返回每个演员的角色和持续时间。"
},
{
"from": "assistant",
"value": "SELECT Character , Duration FROM actor"
}
] |
CREATE TABLE actor (Age VARCHAR, Name VARCHAR) | [
{
"from": "user",
"value": "列出年龄不是20岁的演员的名字。"
},
{
"from": "assistant",
"value": "SELECT Name FROM actor WHERE Age != 20"
}
] |
CREATE TABLE actor (Age VARCHAR, Name VARCHAR) | [
{
"from": "user",
"value": "不是20岁的演员的名字是什么?"
},
{
"from": "assistant",
"value": "SELECT Name FROM actor WHERE Age != 20"
}
] |
CREATE TABLE actor (age VARCHAR, Character VARCHAR) | [
{
"from": "user",
"value": "按照年龄降序,演员的角色是什么?"
},
{
"from": "assistant",
"value": "SELECT Character FROM actor ORDER BY age DESC"
}
] |
CREATE TABLE actor (age VARCHAR, Character VARCHAR) | [
{
"from": "user",
"value": "返回演员的角色,按年龄降序排序。"
},
{
"from": "assistant",
"value": "SELECT Character FROM actor ORDER BY age DESC"
}
] |
CREATE TABLE actor (Age VARCHAR, Duration VARCHAR) | [
{
"from": "user",
"value": "最老演员的持续时间是多少?"
},
{
"from": "assistant",
"value": "SELECT Duration FROM actor ORDER BY Age DESC LIMIT 1"
}
] |
CREATE TABLE actor (Age VARCHAR, Duration VARCHAR) | [
{
"from": "user",
"value": "返回最大年龄的演员的持续时间。"
},
{
"from": "assistant",
"value": "SELECT Duration FROM actor ORDER BY Age DESC LIMIT 1"
}
] |
CREATE TABLE musical (Nominee VARCHAR, Name VARCHAR) | [
{
"from": "user",
"value": "提名“梁朝伟”的音乐剧名称是什么?"
},
{
"from": "assistant",
"value": "SELECT Name FROM musical WHERE Nominee = \"梁朝伟\""
}
] |
CREATE TABLE musical (Nominee VARCHAR, Name VARCHAR) | [
{
"from": "user",
"value": "返回有提名“梁朝伟”的音乐剧名称。"
},
{
"from": "assistant",
"value": "SELECT Name FROM musical WHERE Nominee = \"梁朝伟\""
}
] |
CREATE TABLE musical (Nominee VARCHAR, Award VARCHAR) | [
{
"from": "user",
"value": "除了“金鸡奖”之外,还有哪些音乐剧的不同提名呢?"
},
{
"from": "assistant",
"value": "SELECT DISTINCT Nominee FROM musical WHERE Award != \"金鸡奖\""
}
] |
CREATE TABLE musical (Nominee VARCHAR, Award VARCHAR) | [
{
"from": "user",
"value": "返回奖项不是“金鸡奖”的音乐剧的不同提名。"
},
{
"from": "assistant",
"value": "SELECT DISTINCT Nominee FROM musical WHERE Award != \"金鸡奖\""
}
] |
CREATE TABLE actor (Name VARCHAR, Musical_ID VARCHAR), CREATE TABLE musical (Name VARCHAR, Musical_ID VARCHAR) | [
{
"from": "user",
"value": "显示演员姓名和音乐剧名称。"
},
{
"from": "assistant",
"value": "SELECT T1.Name , T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID"
}
] |
CREATE TABLE actor (Name VARCHAR, Musical_ID VARCHAR), CREATE TABLE musical (Name VARCHAR, Musical_ID VARCHAR) | [
{
"from": "user",
"value": "演员和他们出演的音乐剧的名字是什么?"
},
{
"from": "assistant",
"value": "SELECT T1.Name , T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID"
}
] |
CREATE TABLE actor (Name VARCHAR, Musical_ID VARCHAR), CREATE TABLE musical (Name VARCHAR, Musical_ID VARCHAR) | [
{
"from": "user",
"value": "显示以“歌剧魅影”为名字的音乐剧中的演员的名字。"
},
{
"from": "assistant",
"value": "SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID WHERE T2.Name = \"歌剧魅影\""
}
] |
CREATE TABLE actor (Name VARCHAR, Musical_ID VARCHAR), CREATE TABLE musical (Name VARCHAR, Musical_ID VARCHAR) | [
{
"from": "user",
"value": "音乐剧“歌剧魅影”的演员叫什么名字?"
},
{
"from": "assistant",
"value": "SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID WHERE T2.Name = \"歌剧魅影\""
}
] |
CREATE TABLE actor (Name VARCHAR, Musical_ID VARCHAR), CREATE TABLE musical (Musical_ID VARCHAR, Year VARCHAR) | [
{
"from": "user",
"value": "以出演的音乐剧获奖的年份降序排列,显示演员姓名。"
},
{
"from": "assistant",
"value": "SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID ORDER BY T2.Year DESC"
}
] |
CREATE TABLE actor (Name VARCHAR, Musical_ID VARCHAR), CREATE TABLE musical (Musical_ID VARCHAR, Year VARCHAR) | [
{
"from": "user",
"value": "按出演的音乐剧获奖年份降序排列,演员姓名是什么?"
},
{
"from": "assistant",
"value": "SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID ORDER BY T2.Year DESC"
}
] |
CREATE TABLE actor (Musical_ID VARCHAR), CREATE TABLE musical (Name VARCHAR, Musical_ID VARCHAR) | [
{
"from": "user",
"value": "显示音乐剧的名称和在音乐剧中出现的演员的数目。"
},
{
"from": "assistant",
"value": "SELECT T2.Name , COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID"
}
] |
CREATE TABLE actor (Musical_ID VARCHAR), CREATE TABLE musical (Name VARCHAR, Musical_ID VARCHAR) | [
{
"from": "user",
"value": "每个音乐剧中有多少演员?"
},
{
"from": "assistant",
"value": "SELECT T2.Name , COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID"
}
] |
CREATE TABLE actor (Musical_ID VARCHAR), CREATE TABLE musical (Name VARCHAR, Musical_ID VARCHAR) | [
{
"from": "user",
"value": "显示至少有三个演员的音乐剧名称。"
},
{
"from": "assistant",
"value": "SELECT T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID HAVING COUNT(*) >= 3"
}
] |
CREATE TABLE actor (Musical_ID VARCHAR), CREATE TABLE musical (Name VARCHAR, Musical_ID VARCHAR) | [
{
"from": "user",
"value": "有3个或更多演员的音乐剧名称是什么?"
},
{
"from": "assistant",
"value": "SELECT T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID HAVING COUNT(*) >= 3"
}
] |
CREATE TABLE musical (Nominee VARCHAR) | [
{
"from": "user",
"value": "显示不同的被提名者和他们提名的音乐剧的数量。"
},
{
"from": "assistant",
"value": "SELECT Nominee , COUNT(*) FROM musical GROUP BY Nominee"
}
] |
CREATE TABLE musical (Nominee VARCHAR) | [
{
"from": "user",
"value": "每个被提名者有多少音乐剧被提名?"
},
{
"from": "assistant",
"value": "SELECT Nominee , COUNT(*) FROM musical GROUP BY Nominee"
}
] |
CREATE TABLE musical (Nominee VARCHAR) | [
{
"from": "user",
"value": "请显示被提名次数最多的被提名者。"
},
{
"from": "assistant",
"value": "SELECT Nominee FROM musical GROUP BY Nominee ORDER BY COUNT(*) DESC LIMIT 1"
}
] |
CREATE TABLE musical (Nominee VARCHAR) | [
{
"from": "user",
"value": "谁是被提名音乐剧最多的的被提名人?"
},
{
"from": "assistant",
"value": "SELECT Nominee FROM musical GROUP BY Nominee ORDER BY COUNT(*) DESC LIMIT 1"
}
] |
CREATE TABLE musical (RESULT VARCHAR) | [
{
"from": "user",
"value": "列出音乐剧最常见的结局。"
},
{
"from": "assistant",
"value": "SELECT RESULT FROM musical GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1"
}
] |
CREATE TABLE musical (RESULT VARCHAR) | [
{
"from": "user",
"value": "返回所有音乐剧中最常见的结局。"
},
{
"from": "assistant",
"value": "SELECT RESULT FROM musical GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1"
}
] |
CREATE TABLE musical (Nominee VARCHAR) | [
{
"from": "user",
"value": "列出被提名超过两部音乐剧的被提名者。"
},
{
"from": "assistant",
"value": "SELECT Nominee FROM musical GROUP BY Nominee HAVING COUNT(*) > 2"
}
] |
CREATE TABLE musical (Nominee VARCHAR) | [
{
"from": "user",
"value": "被提名超过两次的被提名者是谁?"
},
{
"from": "assistant",
"value": "SELECT Nominee FROM musical GROUP BY Nominee HAVING COUNT(*) > 2"
}
] |
CREATE TABLE musical (Name VARCHAR, Musical_ID VARCHAR), CREATE TABLE actor (Name VARCHAR, Musical_ID VARCHAR) | [
{
"from": "user",
"value": "列出没有演员的音乐剧名称。"
},
{
"from": "assistant",
"value": "SELECT Name FROM musical WHERE Musical_ID NOT IN (SELECT Musical_ID FROM actor)"
}
] |
CREATE TABLE musical (Name VARCHAR, Musical_ID VARCHAR), CREATE TABLE actor (Name VARCHAR, Musical_ID VARCHAR) | [
{
"from": "user",
"value": "没有演员的音乐剧名称是什么?"
},
{
"from": "assistant",
"value": "SELECT Name FROM musical WHERE Musical_ID NOT IN (SELECT Musical_ID FROM actor)"
}
] |
CREATE TABLE musical (Nominee VARCHAR, Award VARCHAR) | [
{
"from": "user",
"value": "显示被提名“金鸡奖”和“金马奖”的被提名人。"
},
{
"from": "assistant",
"value": "SELECT Nominee FROM musical WHERE Award = \"金鸡奖\" INTERSECT SELECT Nominee FROM musical WHERE Award = \"金马奖\""
}
] |
CREATE TABLE musical (Nominee VARCHAR, Award VARCHAR) | [
{
"from": "user",
"value": "谁被提名过“金鸡奖”和“金马奖”?"
},
{
"from": "assistant",
"value": "SELECT Nominee FROM musical WHERE Award = \"金鸡奖\" INTERSECT SELECT Nominee FROM musical WHERE Award = \"金马奖\""
}
] |
CREATE TABLE musical (Nominee VARCHAR, Award VARCHAR) | [
{
"from": "user",
"value": "显示获得“金鸡奖”或“金像奖”奖的被提名音乐人。"
},
{
"from": "assistant",
"value": "SELECT Nominee FROM musical WHERE Award = \"金鸡奖\" OR Award = \"金像奖\""
}
] |
CREATE TABLE musical (Nominee VARCHAR, Award VARCHAR) | [
{
"from": "user",
"value": "谁被提名过“金鸡奖”或“金像奖”奖项?"
},
{
"from": "assistant",
"value": "SELECT Nominee FROM musical WHERE Award = \"金鸡奖\" OR Award = \"金像奖\""
}
] |
CREATE TABLE user_profiles (email VARCHAR, name VARCHAR) | [
{
"from": "user",
"value": "找到名为“马丽”的用户的电子邮件。"
},
{
"from": "assistant",
"value": "SELECT email FROM user_profiles WHERE name = '马丽'"
}
] |
CREATE TABLE user_profiles (name VARCHAR, partitionid VARCHAR) | [
{
"from": "user",
"value": "名为“钢铁侠”的用户的ID是什么?"
},
{
"from": "assistant",
"value": "SELECT partitionid FROM user_profiles WHERE name = '钢铁侠'"
}
] |
CREATE TABLE user_profiles (Id VARCHAR) | [
{
"from": "user",
"value": "有多少用户?"
},
{
"from": "assistant",
"value": "SELECT count(*) FROM user_profiles"
}
] |
CREATE TABLE follows (Id VARCHAR) | [
{
"from": "user",
"value": "每个用户有多少追随者?"
},
{
"from": "assistant",
"value": "SELECT count(*) FROM follows"
}
] |
CREATE TABLE follows (f1 VARCHAR) | [
{
"from": "user",
"value": "查找每个用户的追随者数量。"
},
{
"from": "assistant",
"value": "SELECT count(*) FROM follows GROUP BY f1"
}
] |
CREATE TABLE tweets (Id VARCHAR) | [
{
"from": "user",
"value": "在记录中找到推文的数量。"
},
{
"from": "assistant",
"value": "SELECT count(*) FROM tweets"
}
] |
CREATE TABLE tweets (UID VARCHAR) | [
{
"from": "user",
"value": "查找发布了的推文的用户的数量。"
},
{
"from": "assistant",
"value": "SELECT count(DISTINCT UID) FROM tweets"
}
] |
CREATE TABLE user_profiles (email VARCHAR, name VARCHAR) | [
{
"from": "user",
"value": "找出用户名字中含有“往事随风”的人的名字和电子邮箱。"
},
{
"from": "assistant",
"value": "SELECT name , email FROM user_profiles WHERE name LIKE '往事随风'"
}
] |
CREATE TABLE user_profiles (email VARCHAR, name VARCHAR) | [
{
"from": "user",
"value": "找出电子邮箱中中含有“superstar”或是“edu”的用户的名字。"
},
{
"from": "assistant",
"value": "SELECT name FROM user_profiles WHERE email LIKE '巨星' OR email LIKE 'qq'"
}
] |
CREATE TABLE tweets (text VARCHAR) | [
{
"from": "user",
"value": "返回关于“实习”主题的推文。"
},
{
"from": "assistant",
"value": "SELECT text FROM tweets WHERE text LIKE '实习'"
}
] |
CREATE TABLE user_profiles (email VARCHAR, name VARCHAR, followers INTEGER) | [
{
"from": "user",
"value": "查找拥有超过1000个追随者的用户的姓名和电子邮件。"
},
{
"from": "assistant",
"value": "SELECT name , email FROM user_profiles WHERE followers > 1000"
}
] |
CREATE TABLE user_profiles (name VARCHAR, uid VARCHAR), CREATE TABLE follows (f1 VARCHAR) | [
{
"from": "user",
"value": "查找追随者数量大于名为“蔡依林”的用户的用户名称。"
},
{
"from": "assistant",
"value": "SELECT T1.name FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 GROUP BY T2.f1 HAVING count(*) > (SELECT count(*) FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 WHERE T1.name = '蔡依林')"
}
] |
CREATE TABLE user_profiles (email VARCHAR, name VARCHAR, uid VARCHAR), CREATE TABLE follows (f1 VARCHAR) | [
{
"from": "user",
"value": "查找有不止一个跟随者的用户的姓名和电子邮件。"
},
{
"from": "assistant",
"value": "SELECT T1.name , T1.email FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 GROUP BY T2.f1 HAVING count(*) > 1"
}
] |
CREATE TABLE user_profiles (name VARCHAR, uid VARCHAR), CREATE TABLE tweets (uid VARCHAR) | [
{
"from": "user",
"value": "查找拥有不止一条推特的用户的姓名。"
},
{
"from": "assistant",
"value": "SELECT T1.name FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING count(*) > 1"
}
] |
CREATE TABLE user_profiles (name VARCHAR, uid VARCHAR), CREATE TABLE follows (f1 VARCHAR, f2 VARCHAR) | [
{
"from": "user",
"value": "找到被“马丽”和“苏晴”跟随的用户的ID。"
},
{
"from": "assistant",
"value": "SELECT T2.f1 FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f2 WHERE T1.name = \"马丽\" INTERSECT SELECT T2.f1 FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f2 WHERE T1.name = \"苏晴\""
}
] |
CREATE TABLE user_profiles (name VARCHAR, uid VARCHAR), CREATE TABLE follows (f1 VARCHAR, f2 VARCHAR) | [
{
"from": "user",
"value": "找到“马丽”或“苏晴”共同追随的用户的ID。"
},
{
"from": "assistant",
"value": "SELECT T2.f1 FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f2 WHERE T1.name = \"马丽\" OR T1.name = \"苏晴\""
}
] |
CREATE TABLE user_profiles (followers VARCHAR, name VARCHAR) | [
{
"from": "user",
"value": "查找有最多追随者的用户的名称。"
},
{
"from": "assistant",
"value": "SELECT name FROM user_profiles ORDER BY followers DESC LIMIT 1"
}
] |
CREATE TABLE user_profiles (email VARCHAR, followers VARCHAR, name VARCHAR) | [
{
"from": "user",
"value": "找到有最少追随者的用户的名字和电子邮件。"
},
{
"from": "assistant",
"value": "SELECT name , email FROM user_profiles ORDER BY followers LIMIT 1"
}
] |
CREATE TABLE user_profiles (followers VARCHAR, name VARCHAR) | [
{
"from": "user",
"value": "按跟随者数量的降序进行排序,列出每个用户的名称和追随者数目。"
},
{
"from": "assistant",
"value": "SELECT name , followers FROM user_profiles ORDER BY followers DESC"
}
] |
CREATE TABLE user_profiles (followers VARCHAR, name VARCHAR) | [
{
"from": "user",
"value": "列出拥有追随者的最多的前5个用户的名字。"
},
{
"from": "assistant",
"value": "SELECT name FROM user_profiles ORDER BY followers DESC LIMIT 5"
}
] |
CREATE TABLE tweets (createdate VARCHAR, text VARCHAR) | [
{
"from": "user",
"value": "按日期顺序列出所有推文的文本。"
},
{
"from": "assistant",
"value": "SELECT text FROM tweets ORDER BY createdate"
}
] |
CREATE TABLE user_profiles (name VARCHAR, uid VARCHAR), CREATE TABLE tweets (uid VARCHAR) | [
{
"from": "user",
"value": "找出每个用户的名字和推特的数量。"
},
{
"from": "assistant",
"value": "SELECT T1.name , count(*) FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid"
}
] |
CREATE TABLE user_profiles (partitionid VARCHAR, name VARCHAR, uid VARCHAR), CREATE TABLE tweets (uid VARCHAR) | [
{
"from": "user",
"value": "查找发了不到两次推特的用户的名称和ID。"
},
{
"from": "assistant",
"value": "SELECT T1.name , T1.partitionid FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING count(*) < 2"
}
] |
CREATE TABLE user_profiles (name VARCHAR, uid VARCHAR), CREATE TABLE tweets (uid VARCHAR) | [
{
"from": "user",
"value": "查找不止一次发推特的用户的姓名,以及他们发推特的次数。"
},
{
"from": "assistant",
"value": "SELECT T1.name , count(*) FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING count(*) > 1"
}
] |
CREATE TABLE user_profiles (followers INTEGER, UID VARCHAR), CREATE TABLE tweets (followers INTEGER, UID VARCHAR) | [
{
"from": "user",
"value": "查找没有任何推特的用户的平均追随者数量。"
},
{
"from": "assistant",
"value": "SELECT avg(followers) FROM user_profiles WHERE UID NOT IN (SELECT UID FROM tweets)"
}
] |
CREATE TABLE user_profiles (followers INTEGER, UID VARCHAR), CREATE TABLE tweets (followers INTEGER, UID VARCHAR) | [
{
"from": "user",
"value": "查找有一些推文的用户的平均追随者数量。"
},
{
"from": "assistant",
"value": "SELECT avg(followers) FROM user_profiles WHERE UID IN (SELECT UID FROM tweets)"
}
] |