text2SQL
stringlengths 192
7.27k
|
---|
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 旅行社 (
词条id,
名称,
级别,
出境游国家数量,
国内游城市数量,
出境游路线数量,
国内游路线数量,
亚洲排名,
接待海外游客数量,
境外公司数量,
控股子公司数量,
有业务关系的旅行商数量,
免税店数量)
CREATE TABLE 出境游路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
成人价格,
儿童价格,
国家数量,
景点数,
门票总价格)
CREATE TABLE 出境游所含国家 (
路线id,
国家,
旅行天数,
景点数量)
CREATE TABLE 国内游路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
预售价格,
参团价格,
起团人数,
个人价格,
景点数)
CREATE TABLE 邮轮路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
内舱房价格,
海景房价格,
阳台房价格,
航行区域,
邮轮公司)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个城市出发的邮轮路线中内舱房平均价格最高
SELECT### Response: select 出发城市 from 邮轮路线 group by 出发城市 order by avg ( 内舱房价格 ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 省份 (
词条id,
名称,
南北区域,
东西区域,
5区域)
CREATE TABLE 平均身高和寿命 (
省份id,
性别,
平均身高,
平均寿命)
CREATE TABLE 各省美女比例 (
省份id,
评价者来自区域,
美女比例,
美女平均颜值分数)
CREATE TABLE 各省市容评分 (
省份id,
评价者来自区域,
市容评分,
市民素质评分)
CREATE TABLE 民风彪悍十大城市 (
城市名称,
所属省份id,
排名)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个区域的评价者对各省市容平均评价分数最低
SELECT### Response: select 评价者来自区域 from 各省市容评分 group by 评价者来自区域 order by avg ( 市容评分 ) asc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 省份 (
词条id,
名称,
南北区域,
东西区域,
5区域)
CREATE TABLE 平均身高和寿命 (
省份id,
性别,
平均身高,
平均寿命)
CREATE TABLE 各省美女比例 (
省份id,
评价者来自区域,
美女比例,
美女平均颜值分数)
CREATE TABLE 各省市容评分 (
省份id,
评价者来自区域,
市容评分,
市民素质评分)
CREATE TABLE 民风彪悍十大城市 (
城市名称,
所属省份id,
排名)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个区域的评价者对所有省市容评价分数加起来最低
SELECT### Response: select 评价者来自区域 from 各省市容评分 group by 评价者来自区域 order by sum ( 市容评分 ) asc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 诺贝尔奖项 (
词条id,
名称,
领域,
第一次颁奖时间,
获奖者最大年龄,
获奖者最小年龄,
获奖者平均年龄)
CREATE TABLE 高校 (
词条id,
名称,
所属国家,
世界排名,
独立科研机构数量,
重点学科数量)
CREATE TABLE 高校获奖名单 (
高校id,
奖项id,
人数,
排名)
CREATE TABLE 各国获奖名单 (
国家,
奖项id,
人数)
CREATE TABLE 科学家 (
词条id,
姓名,
性别,
国籍,
出生日期,
职业)
CREATE TABLE 毕业院校 (
科学家id,
高校id,
获得学位)
CREATE TABLE 诺贝尔奖科学家名单 (
年份,
奖项id,
科学家id,
理由)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个学位对应的科学家最多
SELECT### Response: select 获得学位 from 毕业院校 group by 获得学位 order by count ( * ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 诺贝尔奖项 (
词条id,
名称,
领域,
第一次颁奖时间,
获奖者最大年龄,
获奖者最小年龄,
获奖者平均年龄)
CREATE TABLE 高校 (
词条id,
名称,
所属国家,
世界排名,
独立科研机构数量,
重点学科数量)
CREATE TABLE 高校获奖名单 (
高校id,
奖项id,
人数,
排名)
CREATE TABLE 各国获奖名单 (
国家,
奖项id,
人数)
CREATE TABLE 科学家 (
词条id,
姓名,
性别,
国籍,
出生日期,
职业)
CREATE TABLE 毕业院校 (
科学家id,
高校id,
获得学位)
CREATE TABLE 诺贝尔奖科学家名单 (
年份,
奖项id,
科学家id,
理由)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个学位对应的科学家最少
SELECT### Response: select 获得学位 from 毕业院校 group by 获得学位 order by count ( * ) limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 公司 (
词条id,
名称,
成立时间,
负责人,
排名)
CREATE TABLE 电影 (
词条id,
影片名,
上映时间,
票房)
CREATE TABLE 影视公司拍摄的电影 (
公司id,
电影id,
投资比例)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个负责人管理的公司最少
SELECT### Response: select 负责人 from 公司 group by 负责人 order by count ( * ) asc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 公司 (
词条id,
名称,
成立时间,
负责人,
排名)
CREATE TABLE 电影 (
词条id,
影片名,
上映时间,
票房)
CREATE TABLE 影视公司拍摄的电影 (
公司id,
电影id,
投资比例)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个负责人管理的公司最多
SELECT### Response: select 负责人 from 公司 group by 负责人 order by count ( * ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 平台 (
词条id,
平台名称,
年会费,
季度会费,
月会费,
口碑)
CREATE TABLE 综艺节目 (
词条id,
综艺名称,
制作公司,
平台id,
期数,
首播时间,
每周播出时间,
播出状态)
CREATE TABLE 艺人 (
词条id,
姓名,
民族,
经纪公司,
职业)
CREATE TABLE 节目阵容 (
艺人id,
综艺节目id,
身份,
参加期数)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些公司制作的综艺节目最少
SELECT### Response: select 制作公司 from 综艺节目 group by 制作公司 order by count ( * ) asc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 平台 (
词条id,
平台名称,
年会费,
季度会费,
月会费,
口碑)
CREATE TABLE 综艺节目 (
词条id,
综艺名称,
制作公司,
平台id,
期数,
首播时间,
每周播出时间,
播出状态)
CREATE TABLE 艺人 (
词条id,
姓名,
民族,
经纪公司,
职业)
CREATE TABLE 节目阵容 (
艺人id,
综艺节目id,
身份,
参加期数)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些公司制作的综艺节目最少,给出前3名公司
SELECT### Response: select 制作公司 from 综艺节目 group by 制作公司 order by count ( * ) limit 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE G20峰会 (
词条id,
名称,
年份,
届次,
主办国,
主办城市,
参加国家数量)
CREATE TABLE 世界经济论坛 (
年份,
届次,
参加国家数量,
参加的元首人数,
参加总人数,
研讨会数量)
CREATE TABLE 世界物联网博览会 (
词条id,
名称,
年份,
高峰论坛数量,
参会嘉宾数,
参会企业数,
观展人数)
CREATE TABLE 中国国际进口博览会 (
词条id,
名称,
年份,
参加企业数,
意向成交额,
成交额增长率)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些国家举办的G20峰会中参加国家总量最少,给出前3个国家
SELECT### Response: select 主办国 from G20峰会 group by 主办国 order by sum ( 参加国家数量 ) asc limit 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE G20峰会 (
词条id,
名称,
年份,
届次,
主办国,
主办城市,
参加国家数量)
CREATE TABLE 世界经济论坛 (
年份,
届次,
参加国家数量,
参加的元首人数,
参加总人数,
研讨会数量)
CREATE TABLE 世界物联网博览会 (
词条id,
名称,
年份,
高峰论坛数量,
参会嘉宾数,
参会企业数,
观展人数)
CREATE TABLE 中国国际进口博览会 (
词条id,
名称,
年份,
参加企业数,
意向成交额,
成交额增长率)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些国家举办的G20峰会中平均参加国家最多,给出前3个国家
SELECT### Response: select 主办国 from G20峰会 group by 主办国 order by avg ( 参加国家数量 ) desc limit 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 朝代 (
词条id,
名称,
起始时间,
结束时间,
都城,
人口数量,
国土面积)
CREATE TABLE 皇帝 (
词条id,
中文名,
所处朝代id,
出生时间,
去世时间,
主要成就,
年号)
CREATE TABLE 各朝代皇帝 (
皇帝id,
朝代id,
登基时间,
在位时间,
第几位)
CREATE TABLE 年号 (
年号,
朝代id,
上一年号,
下一年号)
CREATE TABLE 大臣 (
词条id,
姓名,
所处朝代id,
出生时间,
去世时间,
职业)
CREATE TABLE 大臣辅佐的皇帝 (
大臣id,
皇帝id,
辅佐时间)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个都城经历的朝代最多
SELECT### Response: select 都城 from 朝代 group by 都城 order by count ( * ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 朝代 (
词条id,
名称,
起始时间,
结束时间,
都城,
人口数量,
国土面积)
CREATE TABLE 皇帝 (
词条id,
中文名,
所处朝代id,
出生时间,
去世时间,
主要成就,
年号)
CREATE TABLE 各朝代皇帝 (
皇帝id,
朝代id,
登基时间,
在位时间,
第几位)
CREATE TABLE 年号 (
年号,
朝代id,
上一年号,
下一年号)
CREATE TABLE 大臣 (
词条id,
姓名,
所处朝代id,
出生时间,
去世时间,
职业)
CREATE TABLE 大臣辅佐的皇帝 (
大臣id,
皇帝id,
辅佐时间)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪3个都城经历的朝代最少
SELECT### Response: select 都城 from 朝代 group by 都城 order by count ( * ) limit 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 城市 (
词条id,
名称,
气候地带,
所属国家,
所属洲)
CREATE TABLE 动物 (
词条id,
中文学名,
所属纲,
所属科,
食性,
濒危级别,
保护级别)
CREATE TABLE 动物分布城市 (
动物id,
城市id,
现存数量)
CREATE TABLE 动物电影 (
词条id,
影片名,
动物id,
拍摄国家,
类型)
CREATE TABLE 动物寓言故事 (
动物id,
寓言故事,
形象)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些纲目拥有动物最多,给出前2纲
SELECT### Response: select 所属纲 from 动物 group by 所属纲 order by count ( * ) desc limit 2. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 城市 (
词条id,
名称,
气候地带,
所属国家,
所属洲)
CREATE TABLE 动物 (
词条id,
中文学名,
所属纲,
所属科,
食性,
濒危级别,
保护级别)
CREATE TABLE 动物分布城市 (
动物id,
城市id,
现存数量)
CREATE TABLE 动物电影 (
词条id,
影片名,
动物id,
拍摄国家,
类型)
CREATE TABLE 动物寓言故事 (
动物id,
寓言故事,
形象)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些纲目拥有动物最少
SELECT### Response: select 所属纲 from 动物 group by 所属纲 order by count ( * ) asc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 景区 (
词条id,
名称,
占地面积,
景点级别,
旺季门票价格,
淡季门票价格,
始建时间,
所属城市,
所属省份)
CREATE TABLE 景点 (
词条id,
名称,
地理位置)
CREATE TABLE 交通站 (
词条id,
名称,
类型,
景区id,
距离)
CREATE TABLE 景区景点 (
景点id,
景区id,
是否著名)
CREATE TABLE 临近景区 (
景区id,
相邻景区id,
距离)
CREATE TABLE 博物馆 (
词条id,
名称,
占地面积,
开馆时间,
所属城市,
票价)
CREATE TABLE 重点文物保护单位 (
词条id,
名称,
门票价格,
保护级别,
所属城市,
评定年份)
CREATE TABLE 动物园 (
词条id,
名称,
占地面积,
竣工时间,
门票价格,
动物种类,
所属城市)
CREATE TABLE 馆藏动物 (
动物名称,
动物园id,
数量)
CREATE TABLE 游乐园 (
词条id,
名称,
占地面积,
门票价格,
总投资,
所属城市)
CREATE TABLE 娱乐项目 (
项目名称,
游乐园id,
季节,
排名)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个季节可玩的娱乐项目最多
SELECT### Response: select 季节 from 娱乐项目 group by 季节 order by count ( * ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 景区 (
词条id,
名称,
占地面积,
景点级别,
旺季门票价格,
淡季门票价格,
始建时间,
所属城市,
所属省份)
CREATE TABLE 景点 (
词条id,
名称,
地理位置)
CREATE TABLE 交通站 (
词条id,
名称,
类型,
景区id,
距离)
CREATE TABLE 景区景点 (
景点id,
景区id,
是否著名)
CREATE TABLE 临近景区 (
景区id,
相邻景区id,
距离)
CREATE TABLE 博物馆 (
词条id,
名称,
占地面积,
开馆时间,
所属城市,
票价)
CREATE TABLE 重点文物保护单位 (
词条id,
名称,
门票价格,
保护级别,
所属城市,
评定年份)
CREATE TABLE 动物园 (
词条id,
名称,
占地面积,
竣工时间,
门票价格,
动物种类,
所属城市)
CREATE TABLE 馆藏动物 (
动物名称,
动物园id,
数量)
CREATE TABLE 游乐园 (
词条id,
名称,
占地面积,
门票价格,
总投资,
所属城市)
CREATE TABLE 娱乐项目 (
项目名称,
游乐园id,
季节,
排名)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个季节可玩的娱乐项目最少
SELECT### Response: select 季节 from 娱乐项目 group by 季节 order by count ( * ) asc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 基金公司 (
词条id,
名称,
注册资本,
封闭式基金数量,
开放式基金数量,
亚洲债券基金数量,
基金数量排名,
基金品种数排名)
CREATE TABLE 基金公司的股东公司 (
公司id,
股东公司,
出资比例)
CREATE TABLE 基金公司收入 (
年份,
公司id,
资产规模,
利润合计,
管理费合计)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个股东公司投资的所有基金公司出资比例加起来最大
SELECT### Response: select 股东公司 from 基金公司的股东公司 group by 股东公司 order by sum ( 出资比例 ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 基金公司 (
词条id,
名称,
注册资本,
封闭式基金数量,
开放式基金数量,
亚洲债券基金数量,
基金数量排名,
基金品种数排名)
CREATE TABLE 基金公司的股东公司 (
公司id,
股东公司,
出资比例)
CREATE TABLE 基金公司收入 (
年份,
公司id,
资产规模,
利润合计,
管理费合计)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪2个股东公司投资的所有基金公司出资比例加起来最小
SELECT### Response: select 股东公司 from 基金公司的股东公司 group by 股东公司 order by sum ( 出资比例 ) asc limit 2. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 汽车公司 (
词条id,
名称,
所属国家,
经营范围,
母公司,
主要车系数量,
世界500强排名,
主要荣誉)
CREATE TABLE 汽车公司中国事业部 (
公司id,
中国事业部名称,
位于城市,
所属省份,
总投资金额,
负责产品数量,
主要产品)
CREATE TABLE 汽车产品 (
词条id,
名称,
推出时间,
车型,
车款数量,
保值率,
生产公司id)
CREATE TABLE 车型 (
词条id,
名称,
排量,
油耗,
售价,
所属产品id,
关注指数,
累计销量,
安全排行,
性能排行,
油耗排行,
空间排行,
舒适排行)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个国家拥有的汽车公司最少
SELECT### Response: select 所属国家 from 汽车公司 group by 所属国家 order by count ( * ) asc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 汽车公司 (
词条id,
名称,
所属国家,
经营范围,
母公司,
主要车系数量,
世界500强排名,
主要荣誉)
CREATE TABLE 汽车公司中国事业部 (
公司id,
中国事业部名称,
位于城市,
所属省份,
总投资金额,
负责产品数量,
主要产品)
CREATE TABLE 汽车产品 (
词条id,
名称,
推出时间,
车型,
车款数量,
保值率,
生产公司id)
CREATE TABLE 车型 (
词条id,
名称,
排量,
油耗,
售价,
所属产品id,
关注指数,
累计销量,
安全排行,
性能排行,
油耗排行,
空间排行,
舒适排行)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个国家拥有的汽车公司生产的车系加起来最少
SELECT### Response: select 所属国家 from 汽车公司 group by 所属国家 order by sum ( 主要车系数量 ) asc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 山峰 (
词条id,
名称,
所属山系,
海拔,
首次登顶时间,
排名)
CREATE TABLE 国家 (
词条id,
名称,
所属洲)
CREATE TABLE 山峰的国家 (
山峰id,
起点国家id,
终点国家id,
走向)
CREATE TABLE 景点 (
词条id,
名称,
山峰id,
门票价格,
游玩季节)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个季节可游玩的景点最少
SELECT### Response: select 游玩季节 from 景点 group by 游玩季节 order by count ( * ) limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 山峰 (
词条id,
名称,
所属山系,
海拔,
首次登顶时间,
排名)
CREATE TABLE 国家 (
词条id,
名称,
所属洲)
CREATE TABLE 山峰的国家 (
山峰id,
起点国家id,
终点国家id,
走向)
CREATE TABLE 景点 (
词条id,
名称,
山峰id,
门票价格,
游玩季节)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个季节可游玩的景点最多
SELECT### Response: select 游玩季节 from 景点 group by 游玩季节 order by count ( * ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 国家 (
词条id,
名称,
所属洲,
注册公司数量,
上市公司数量)
CREATE TABLE 世界最赚钱公司 (
词条id,
名称,
所属国家id,
年利润,
世界排名)
CREATE TABLE 中国最赚钱公司 (
词条id,
名称,
位于城市,
所属省份,
年营业额,
国内排名,
世界排名)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些城市拥有的赚钱top公司平均年营业额最低,给出前5城市
SELECT### Response: select 位于城市 from 中国最赚钱公司 group by 位于城市 order by avg ( 年营业额 ) asc limit 5. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 国家 (
词条id,
名称,
所属洲,
注册公司数量,
上市公司数量)
CREATE TABLE 世界最赚钱公司 (
词条id,
名称,
所属国家id,
年利润,
世界排名)
CREATE TABLE 中国最赚钱公司 (
词条id,
名称,
位于城市,
所属省份,
年营业额,
国内排名,
世界排名)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些城市拥有的赚钱top公司年营业额加起来最高
SELECT### Response: select 位于城市 from 中国最赚钱公司 group by 位于城市 order by sum ( 年营业额 ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 学校 (
词条id,
名称,
所在省份,
类型,
是否985,
是否211)
CREATE TABLE 省份 (
词条id,
省名,
2018年考生数量,
985高校数量,
211高校数量)
CREATE TABLE 各省高校招生计划 (
学校id,
省份id,
招生人数)
CREATE TABLE 专业 (
词条id,
专业名称,
学科类型,
学制)
CREATE TABLE 清华大学招生计划 (
专业id,
省份id,
招考类型,
学费,
招生人数)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些省拥有的高校最少,给出前3省份
SELECT### Response: select 所在省份 from 学校 group by 所在省份 order by count ( * ) asc limit 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 学校 (
词条id,
名称,
所在省份,
类型,
是否985,
是否211)
CREATE TABLE 省份 (
词条id,
省名,
2018年考生数量,
985高校数量,
211高校数量)
CREATE TABLE 各省高校招生计划 (
学校id,
省份id,
招生人数)
CREATE TABLE 专业 (
词条id,
专业名称,
学科类型,
学制)
CREATE TABLE 清华大学招生计划 (
专业id,
省份id,
招考类型,
学费,
招生人数)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些省拥有的高校最多,给出前3省份
SELECT### Response: select 所在省份 from 学校 group by 所在省份 order by count ( * ) desc limit 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 篮球运动员 (
词条id,
中文名,
参加选秀年,
是否状元,
获得球队,
毕业院校)
CREATE TABLE MVP记录 (
赛季,
球员id,
国籍,
所属球队)
CREATE TABLE 球队 (
词条id,
中文队名,
赛区,
所属联盟,
夺冠次数)
CREATE TABLE NBA总冠军 (
赛季,
球队id,
总教练)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个国家的球员获得MVP人次最多
SELECT### Response: select 国籍 from MVP记录 group by 国籍 order by count ( * ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 篮球运动员 (
词条id,
中文名,
参加选秀年,
是否状元,
获得球队,
毕业院校)
CREATE TABLE MVP记录 (
赛季,
球员id,
国籍,
所属球队)
CREATE TABLE 球队 (
词条id,
中文队名,
赛区,
所属联盟,
夺冠次数)
CREATE TABLE NBA总冠军 (
赛季,
球队id,
总教练)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪3个国家的球员获得MVP人次最多
SELECT### Response: select 国籍 from MVP记录 group by 国籍 order by count ( * ) desc limit 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 演职员 (
词条id,
姓名,
身高,
体重,
出生地,
出生日期,
毕业院校,
职业)
CREATE TABLE 电影 (
词条id,
电影名称,
制片地区,
制片成本,
片长,
导演,
上映时间,
票房,
类型)
CREATE TABLE 演员和电影 (
演员id,
电影id,
饰演角色,
片酬)
CREATE TABLE 电影平台 (
电影id,
播放平台,
播放量,
评分)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个地方出生的演艺界人士最多
SELECT### Response: select 出生地 from 演职员 group by 出生地 order by count ( * ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 演职员 (
词条id,
姓名,
身高,
体重,
出生地,
出生日期,
毕业院校,
职业)
CREATE TABLE 电影 (
词条id,
电影名称,
制片地区,
制片成本,
片长,
导演,
上映时间,
票房,
类型)
CREATE TABLE 演员和电影 (
演员id,
电影id,
饰演角色,
片酬)
CREATE TABLE 电影平台 (
电影id,
播放平台,
播放量,
评分)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个地方出生的演艺界人士最少
SELECT### Response: select 出生地 from 演职员 group by 出生地 order by count ( * ) asc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 战役 (
词条id,
名称,
历时时间,
地点,
朝代,
参战人数,
死亡人数)
CREATE TABLE 将军 (
词条id,
姓名,
领兵出战次数,
胜数,
败数)
CREATE TABLE 纪念将军的诗词 (
诗词,
作者,
朝代,
纪念将军id)
CREATE TABLE 将军影视形象 (
将军id,
影视剧,
饰演者)
CREATE TABLE 参战双方 (
战役id,
赢方将军id,
赢方兵力,
败方将军id,
败方兵力)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪3个朝代发生的战役平均持续时间最长
SELECT### Response: select 朝代 from 战役 group by 朝代 order by avg ( 历时时间 ) desc limit 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 战役 (
词条id,
名称,
历时时间,
地点,
朝代,
参战人数,
死亡人数)
CREATE TABLE 将军 (
词条id,
姓名,
领兵出战次数,
胜数,
败数)
CREATE TABLE 纪念将军的诗词 (
诗词,
作者,
朝代,
纪念将军id)
CREATE TABLE 将军影视形象 (
将军id,
影视剧,
饰演者)
CREATE TABLE 参战双方 (
战役id,
赢方将军id,
赢方兵力,
败方将军id,
败方兵力)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪2个朝代发生的战役总持续时间最短
SELECT### Response: select 朝代 from 战役 group by 朝代 order by sum ( 历时时间 ) asc limit 2. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 城市 (
词条id,
名称,
所属省份,
餐饮收入,
同比增长)
CREATE TABLE 餐饮公司 (
词条id,
名称,
总部城市id,
所属集团,
上市股市,
经营范围,
经营年数)
CREATE TABLE 餐饮公司城市连锁 (
公司id,
城市id,
分店数量,
占地面积,
餐位数量,
员工数量)
CREATE TABLE 餐饮公司城市消费 (
公司id,
城市id,
总消费额,
人均消费额,
人气,
排名)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些总部城市id拥有的餐饮公司平均经营时间最长,给出前5城市
SELECT### Response: select 总部城市id from 餐饮公司 group by 总部城市id order by avg ( 经营年数 ) desc limit 5. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 城市 (
词条id,
名称,
所属省份,
餐饮收入,
同比增长)
CREATE TABLE 餐饮公司 (
词条id,
名称,
总部城市id,
所属集团,
上市股市,
经营范围,
经营年数)
CREATE TABLE 餐饮公司城市连锁 (
公司id,
城市id,
分店数量,
占地面积,
餐位数量,
员工数量)
CREATE TABLE 餐饮公司城市消费 (
公司id,
城市id,
总消费额,
人均消费额,
人气,
排名)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些总部城市id拥有的餐饮公司最多,给出前3城市
SELECT### Response: select 总部城市id from 餐饮公司 group by 总部城市id order by count ( * ) desc limit 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 国家卫生城市 (
词条id,
名称,
所属省份,
下辖区县数量,
入选次数)
CREATE TABLE 国家旅游城市 (
词条id,
名称,
所属省份,
气候条件,
景点数量,
5A级景点数量)
CREATE TABLE 国家森林城市 (
词条id,
名称,
所属省份,
森林覆盖率,
森林公园数量)
CREATE TABLE 国家中心城市 (
词条id,
名称,
所属省份,
排名,
GDP,
GDP同比增速)
CREATE TABLE 世界一线城市 (
词条id,
名称,
所属省份,
世界排名,
户籍人口,
常住流动人口)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个省拥有的国家中心城市最少
SELECT### Response: select 所属省份 from 国家中心城市 group by 所属省份 order by count ( * ) asc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 国家卫生城市 (
词条id,
名称,
所属省份,
下辖区县数量,
入选次数)
CREATE TABLE 国家旅游城市 (
词条id,
名称,
所属省份,
气候条件,
景点数量,
5A级景点数量)
CREATE TABLE 国家森林城市 (
词条id,
名称,
所属省份,
森林覆盖率,
森林公园数量)
CREATE TABLE 国家中心城市 (
词条id,
名称,
所属省份,
排名,
GDP,
GDP同比增速)
CREATE TABLE 世界一线城市 (
词条id,
名称,
所属省份,
世界排名,
户籍人口,
常住流动人口)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个省拥有的国家中心城市最多
SELECT### Response: select 所属省份 from 国家中心城市 group by 所属省份 order by count ( * ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 夏季奥运会 (
届数,
奥运会,
举办国家,
举办城市,
口号)
CREATE TABLE 冬季奥运会 (
届数,
奥运会,
举办国家,
举办城市)
CREATE TABLE 奥运会申办国家 (
届数,
奥运会,
申办国家,
申办城市,
是否成功)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个国家申办的奥运会次数最多
SELECT### Response: select 申办国家 from 奥运会申办国家 group by 申办国家 order by count ( * ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 夏季奥运会 (
届数,
奥运会,
举办国家,
举办城市,
口号)
CREATE TABLE 冬季奥运会 (
届数,
奥运会,
举办国家,
举办城市)
CREATE TABLE 奥运会申办国家 (
届数,
奥运会,
申办国家,
申办城市,
是否成功)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪3个国家申办的奥运会次数最多
SELECT### Response: select 申办国家 from 奥运会申办国家 group by 申办国家 order by count ( * ) desc limit 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 酒店 (
词条id,
名称,
地址,
距火车站距离,
距机场距离,
距汽车站距离,
距市中心距离,
周围景点数,
周围饭店数量)
CREATE TABLE 酒店交通 (
酒店id,
地铁线路,
地铁站名称,
步行距离)
CREATE TABLE 酒店客房 (
酒店id,
房型,
早餐,
价格,
剩余房间数)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪种客房房型对应的酒店最少
SELECT### Response: select 房型 from 酒店客房 group by 房型 order by count ( * ) asc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 酒店 (
词条id,
名称,
地址,
距火车站距离,
距机场距离,
距汽车站距离,
距市中心距离,
周围景点数,
周围饭店数量)
CREATE TABLE 酒店交通 (
酒店id,
地铁线路,
地铁站名称,
步行距离)
CREATE TABLE 酒店客房 (
酒店id,
房型,
早餐,
价格,
剩余房间数)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪种客房房型对应的酒店最多
SELECT### Response: select 房型 from 酒店客房 group by 房型 order by count ( * ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 戏剧 (
词条id,
名称,
非遗级别,
发源地,
起源时间)
CREATE TABLE 戏剧分布城市 (
戏剧id,
城市,
受欢迎热度,
戏迷数量,
活动数量)
CREATE TABLE 戏剧演出活动 (
活动名称,
戏剧id,
城市,
演出时间,
售出票数,
最高票价,
最低票价)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个地方发源的戏剧最少
SELECT### Response: select 发源地 from 戏剧 group by 发源地 order by count ( * ) asc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 戏剧 (
词条id,
名称,
非遗级别,
发源地,
起源时间)
CREATE TABLE 戏剧分布城市 (
戏剧id,
城市,
受欢迎热度,
戏迷数量,
活动数量)
CREATE TABLE 戏剧演出活动 (
活动名称,
戏剧id,
城市,
演出时间,
售出票数,
最高票价,
最低票价)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个地方发源的戏剧最多
SELECT### Response: select 发源地 from 戏剧 group by 发源地 order by count ( * ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 公司 (
词条id,
名称,
行业,
校招人数)
CREATE TABLE 学校 (
词条id,
名称,
所在城市,
毕业人数)
CREATE TABLE 学校各专业 (
学校id,
专业,
毕业人数,
专业全国排名,
平均薪资)
CREATE TABLE 公司对口专业 (
公司id,
专业,
对应岗位,
拟招聘人数,
基本工资,
工资幅度)
CREATE TABLE 公司宣讲会 (
公司id,
学校id,
宣讲时间,
拟招聘人数,
参加笔试人数,
参加面试人数,
实际招聘人数)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个行业包含的所有公司中平均校园招聘人数最少,给出前3行业
SELECT### Response: select 行业 from 公司 group by 行业 order by avg ( 校招人数 ) asc limit 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 公司 (
词条id,
名称,
行业,
校招人数)
CREATE TABLE 学校 (
词条id,
名称,
所在城市,
毕业人数)
CREATE TABLE 学校各专业 (
学校id,
专业,
毕业人数,
专业全国排名,
平均薪资)
CREATE TABLE 公司对口专业 (
公司id,
专业,
对应岗位,
拟招聘人数,
基本工资,
工资幅度)
CREATE TABLE 公司宣讲会 (
公司id,
学校id,
宣讲时间,
拟招聘人数,
参加笔试人数,
参加面试人数,
实际招聘人数)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个行业包含的所有公司中平均校园招聘人数最多
SELECT### Response: select 行业 from 公司 group by 行业 order by count ( * ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 皇帝 (
词条id,
姓名,
年号,
所处朝代,
子女数量,
皇后数量,
妃子数量)
CREATE TABLE 皇后和妃子 (
词条id,
谥号,
夫君id,
年龄,
皇子数量,
公主数量)
CREATE TABLE 皇帝皇后合葬 (
皇帝id,
皇后id,
葬地)
CREATE TABLE 皇帝皇后影视形象 (
作品,
皇帝id,
皇帝饰演者,
皇后id,
皇后饰演者)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些作品包含的皇帝皇后最多
SELECT### Response: select 作品 from 皇帝皇后影视形象 group by 作品 order by count ( * ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 皇帝 (
词条id,
姓名,
年号,
所处朝代,
子女数量,
皇后数量,
妃子数量)
CREATE TABLE 皇后和妃子 (
词条id,
谥号,
夫君id,
年龄,
皇子数量,
公主数量)
CREATE TABLE 皇帝皇后合葬 (
皇帝id,
皇后id,
葬地)
CREATE TABLE 皇帝皇后影视形象 (
作品,
皇帝id,
皇帝饰演者,
皇后id,
皇后饰演者)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些作品包含的皇帝皇后最少
SELECT### Response: select 作品 from 皇帝皇后影视形象 group by 作品 order by count ( * ) asc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 演员 (
词条id,
姓名,
民族,
星座,
血型,
身高,
体重,
出生地,
出生日期,
毕业院校)
CREATE TABLE 导演 (
词条id,
姓名,
出生地,
出生日期,
毕业院校)
CREATE TABLE 角色 (
词条id,
姓名,
饰演演员id,
配音演员id,
出场作品)
CREATE TABLE 电视剧 (
词条id,
剧名,
导演,
编剧,
制片人,
集数,
类型)
CREATE TABLE 演员及导演作品 (
演员id,
导演id,
合作作品id,
作品出品时间)
CREATE TABLE 演员与导演的合作 (
演员id,
导演id,
合作次数)
CREATE TABLE 演员的作品 (
演员id,
作品id,
角色类型)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些导演执导的电视剧最多,给出前3导演
SELECT### Response: select 导演 from 电视剧 group by 导演 order by count ( * ) desc limit 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 演员 (
词条id,
姓名,
民族,
星座,
血型,
身高,
体重,
出生地,
出生日期,
毕业院校)
CREATE TABLE 导演 (
词条id,
姓名,
出生地,
出生日期,
毕业院校)
CREATE TABLE 角色 (
词条id,
姓名,
饰演演员id,
配音演员id,
出场作品)
CREATE TABLE 电视剧 (
词条id,
剧名,
导演,
编剧,
制片人,
集数,
类型)
CREATE TABLE 演员及导演作品 (
演员id,
导演id,
合作作品id,
作品出品时间)
CREATE TABLE 演员与导演的合作 (
演员id,
导演id,
合作次数)
CREATE TABLE 演员的作品 (
演员id,
作品id,
角色类型)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个导演执导的电视剧最少
SELECT### Response: select 导演 from 电视剧 group by 导演 order by count ( * ) asc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 省份 (
词条id,
名称,
500强企业数量,
总营收(亿元),
总利润(亿元))
CREATE TABLE 企业 (
词条id,
名称,
省份id,
成立时间,
公司类型,
领域分类,
年营业额,
员工数,
注册资本,
500强排名)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪种公司类型对应的企业最多
SELECT### Response: select 公司类型 from 企业 group by 公司类型 order by count ( * ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 省份 (
词条id,
名称,
500强企业数量,
总营收(亿元),
总利润(亿元))
CREATE TABLE 企业 (
词条id,
名称,
省份id,
成立时间,
公司类型,
领域分类,
年营业额,
员工数,
注册资本,
500强排名)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪种公司类型对应的企业最少
SELECT### Response: select 公司类型 from 企业 group by 公司类型 order by count ( * ) limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 百城 (
词条id,
城市,
排名,
人口吸引力指数,
同比排名变化,
环比排名变化)
CREATE TABLE 人口来源城市 (
城市id,
人口来源省份,
流入人口占比,
排名)
CREATE TABLE 人口去向城市 (
城市id,
人口去向省份,
流出人口占比,
排名)
CREATE TABLE 流动人口年龄 (
年份,
年龄段,
占比)
CREATE TABLE 流动人口学历 (
年份,
学历,
占比)
CREATE TABLE 城市酒吧活力 (
城市id,
酒吧数量,
排名,
周末客流量,
节假日客流量,
平日客流量)
CREATE TABLE 酒吧顾客年龄 (
顾客年龄段,
占比)
CREATE TABLE 城市美食 (
城市id,
美食名称,
搜索指数,
关注排名)
CREATE TABLE 城市文化 (
城市id,
文化名称,
关注热度,
关注排名)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些城市id拥有的美食种类最少,给出前3城市
SELECT### Response: select 城市id from 城市美食 group by 城市id order by count ( * ) limit 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 百城 (
词条id,
城市,
排名,
人口吸引力指数,
同比排名变化,
环比排名变化)
CREATE TABLE 人口来源城市 (
城市id,
人口来源省份,
流入人口占比,
排名)
CREATE TABLE 人口去向城市 (
城市id,
人口去向省份,
流出人口占比,
排名)
CREATE TABLE 流动人口年龄 (
年份,
年龄段,
占比)
CREATE TABLE 流动人口学历 (
年份,
学历,
占比)
CREATE TABLE 城市酒吧活力 (
城市id,
酒吧数量,
排名,
周末客流量,
节假日客流量,
平日客流量)
CREATE TABLE 酒吧顾客年龄 (
顾客年龄段,
占比)
CREATE TABLE 城市美食 (
城市id,
美食名称,
搜索指数,
关注排名)
CREATE TABLE 城市文化 (
城市id,
文化名称,
关注热度,
关注排名)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些城市id对美食平均搜索次数最高
SELECT### Response: select 城市id from 城市美食 group by 城市id order by avg ( 搜索指数 ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 作者 (
词条id,
姓名,
国籍,
毕业院校,
民族)
CREATE TABLE 文集 (
词条id,
名称,
作者id,
页数,
定价,
出版社,
出版时间,
开本)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些出版社出版的文集总页数最多,给出前3出版社
SELECT### Response: select 出版社 from 文集 group by 出版社 order by sum ( 页数 ) desc limit 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 作者 (
词条id,
姓名,
国籍,
毕业院校,
民族)
CREATE TABLE 文集 (
词条id,
名称,
作者id,
页数,
定价,
出版社,
出版时间,
开本)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些出版社出版的文集平均页数最多,给出前3出版社
SELECT### Response: select 出版社 from 文集 group by 出版社 order by avg ( 页数 ) desc limit 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 2018年宜居城市 (
城市,
所属省份,
分数,
空气指数,
蓝天数量)
CREATE TABLE 2017年宜居城市 (
城市,
所属省份,
分数,
空气指数,
蓝天数量)
CREATE TABLE 2016年宜居城市 (
城市,
所属省份,
分数,
空气指数,
蓝天数量)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在2017年,哪个省份拥有的宜居城市最多
SELECT### Response: select 所属省份 from 2017年宜居城市 group by 所属省份 order by count ( * ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 2018年宜居城市 (
城市,
所属省份,
分数,
空气指数,
蓝天数量)
CREATE TABLE 2017年宜居城市 (
城市,
所属省份,
分数,
空气指数,
蓝天数量)
CREATE TABLE 2016年宜居城市 (
城市,
所属省份,
分数,
空气指数,
蓝天数量)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在2017年,哪些省份拥有的宜居城市最少,给出前3省份
SELECT### Response: select 所属省份 from 2017年宜居城市 group by 所属省份 order by count ( * ) limit 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 文学奖 (
词条id,
名称,
设立时间,
设立原因,
举办间隔年限)
CREATE TABLE 文学奖项颁奖奖项 (
文学奖id,
奖项)
CREATE TABLE 文学作品 (
词条id,
名称,
作者,
创作年代,
首版时间,
字数)
CREATE TABLE 文学奖获奖名单 (
届数,
作品id,
作者,
出版社)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些奖项对应的文学奖种类最多
SELECT### Response: select 奖项 from 文学奖项颁奖奖项 group by 奖项 order by count ( * ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 文学奖 (
词条id,
名称,
设立时间,
设立原因,
举办间隔年限)
CREATE TABLE 文学奖项颁奖奖项 (
文学奖id,
奖项)
CREATE TABLE 文学作品 (
词条id,
名称,
作者,
创作年代,
首版时间,
字数)
CREATE TABLE 文学奖获奖名单 (
届数,
作品id,
作者,
出版社)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些奖项对应的文学奖种类最少
SELECT### Response: select 奖项 from 文学奖项颁奖奖项 group by 奖项 order by count ( * ) limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 名人 (
词条id,
姓名,
国籍,
职业,
主要成就)
CREATE TABLE 传记 (
词条id,
书名,
作者,
页数,
出版社,
出版时间)
CREATE TABLE 名人传记 (
传记id,
人物id,
记录时间)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪3个国家拥有的名人最多
SELECT### Response: select 国籍 from 名人 group by 国籍 order by count ( * ) desc limit 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 名人 (
词条id,
姓名,
国籍,
职业,
主要成就)
CREATE TABLE 传记 (
词条id,
书名,
作者,
页数,
出版社,
出版时间)
CREATE TABLE 名人传记 (
传记id,
人物id,
记录时间)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪3个国家拥有的名人最少
SELECT### Response: select 国籍 from 名人 group by 国籍 order by count ( * ) asc limit 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 40城消费力排名 (
城市,
所在省份,
社消总额(亿),
总额排名,
增速,
增速排名,
人均社消(万),
总GDP(亿),
人均GDP(万),
常住人口(万),
参考房价)
CREATE TABLE 各城市消费结构 (
城市,
人均可支配收入,
餐饮消费占比,
奢侈品消费占比,
旅游占比,
人均网购消费额,
电子产品消费占比)
CREATE TABLE 生态文明消费 (
环保消费品,
增长率)
CREATE TABLE 品牌消费 (
品牌,
类型,
销量占比,
销量排名)
CREATE TABLE 商品种类消费增速 (
种类,
2013年增速,
2015年增速,
2017年增速)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些品牌所有类型平均销量占比最低,给出前5个品牌
SELECT### Response: select 品牌 from 品牌消费 group by 品牌 order by avg ( 销量占比 ) asc limit 5. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 40城消费力排名 (
城市,
所在省份,
社消总额(亿),
总额排名,
增速,
增速排名,
人均社消(万),
总GDP(亿),
人均GDP(万),
常住人口(万),
参考房价)
CREATE TABLE 各城市消费结构 (
城市,
人均可支配收入,
餐饮消费占比,
奢侈品消费占比,
旅游占比,
人均网购消费额,
电子产品消费占比)
CREATE TABLE 生态文明消费 (
环保消费品,
增长率)
CREATE TABLE 品牌消费 (
品牌,
类型,
销量占比,
销量排名)
CREATE TABLE 商品种类消费增速 (
种类,
2013年增速,
2015年增速,
2017年增速)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些品牌所有类型销量占比加起来最高,给出前3个品牌
SELECT### Response: select 品牌 from 品牌消费 group by 品牌 order by sum ( 销量占比 ) desc limit 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 篮球队 (
词条id,
队名,
所属地区,
成立时间,
主场馆,
容纳人数,
主教练,
赞助商家)
CREATE TABLE 篮球运动员 (
词条id,
姓名,
国籍,
民族,
出生地,
出生日期,
身高,
体重,
所属球队id,
场上位置)
CREATE TABLE 运动员赛事记录 (
球员id,
赛事,
类别)
CREATE TABLE CBA总冠军 (
赛季,
冠军球队id,
亚军球队id)
CREATE TABLE 最有价值球员 (
赛季,
球员id,
球队id)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些国家出生的篮球运动员身高加起来最矮,给出前3个国家
SELECT### Response: select 国籍 from 篮球运动员 group by 国籍 order by sum ( 身高 ) asc limit 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 篮球队 (
词条id,
队名,
所属地区,
成立时间,
主场馆,
容纳人数,
主教练,
赞助商家)
CREATE TABLE 篮球运动员 (
词条id,
姓名,
国籍,
民族,
出生地,
出生日期,
身高,
体重,
所属球队id,
场上位置)
CREATE TABLE 运动员赛事记录 (
球员id,
赛事,
类别)
CREATE TABLE CBA总冠军 (
赛季,
冠军球队id,
亚军球队id)
CREATE TABLE 最有价值球员 (
赛季,
球员id,
球队id)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些国家出生的篮球运动员平均身高最高,给出前5个国家
SELECT### Response: select 国籍 from 篮球运动员 group by 国籍 order by avg ( 身高 ) desc limit 5. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 会议 (
词条id,
名称,
成立时间,
级别)
CREATE TABLE 各会议论文 (
会议id,
年份,
长文提交量,
长文录取率,
短文提交量,
短文录取率)
CREATE TABLE 各会议论文大洲分布 (
会议id,
年份,
大洲,
提交数量占比)
CREATE TABLE 各会议论文国家分布 (
会议id,
年份,
国家,
提交数量占比)
CREATE TABLE 2019年会议各方向分布 (
方向名称,
会议id,
长文提交量,
长文录取率,
短文提交量,
短文录取率)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪种级别对应的会议最多
SELECT### Response: select 级别 from 会议 group by 级别 order by count ( * ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 会议 (
词条id,
名称,
成立时间,
级别)
CREATE TABLE 各会议论文 (
会议id,
年份,
长文提交量,
长文录取率,
短文提交量,
短文录取率)
CREATE TABLE 各会议论文大洲分布 (
会议id,
年份,
大洲,
提交数量占比)
CREATE TABLE 各会议论文国家分布 (
会议id,
年份,
国家,
提交数量占比)
CREATE TABLE 2019年会议各方向分布 (
方向名称,
会议id,
长文提交量,
长文录取率,
短文提交量,
短文录取率)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪种级别对应的会议最少
SELECT### Response: select 级别 from 会议 group by 级别 order by count ( * ) asc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 动物 (
词条id,
中文学名,
食性,
是否是人类朋友,
理由)
CREATE TABLE 动物的天敌 (
动物id,
天敌id,
克星原因)
CREATE TABLE 动物朋友 (
动物id,
朋友id)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪种食性对应的动物最多
SELECT### Response: select 食性 from 动物 group by 食性 order by count ( * ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 动物 (
词条id,
中文学名,
食性,
是否是人类朋友,
理由)
CREATE TABLE 动物的天敌 (
动物id,
天敌id,
克星原因)
CREATE TABLE 动物朋友 (
动物id,
朋友id)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪种食性对应的动物最少
SELECT### Response: select 食性 from 动物 group by 食性 order by count ( * ) asc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 山峰 (
词条id,
名称,
所属山系,
海拔,
首次登顶时间,
排名)
CREATE TABLE 国家 (
词条id,
名称,
所属洲)
CREATE TABLE 山峰的国家 (
山峰id,
起点国家id,
终点国家id,
走向)
CREATE TABLE 景点 (
词条id,
名称,
山峰id,
门票价格,
游玩季节)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个大洲拥有的国家最少
SELECT### Response: select 所属洲 from 国家 group by 所属洲 order by count ( * ) asc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 山峰 (
词条id,
名称,
所属山系,
海拔,
首次登顶时间,
排名)
CREATE TABLE 国家 (
词条id,
名称,
所属洲)
CREATE TABLE 山峰的国家 (
山峰id,
起点国家id,
终点国家id,
走向)
CREATE TABLE 景点 (
词条id,
名称,
山峰id,
门票价格,
游玩季节)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪2个大洲拥有的国家最少
SELECT### Response: select 所属洲 from 国家 group by 所属洲 order by count ( * ) asc limit 2. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 中国城市供水生产能力 (
年份,
供水生成能力,
供水管道长度,
供水总量,
供水量增长率,
生活用水供水量,
生产用水供水量,
用水人口,
用水人口同比增长,
人均日生活用水量,
人均用水量同比增长)
CREATE TABLE 中国发电量及电力消费量 (
年份,
发电量,
电力消费)
CREATE TABLE 中国电力结构及发电量 (
年份,
发电类型,
发电量)
CREATE TABLE 中国电力装机量 (
年份,
发电类型,
新增装机量(MW),
累计装机量(MW))
CREATE TABLE 各省发电量及电力消费量 (
省份,
发电量(亿千瓦小时),
电力消费(亿千瓦小时))
CREATE TABLE 各省生物质发电量 (
省份,
累计并网装机容量(万千瓦),
农林生物质发电量(亿千瓦小时),
生活垃圾焚烧发电量(亿千瓦小时),
沼气发电量(亿千瓦小时))
-- Using valid SQLite, answer the following questions for the tables provided above.
--最近几年,哪种发电类型平均发电量最小
SELECT### Response: select 发电类型 from 中国电力结构及发电量 group by 发电类型 order by avg ( 发电量 ) asc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 大洲 (
词条id,
名称,
面积排名,
人口排名)
CREATE TABLE 国家 (
词条id,
名称,
成立时间,
官方语言,
所属洲id)
CREATE TABLE 高校 (
词条id,
名称,
类型,
所属国家id,
世界软科排名,
泰晤士排名,
QS排名,
USNews排名)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪种高校类型包含的学校最少
SELECT### Response: select 类型 from 高校 group by 类型 order by count ( * ) asc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 大洲 (
词条id,
名称,
面积排名,
人口排名)
CREATE TABLE 国家 (
词条id,
名称,
成立时间,
官方语言,
所属洲id)
CREATE TABLE 高校 (
词条id,
名称,
类型,
所属国家id,
世界软科排名,
泰晤士排名,
QS排名,
USNews排名)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪种高校类型包含的学校最多
SELECT### Response: select 类型 from 高校 group by 类型 order by count ( * ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 中国电视剧奖 (
词条id,
名称,
主办单位,
创办时间)
CREATE TABLE 演职员 (
词条id,
姓名,
出生地,
出生日期,
毕业院校,
职业)
CREATE TABLE 电视剧 (
词条id,
名称,
类型,
首播时间,
集数,
豆瓣评分)
CREATE TABLE 历届颁奖晚会 (
年份,
届数,
电视剧奖id,
颁奖地点)
CREATE TABLE 历届获奖演职员名单 (
年份,
届数,
电视剧奖id,
具体奖项,
获奖人id,
来自电视剧id)
CREATE TABLE 历届获奖影视剧名单 (
年份,
届数,
电视剧奖id,
具体奖项,
获奖电视剧id)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些地方出生的演艺界人士最少,给出前3地方
SELECT### Response: select 出生地 from 演职员 group by 出生地 order by count ( * ) asc limit 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 中国电视剧奖 (
词条id,
名称,
主办单位,
创办时间)
CREATE TABLE 演职员 (
词条id,
姓名,
出生地,
出生日期,
毕业院校,
职业)
CREATE TABLE 电视剧 (
词条id,
名称,
类型,
首播时间,
集数,
豆瓣评分)
CREATE TABLE 历届颁奖晚会 (
年份,
届数,
电视剧奖id,
颁奖地点)
CREATE TABLE 历届获奖演职员名单 (
年份,
届数,
电视剧奖id,
具体奖项,
获奖人id,
来自电视剧id)
CREATE TABLE 历届获奖影视剧名单 (
年份,
届数,
电视剧奖id,
具体奖项,
获奖电视剧id)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些地方出生的演艺界人士最多
SELECT### Response: select 出生地 from 演职员 group by 出生地 order by count ( * ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 国家历史 (
词条id,
书名,
讲述国家,
讲述时代)
CREATE TABLE 中国朝代历史 (
词条id,
书名,
讲述朝代)
CREATE TABLE 战争历史 (
词条id,
书名,
描述战事)
CREATE TABLE 人物历史 (
词条id,
书名,
讲述名人)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些朝代对应的讲述书籍最多,给出前3个朝代
SELECT### Response: select 讲述朝代 from 中国朝代历史 group by 讲述朝代 order by count ( * ) desc limit 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 国家历史 (
词条id,
书名,
讲述国家,
讲述时代)
CREATE TABLE 中国朝代历史 (
词条id,
书名,
讲述朝代)
CREATE TABLE 战争历史 (
词条id,
书名,
描述战事)
CREATE TABLE 人物历史 (
词条id,
书名,
讲述名人)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些朝代对应的讲述书籍最少
SELECT### Response: select 讲述朝代 from 中国朝代历史 group by 讲述朝代 order by count ( * ) asc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 旅行社 (
词条id,
名称,
级别,
出境游国家数量,
国内游城市数量,
出境游路线数量,
国内游路线数量,
亚洲排名,
接待海外游客数量,
境外公司数量,
控股子公司数量,
有业务关系的旅行商数量,
免税店数量)
CREATE TABLE 出境游路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
成人价格,
儿童价格,
国家数量,
景点数,
门票总价格)
CREATE TABLE 出境游所含国家 (
路线id,
国家,
旅行天数,
景点数量)
CREATE TABLE 国内游路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
预售价格,
参团价格,
起团人数,
个人价格,
景点数)
CREATE TABLE 邮轮路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
内舱房价格,
海景房价格,
阳台房价格,
航行区域,
邮轮公司)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪种级别包含的旅行社出境游国家加起来最少
SELECT### Response: select 级别 from 旅行社 group by 级别 order by sum ( 出境游国家数量 ) asc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 旅行社 (
词条id,
名称,
级别,
出境游国家数量,
国内游城市数量,
出境游路线数量,
国内游路线数量,
亚洲排名,
接待海外游客数量,
境外公司数量,
控股子公司数量,
有业务关系的旅行商数量,
免税店数量)
CREATE TABLE 出境游路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
成人价格,
儿童价格,
国家数量,
景点数,
门票总价格)
CREATE TABLE 出境游所含国家 (
路线id,
国家,
旅行天数,
景点数量)
CREATE TABLE 国内游路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
预售价格,
参团价格,
起团人数,
个人价格,
景点数)
CREATE TABLE 邮轮路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
内舱房价格,
海景房价格,
阳台房价格,
航行区域,
邮轮公司)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪种级别包含的旅行社出境游平均包含国家最少
SELECT### Response: select 级别 from 旅行社 group by 级别 order by avg ( 出境游国家数量 ) asc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 旅行社 (
词条id,
名称,
级别,
出境游国家数量,
国内游城市数量,
出境游路线数量,
国内游路线数量,
亚洲排名,
接待海外游客数量,
境外公司数量,
控股子公司数量,
有业务关系的旅行商数量,
免税店数量)
CREATE TABLE 出境游路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
成人价格,
儿童价格,
国家数量,
景点数,
门票总价格)
CREATE TABLE 出境游所含国家 (
路线id,
国家,
旅行天数,
景点数量)
CREATE TABLE 国内游路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
预售价格,
参团价格,
起团人数,
个人价格,
景点数)
CREATE TABLE 邮轮路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
内舱房价格,
海景房价格,
阳台房价格,
航行区域,
邮轮公司)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些国家在各类出境游路线中总旅行时间最长,给出前3国家
SELECT### Response: select 国家 from 出境游所含国家 group by 国家 order by sum ( 旅行天数 ) desc limit 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 旅行社 (
词条id,
名称,
级别,
出境游国家数量,
国内游城市数量,
出境游路线数量,
国内游路线数量,
亚洲排名,
接待海外游客数量,
境外公司数量,
控股子公司数量,
有业务关系的旅行商数量,
免税店数量)
CREATE TABLE 出境游路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
成人价格,
儿童价格,
国家数量,
景点数,
门票总价格)
CREATE TABLE 出境游所含国家 (
路线id,
国家,
旅行天数,
景点数量)
CREATE TABLE 国内游路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
预售价格,
参团价格,
起团人数,
个人价格,
景点数)
CREATE TABLE 邮轮路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
内舱房价格,
海景房价格,
阳台房价格,
航行区域,
邮轮公司)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在所有出境游线路中,哪个国家被包含次数最多
SELECT### Response: select 国家 from 出境游所含国家 group by 国家 order by count ( * ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 世博会 (
词条id,
名称,
时间,
地点,
种类,
举办天数,
主题,
参展方数量,
投资成本,
会场面积,
参观人数,
单日客流)
CREATE TABLE 世博会场馆 (
世博会id,
场馆,
场馆所属国家,
排名,
占比面积,
参观人数)
CREATE TABLE 世界园博会 (
词条id,
名称,
时间,
地点,
级别,
会期,
主题,
场馆数量,
会场面积,
参观人数,
票价)
CREATE TABLE 中国花卉园博会 (
时间,
届数,
举办城市,
地点,
展园数量,
参与机构数量)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个城市举办的中国花卉园博会展园加起来最少
SELECT### Response: select 举办城市 from 中国花卉园博会 group by 举办城市 order by sum ( 展园数量 ) asc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 世博会 (
词条id,
名称,
时间,
地点,
种类,
举办天数,
主题,
参展方数量,
投资成本,
会场面积,
参观人数,
单日客流)
CREATE TABLE 世博会场馆 (
世博会id,
场馆,
场馆所属国家,
排名,
占比面积,
参观人数)
CREATE TABLE 世界园博会 (
词条id,
名称,
时间,
地点,
级别,
会期,
主题,
场馆数量,
会场面积,
参观人数,
票价)
CREATE TABLE 中国花卉园博会 (
时间,
届数,
举办城市,
地点,
展园数量,
参与机构数量)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些城市举办的中国花卉园博会展园平均数量最多,给出前3城市
SELECT### Response: select 举办城市 from 中国花卉园博会 group by 举办城市 order by avg ( 展园数量 ) desc limit 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 电商 (
词条id,
名称,
所属公司,
类型,
影响力指数,
排名,
上线国家数量)
CREATE TABLE 电商覆盖国家 (
电商id,
支持国家,
上线时间,
负责的分公司名称)
CREATE TABLE 商家 (
词条id,
名称,
所属国家,
主营类别,
网店覆盖国家数量,
实体店数量,
入驻电商数量)
CREATE TABLE 商家网点覆盖国家 (
商家id,
国家,
实体店数量,
年平均营业额)
CREATE TABLE 商家交易额 (
商家id,
电商平台id,
上线品类数量,
促销品类数量,
平均折扣,
交易额,
占全年销售额比例)
CREATE TABLE 电商活动交易额 (
电商平台id,
活动日,
参加活动商家数量,
促销商品数量,
交易额)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个国家拥有的所有商家,其网店覆盖的国家总量最少
SELECT### Response: select 所属国家 from 商家 group by 所属国家 order by sum ( 网店覆盖国家数量 ) asc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 电商 (
词条id,
名称,
所属公司,
类型,
影响力指数,
排名,
上线国家数量)
CREATE TABLE 电商覆盖国家 (
电商id,
支持国家,
上线时间,
负责的分公司名称)
CREATE TABLE 商家 (
词条id,
名称,
所属国家,
主营类别,
网店覆盖国家数量,
实体店数量,
入驻电商数量)
CREATE TABLE 商家网点覆盖国家 (
商家id,
国家,
实体店数量,
年平均营业额)
CREATE TABLE 商家交易额 (
商家id,
电商平台id,
上线品类数量,
促销品类数量,
平均折扣,
交易额,
占全年销售额比例)
CREATE TABLE 电商活动交易额 (
电商平台id,
活动日,
参加活动商家数量,
促销商品数量,
交易额)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个国家拥有的商家最少
SELECT### Response: select 所属国家 from 商家 group by 所属国家 order by count ( * ) asc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 景区 (
词条id,
名称,
占地面积,
景点级别,
旺季门票价格,
淡季门票价格,
始建时间,
所属城市,
所属省份)
CREATE TABLE 景点 (
词条id,
名称,
地理位置)
CREATE TABLE 交通站 (
词条id,
名称,
类型,
景区id,
距离)
CREATE TABLE 景区景点 (
景点id,
景区id,
是否著名)
CREATE TABLE 临近景区 (
景区id,
相邻景区id,
距离)
CREATE TABLE 博物馆 (
词条id,
名称,
占地面积,
开馆时间,
所属城市,
票价)
CREATE TABLE 重点文物保护单位 (
词条id,
名称,
门票价格,
保护级别,
所属城市,
评定年份)
CREATE TABLE 动物园 (
词条id,
名称,
占地面积,
竣工时间,
门票价格,
动物种类,
所属城市)
CREATE TABLE 馆藏动物 (
动物名称,
动物园id,
数量)
CREATE TABLE 游乐园 (
词条id,
名称,
占地面积,
门票价格,
总投资,
所属城市)
CREATE TABLE 娱乐项目 (
项目名称,
游乐园id,
季节,
排名)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个城市建立的游乐园最多
SELECT### Response: select 所属城市 from 游乐园 group by 所属城市 order by count ( * ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 景区 (
词条id,
名称,
占地面积,
景点级别,
旺季门票价格,
淡季门票价格,
始建时间,
所属城市,
所属省份)
CREATE TABLE 景点 (
词条id,
名称,
地理位置)
CREATE TABLE 交通站 (
词条id,
名称,
类型,
景区id,
距离)
CREATE TABLE 景区景点 (
景点id,
景区id,
是否著名)
CREATE TABLE 临近景区 (
景区id,
相邻景区id,
距离)
CREATE TABLE 博物馆 (
词条id,
名称,
占地面积,
开馆时间,
所属城市,
票价)
CREATE TABLE 重点文物保护单位 (
词条id,
名称,
门票价格,
保护级别,
所属城市,
评定年份)
CREATE TABLE 动物园 (
词条id,
名称,
占地面积,
竣工时间,
门票价格,
动物种类,
所属城市)
CREATE TABLE 馆藏动物 (
动物名称,
动物园id,
数量)
CREATE TABLE 游乐园 (
词条id,
名称,
占地面积,
门票价格,
总投资,
所属城市)
CREATE TABLE 娱乐项目 (
项目名称,
游乐园id,
季节,
排名)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个城市建立的游乐园最少,给出3个城市
SELECT### Response: select 所属城市 from 游乐园 group by 所属城市 order by count ( * ) asc limit 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 网红食品 (
词条id,
名称,
品类数量,
商家数量,
出现年份)
CREATE TABLE 网红食品销售 (
类型id,
年份,
销售额,
购买人数)
CREATE TABLE 网红食品购买者 (
类型id,
年龄段,
人数占比)
CREATE TABLE 网红食品分布城市 (
类型id,
省份,
销售量占比,
商家占比,
安全事件关注度)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪2个年龄段购买的网红食品种类最多
SELECT### Response: select 年龄段 from 网红食品购买者 group by 年龄段 order by count ( * ) desc limit 2. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 网红食品 (
词条id,
名称,
品类数量,
商家数量,
出现年份)
CREATE TABLE 网红食品销售 (
类型id,
年份,
销售额,
购买人数)
CREATE TABLE 网红食品购买者 (
类型id,
年龄段,
人数占比)
CREATE TABLE 网红食品分布城市 (
类型id,
省份,
销售量占比,
商家占比,
安全事件关注度)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个年龄段在各类网红食品购买中平均人数占比最多
SELECT### Response: select 年龄段 from 网红食品购买者 group by 年龄段 order by avg ( 人数占比 ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 诺贝尔奖项 (
词条id,
名称,
领域,
第一次颁奖时间,
获奖者最大年龄,
获奖者最小年龄,
获奖者平均年龄)
CREATE TABLE 高校 (
词条id,
名称,
所属国家,
世界排名,
独立科研机构数量,
重点学科数量)
CREATE TABLE 高校获奖名单 (
高校id,
奖项id,
人数,
排名)
CREATE TABLE 各国获奖名单 (
国家,
奖项id,
人数)
CREATE TABLE 科学家 (
词条id,
姓名,
性别,
国籍,
出生日期,
职业)
CREATE TABLE 毕业院校 (
科学家id,
高校id,
获得学位)
CREATE TABLE 诺贝尔奖科学家名单 (
年份,
奖项id,
科学家id,
理由)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些国家出生的科学家最少,给出前3国家
SELECT### Response: select 国籍 from 科学家 group by 国籍 order by count ( * ) asc limit 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 诺贝尔奖项 (
词条id,
名称,
领域,
第一次颁奖时间,
获奖者最大年龄,
获奖者最小年龄,
获奖者平均年龄)
CREATE TABLE 高校 (
词条id,
名称,
所属国家,
世界排名,
独立科研机构数量,
重点学科数量)
CREATE TABLE 高校获奖名单 (
高校id,
奖项id,
人数,
排名)
CREATE TABLE 各国获奖名单 (
国家,
奖项id,
人数)
CREATE TABLE 科学家 (
词条id,
姓名,
性别,
国籍,
出生日期,
职业)
CREATE TABLE 毕业院校 (
科学家id,
高校id,
获得学位)
CREATE TABLE 诺贝尔奖科学家名单 (
年份,
奖项id,
科学家id,
理由)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些国家出生的科学家最多
SELECT### Response: select 国籍 from 科学家 group by 国籍 order by count ( * ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 网球运动员 (
词条id,
姓名,
性别,
国籍,
专业特点)
CREATE TABLE 网球赛事单打冠军排名 (
运动员id,
赛事,
夺冠次数,
夺冠年份)
CREATE TABLE 网球赛事历届单打冠军 (
年份,
赛事,
性别,
冠军id,
亚军id,
决赛比分)
CREATE TABLE 网球比赛记录 (
记录项目,
保持者id,
说明)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个性别的网球运动员最多
SELECT### Response: select 性别 from 网球运动员 group by 性别 order by count ( * ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 夏季奥运会 (
届数,
奥运会,
举办国家,
举办城市,
口号)
CREATE TABLE 冬季奥运会 (
届数,
奥运会,
举办国家,
举办城市)
CREATE TABLE 奥运会申办国家 (
届数,
奥运会,
申办国家,
申办城市,
是否成功)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些国家举办的夏季奥运会次数最少
SELECT### Response: select 举办国家 from 夏季奥运会 group by 举办国家 order by count ( * ) asc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 夏季奥运会 (
届数,
奥运会,
举办国家,
举办城市,
口号)
CREATE TABLE 冬季奥运会 (
届数,
奥运会,
举办国家,
举办城市)
CREATE TABLE 奥运会申办国家 (
届数,
奥运会,
申办国家,
申办城市,
是否成功)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些国家举办的夏季奥运会次数最多
SELECT### Response: select 举办国家 from 夏季奥运会 group by 举办国家 order by count ( * ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 足球运动员 (
词条id,
中文名,
国籍,
年龄,
俱乐部)
CREATE TABLE 世界杯金球奖 (
年份,
世界杯名称,
金球奖运动员id,
银球奖运动员id,
铜球奖运动员id)
CREATE TABLE 欧洲杯金球奖 (
赛季,
运动员id,
国籍,
俱乐部,
进球数)
CREATE TABLE FIFA金球奖 (
年度,
运动员id,
获奖时国籍,
获奖时俱乐部)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个国家的足球运动员在欧洲杯金进球总数最大
SELECT### Response: select 国籍 from 欧洲杯金球奖 group by 国籍 order by sum ( 进球数 ) desc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 足球运动员 (
词条id,
中文名,
国籍,
年龄,
俱乐部)
CREATE TABLE 世界杯金球奖 (
年份,
世界杯名称,
金球奖运动员id,
银球奖运动员id,
铜球奖运动员id)
CREATE TABLE 欧洲杯金球奖 (
赛季,
运动员id,
国籍,
俱乐部,
进球数)
CREATE TABLE FIFA金球奖 (
年度,
运动员id,
获奖时国籍,
获奖时俱乐部)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些国家的足球运动员在欧洲杯金进球总数最大,给出前3国家
SELECT### Response: select 国籍 from 欧洲杯金球奖 group by 国籍 order by count ( * ) desc limit 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 智能手机公司 (
词条id,
名称,
所属国家,
年营业额,
年利润,
世界排名)
CREATE TABLE 智能手机全球出货量 (
公司id,
2017年出货量,
2017年市场占比,
2018年出货量,
2018年市场占比,
占比提升幅度)
CREATE TABLE 智能手机部署国家 (
公司id,
部署国家,
部署年份,
销售量排名)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些国家拥有的智能手机公司平均年营业额最高,给出前5国家
SELECT### Response: select 所属国家 from 智能手机公司 group by 所属国家 order by avg ( 年营业额 ) desc limit 5. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 智能手机公司 (
词条id,
名称,
所属国家,
年营业额,
年利润,
世界排名)
CREATE TABLE 智能手机全球出货量 (
公司id,
2017年出货量,
2017年市场占比,
2018年出货量,
2018年市场占比,
占比提升幅度)
CREATE TABLE 智能手机部署国家 (
公司id,
部署国家,
部署年份,
销售量排名)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些国家拥有的智能手机公司最少
SELECT### Response: select 所属国家 from 智能手机公司 group by 所属国家 order by count ( * ) asc limit 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 重要赛事 (
词条id,
赛事名称,
人群,
成立时间,
比赛间隔年,
比赛项目数量)
CREATE TABLE 冠军国家 (
国家名称,
赛事id,
冠军数量)
CREATE TABLE 羽毛球球员 (
词条id,
中文名,
性别,
国籍,
出生日期,
身高)
CREATE TABLE 奥运会冠亚军 (
奥运会名称,
项目名称,
金牌获得者id,
银牌获得者id,
铜牌获得者id)
CREATE TABLE 球员夺冠次数 (
球员id,
赛事id,
冠军次数,
亚军次数,
季军次数)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个国家在各类赛事中冠军总量最大
SELECT### Response: select 国家名称 from 冠军国家 group by 国家名称 order by sum ( 冠军数量 ) desc limit 1. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.