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,
冠军数量)
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 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)
CREATE TABLE 将军影视形象 (
将军id,
影视剧,
饰演者)
CREATE TABLE 参战双方 (
战役id,
赢方将军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,
时间,
纪念)
-- 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.
--哪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,
公司,
赞助级别)
-- 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,
公司,
赞助级别)
-- 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,
源自姓氏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,
源自姓氏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,
名称,
总部地点,
成立时间,
员工数量,
运输车辆数,
覆盖城市数量,
网点数量)
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 ( * ) 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,
名称,
所属区域)
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 两院院士学校名单 (
学校,
所在省市,
所在城市,
院士人数)
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 各国女院士比例 (
国家,
女院士人数,
所占比例)
CREATE TABLE 各学部院士分布 (
年份,
学部,
院士人数,
所占比例)
-- 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,
名称,
所在省份,
类型,
是否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.
--清华大学招生中,哪种类型对应的各专业平均学费最高
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,
名称,
总部所在省,
上级主管部门,
酒店数量,
客房数量,
省排名,
中国500最具价值品牌排名,
全球酒店集团300强排名)
CREATE TABLE 酒店 (
词条id,
名称,
酒店地址,
开业时间,
酒店星级,
所属集团id,
客房数量,
大厅容纳人数)
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.
--哪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,
名称,
总部所在省,
上级主管部门,
酒店数量,
客房数量,
省排名,
中国500最具价值品牌排名,
全球酒店集团300强排名)
CREATE TABLE 酒店 (
词条id,
名称,
酒店地址,
开业时间,
酒店星级,
所属集团id,
客房数量,
大厅容纳人数)
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 ( * ) 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,
歌手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,
歌手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,
期刊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,
期刊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 各城市电视机售卖 (
城市,
所属省份,
电视机售卖量,
观看电视日平均用时)
-- 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 各城市电视机售卖 (
城市,
所属省份,
电视机售卖量,
观看电视日平均用时)
-- 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,
50米,
100米,
200米,
400米,
800米,
1500米,
5000米,
10000米,
赛事)
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,
50米,
100米,
200米,
400米,
800米,
1500米,
5000米,
10000米,
赛事)
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,
50米,
100米,
200米,
400米,
800米,
1500米,
5000米,
10000米,
赛事)
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,
国家,
场上位置,
球队成绩)
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,
国家,
场上位置,
进球数)
CREATE TABLE 运动员欧冠出场次数 (
名次,
出场次数,
运动员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,
名称,
所属国家,
世界500强排名,
出货量,
市场份额)
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,
名称,
所属国家,
世界500强排名,
出货量,
市场份额)
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,
名称,
登陆地点,
登陆时间,
登陆强度,
持续天数,
影响地区数,
死亡人数,
经济损失)
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.
--哪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,
页数,
定价,
出版社,
出版时间,
开本)
-- 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,
页数,
定价,
出版社,
出版时间,
开本)
-- 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,
影片名,
导演,
拍摄国家,
豆瓣评分,
关联行星id)
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 ( * ) 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 火星探测国家 (
探测器,
发射时间,
国家,
结果)
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 学校 (
词条id,
名称,
类型,
所在城市,
所属省份,
是否985院校,
是否211院校,
2016届平均月薪,
2014届平均月薪,
2012届平均月薪)
CREATE TABLE 学校毕业人数 (
学校id,
学历,
2016届人数,
2014届人数,
2012届人数)
CREATE TABLE 专业 (
词条id,
名称,
学科类型,
冷热门)
CREATE TABLE 学校专业 (
专业id,
学校id,
是否重点专业)
CREATE TABLE 专业就业情况 (
专业id,
2016届平均月薪,
2014届平均月薪,
2012届平均月薪,
2016届就业率,
2014届就业率,
2012届就业率)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在2016届,哪个学历总毕业人数最多
SELECT### Response: select 学历 from 学校毕业人数 group by 学历 order by sum ( 2016届人数 ) 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院校,
2016届平均月薪,
2014届平均月薪,
2012届平均月薪)
CREATE TABLE 学校毕业人数 (
学校id,
学历,
2016届人数,
2014届人数,
2012届人数)
CREATE TABLE 专业 (
词条id,
名称,
学科类型,
冷热门)
CREATE TABLE 学校专业 (
专业id,
学校id,
是否重点专业)
CREATE TABLE 专业就业情况 (
专业id,
2016届平均月薪,
2014届平均月薪,
2012届平均月薪,
2016届就业率,
2014届就业率,
2012届就业率)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在2016届,哪个学历在各学校平均毕业人数最多
SELECT### Response: select 学历 from 学校毕业人数 group by 学历 order by avg ( 2016届人数 ) 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 ( * ) 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 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 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,
出发城市,
天数,
成人价格,
儿童价格,
国家数量,
景点数,
门票总价格)
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,
路线名称,
旅行社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 ( * ) 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,
名称,
门店数量,
房屋经纪人数量,
覆盖城市数量,
购房成交总量,
租房成交总量,
成交排名,
评分)
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. |
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,
小区id,
年份,
购房成交量,
成交量占比)
-- 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 河流 (
词条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,
所属河流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 ( * ) 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.
--哪个城市所建的场馆最少
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,
名称,
门店数量,
房屋经纪人数量,
覆盖城市数量,
购房成交总量,
租房成交总量,
成交排名,
评分)
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)
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,
名称,
成立时间,
官方语言,
所属洲id)
CREATE TABLE 高校 (
词条id,
名称,
类型,
所属国家id,
世界软科排名,
泰晤士排名,
QS排名,
USNews排名)
-- 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,
名称,
成立时间,
官方语言,
所属洲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,
书名,
讲述朝代)
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.
--哪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,
颁奖地点)
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,
颁奖地点)
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,
银行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,
合作时间,
是否有电子银行)
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 房龄影响 (
城市,
房龄,
交易占比)
CREATE TABLE 电梯影响 (
城市,
是否带电梯,
平均成交周期,
平均带看次数)
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 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,
名称,
所属国家,
世界500强排名,
出货量,
市场份额)
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 代言明星 (
词条id,
姓名,
性别,
年龄,
所属国家,
职业,
财富排名)
CREATE TABLE 智能手机品牌 (
词条id,
名称,
所属国家,
世界500强排名,
出货量,
市场份额)
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,
城市id,
现存数量)
CREATE TABLE 动物电影 (
词条id,
影片名,
动物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,
城市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,
综艺名称,
制作公司,
平台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,
综艺名称,
制作公司,
平台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,
名称,
起源地,
版本数量,
排名)
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,
菜系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,
菜系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,
名称,
总部所在省,
上级主管部门,
酒店数量,
客房数量,
省排名,
中国500最具价值品牌排名,
全球酒店集团300强排名)
CREATE TABLE 酒店 (
词条id,
名称,
酒店地址,
开业时间,
酒店星级,
所属集团id,
客房数量,
大厅容纳人数)
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.
--哪些城市建立的机场最多,给出前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,
名称,
总部所在省,
上级主管部门,
酒店数量,
客房数量,
省排名,
中国500最具价值品牌排名,
全球酒店集团300强排名)
CREATE TABLE 酒店 (
词条id,
名称,
酒店地址,
开业时间,
酒店星级,
所属集团id,
客房数量,
大厅容纳人数)
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 ( * ) 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 各城市电视机售卖 (
城市,
所属省份,
电视机售卖量,
观看电视日平均用时)
-- Using valid SQLite, answer the following questions for the tables provided above.
--电视机平台售卖的售价平均值最大的平台,电视机平台售卖的售卖量的总和
SELECT### Response: select 平台 , sum ( 售卖量 ) 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,
名称,
产品定位,
屏幕尺寸,
屏幕比例,
分辨率,
背光灯寿命,
定价,
品牌id)
CREATE TABLE 电视机平台售卖 (
型号id,
平台,
售价,
最高价格,
最低价格,
售卖量,
用户评分)
CREATE TABLE 各城市电视机售卖 (
城市,
所属省份,
电视机售卖量,
观看电视日平均用时)
-- Using valid SQLite, answer the following questions for the tables provided above.
--给出电视机平台售卖的售价平均值排名后5的平台,电视机平台售卖的用户评价的平均值
SELECT### Response: select 平台 , avg ( 用户评分 ) 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,
姓名,
性别,
出生地,
专辑数量,
歌曲数量,
演唱会总场次,
粉丝总数,
红粉数量)
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 出生地 , max ( 专辑数量 ) 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,
奖项名称,
提名歌手id,
提名作品)
CREATE TABLE 金曲奖获奖名单 (
奖届id,
奖项名称,
获奖歌手id,
歌手唱片公司)
-- Using valid SQLite, answer the following questions for the tables provided above.
--给出歌手的专辑数量平均值排名前5的出生地,歌手的红粉数量的最大值
SELECT### Response: select 出生地 , max ( 红粉数量 ) 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,
姓名,
性别,
出生地,
专辑数量,
歌曲数量,
演唱会总场次,
粉丝总数,
红粉数量)
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 出生地 , avg ( 红粉数量 ) 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 纪念景点 (
词条id,
名称,
所属城市,
地址,
纪念人物id)
-- Using valid SQLite, answer the following questions for the tables provided above.
--拥有做官的诗人的数量最多的所处年号,做官的诗人的做官时间的最大值
SELECT### Response: select 所处年号 , max ( 做官时间 ) 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 所处年号 , sum ( 做官时间 ) 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.
--拥有做官的诗人的数量最少的所处年号,做官的诗人的做官时间的最小值
SELECT### Response: select 所处年号 , min ( 做官时间 ) 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 2019年房地产企业500强 (
集团id,
总排名,
发展潜力排名,
成长速度排名,
综合发展排名,
创新能力排名)
CREATE TABLE 2019年房地产企业运营100强 (
集团id,
运营效率排名,
区域运营排名,
稳健运营排名,
商业地产运营排名,
社区文化运营排名,
长租公寓运营排名)
CREATE TABLE 房地产各城市排名 (
集团id,
城市,
排名,
销售面积,
销售额)
CREATE TABLE 房产公司典型项目 (
项目名称,
所属集团id,
位于城市,
占地面积,
总户数,
户型面积)
-- Using valid SQLite, answer the following questions for the tables provided above.
--拥有地产集团的数量最少的城市,地产集团的年销售额的最小值
SELECT### Response: select 位于城市 , min ( 年销售额 ) 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 2019年房地产企业500强 (
集团id,
总排名,
发展潜力排名,
成长速度排名,
综合发展排名,
创新能力排名)
CREATE TABLE 2019年房地产企业运营100强 (
集团id,
运营效率排名,
区域运营排名,
稳健运营排名,
商业地产运营排名,
社区文化运营排名,
长租公寓运营排名)
CREATE TABLE 房地产各城市排名 (
集团id,
城市,
排名,
销售面积,
销售额)
CREATE TABLE 房产公司典型项目 (
项目名称,
所属集团id,
位于城市,
占地面积,
总户数,
户型面积)
-- Using valid SQLite, answer the following questions for the tables provided above.
--拥有地产集团的数量最少的城市,地产集团的年销售额的平均值
SELECT### Response: select 位于城市 , avg ( 年销售额 ) 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,
次数)
-- Using valid SQLite, answer the following questions for the tables provided above.
--拥有期刊文献的数量最少的统计平台,期刊文献的出版文献数的最小值
SELECT### Response: select 统计平台 , min ( 出版文献数 ) 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,
次数)
-- Using valid SQLite, answer the following questions for the tables provided above.
--期刊文献的出版文献数平均值最大的统计平台,期刊文献的综合影响因子的最小值
SELECT### Response: select 统计平台 , min ( 综合影响因子 ) 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,
姓名,
职业)
CREATE TABLE 期刊封面人物 (
人物id,
期刊id,
次数)
-- Using valid SQLite, answer the following questions for the tables provided above.
--期刊文献的出版文献数平均值最大的统计平台,期刊文献的综合影响因子的平均值
SELECT### Response: select 统计平台 , avg ( 综合影响因子 ) 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,
姓名,
职业)
CREATE TABLE 期刊封面人物 (
人物id,
期刊id,
次数)
-- Using valid SQLite, answer the following questions for the tables provided above.
--期刊文献的出版文献数总和最大的统计平台,期刊文献的被下载数量的最大值
SELECT### Response: select 统计平台 , max ( 被下载数量 ) 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,
年龄,
皇子数量,
公主数量)
CREATE TABLE 皇帝皇后合葬 (
皇帝id,
皇后id,
葬地)
CREATE TABLE 皇帝皇后影视形象 (
作品,
皇帝id,
皇帝饰演者,
皇后id,
皇后饰演者)
-- Using valid SQLite, answer the following questions for the tables provided above.
--皇帝的子女数量平均值排名前5的所处朝代,皇帝的妃子数量的最小值
SELECT### Response: select 所处朝代 , min ( 妃子数量 ) 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,
谥号,
夫君id,
年龄,
皇子数量,
公主数量)
CREATE TABLE 皇帝皇后合葬 (
皇帝id,
皇后id,
葬地)
CREATE TABLE 皇帝皇后影视形象 (
作品,
皇帝id,
皇帝饰演者,
皇后id,
皇后饰演者)
-- Using valid SQLite, answer the following questions for the tables provided above.
--拥有皇帝的数量最少的所处朝代,皇帝的子女数量的总和
SELECT### Response: select 所处朝代 , sum ( 子女数量 ) 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,
葬地)
CREATE TABLE 皇帝皇后影视形象 (
作品,
皇帝id,
皇帝饰演者,
皇后id,
皇后饰演者)
-- Using valid SQLite, answer the following questions for the tables provided above.
--皇帝子女数量平均值排名前5的所处朝代,皇帝的妃子数量的总和
SELECT### Response: select 所处朝代 , sum ( 妃子数量 ) 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 流动人口年龄 (
年份,
年龄段,
占比)
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.
--拥有人口去向城市的数量最多的城市,人口去向城市的流出人口占比的总和
SELECT### Response: select 城市id , sum ( 流出人口占比 ) from 人口去向城市 group by 城市id 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 流动人口年龄 (
年份,
年龄段,
占比)
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.
--拥有人口去向城市的数量最多的城市,人口去向城市的流出人口占比的平均值
SELECT### Response: select 城市id , avg ( 流出人口占比 ) from 人口去向城市 group by 城市id 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 流动人口年龄 (
年份,
年龄段,
占比)
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.
--拥有人口去向城市的数量最多的城市,人口去向城市的流出人口占比的最小值
SELECT### Response: select 城市id , min ( 流出人口占比 ) from 人口去向城市 group by 城市id 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 中国电力结构及发电量 (
年份,
发电类型,
发电量)
CREATE TABLE 中国电力装机量 (
年份,
发电类型,
新增装机量(MW),
累计装机量(MW))
CREATE TABLE 各省发电量及电力消费量 (
省份,
发电量(亿千瓦小时),
电力消费(亿千瓦小时))
CREATE TABLE 各省生物质发电量 (
省份,
累计并网装机容量(万千瓦),
农林生物质发电量(亿千瓦小时),
生活垃圾焚烧发电量(亿千瓦小时),
沼气发电量(亿千瓦小时))
-- Using valid SQLite, answer the following questions for the tables provided above.
--拥有中国电力结构及发电量的数量最少的发电类型,中国电力结构及发电量的最大值
SELECT### Response: select 发电类型 , max ( 发电量 ) 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 中国电力结构及发电量 (
年份,
发电类型,
发电量)
CREATE TABLE 中国电力装机量 (
年份,
发电类型,
新增装机量(MW),
累计装机量(MW))
CREATE TABLE 各省发电量及电力消费量 (
省份,
发电量(亿千瓦小时),
电力消费(亿千瓦小时))
CREATE TABLE 各省生物质发电量 (
省份,
累计并网装机容量(万千瓦),
农林生物质发电量(亿千瓦小时),
生活垃圾焚烧发电量(亿千瓦小时),
沼气发电量(亿千瓦小时))
-- Using valid SQLite, answer the following questions for the tables provided above.
--拥有中国电力结构及发电量的数量最多的发电类型,中国电力结构及发电量的总和
SELECT### Response: select 发电类型 , sum ( 发电量 ) 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 中国电力结构及发电量 (
年份,
发电类型,
发电量)
CREATE TABLE 中国电力装机量 (
年份,
发电类型,
新增装机量(MW),
累计装机量(MW))
CREATE TABLE 各省发电量及电力消费量 (
省份,
发电量(亿千瓦小时),
电力消费(亿千瓦小时))
CREATE TABLE 各省生物质发电量 (
省份,
累计并网装机容量(万千瓦),
农林生物质发电量(亿千瓦小时),
生活垃圾焚烧发电量(亿千瓦小时),
沼气发电量(亿千瓦小时))
-- Using valid SQLite, answer the following questions for the tables provided above.
--拥有中国电力结构及发电量的数量最少的发电类型,中国电力结构及发电量的最小值
SELECT### Response: select 发电类型 , min ( 发电量 ) 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 平台id , sum ( 配送费 ) from 商家平台活动 group by 平台id 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,
优惠活动,
配送费)
-- Using valid SQLite, answer the following questions for the tables provided above.
--拥有商家平台活动数量最多的平台,商家平台活动的配送费的最大值
SELECT### Response: select 平台id , max ( 配送费 ) from 商家平台活动 group by 平台id 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,
优惠活动,
配送费)
-- Using valid SQLite, answer the following questions for the tables provided above.
--拥有商家平台活动数量最多的平台,商家平台活动的配送费的最小值
SELECT### Response: select 平台id , min ( 配送费 ) from 商家平台活动 group by 平台id 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 法定代表人 , sum ( 注册资本 ) 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 法定代表人 , max ( 注册资本 ) 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 法定代表人 , min ( 注册资本 ) 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.
--拥有品牌的数量最多的法定代表人,品牌的注册资本的平均值
SELECT### Response: select 法定代表人 , avg ( 注册资本 ) from 品牌 group by 法定代表人 order by count ( * ) desc limit 1. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.