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)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个性别的运动员数量不少于5人及其最轻的运动员有多重
SELECT### Response: select 性别 , min ( 体重 ) from 运动员 group by 性别 having count ( * ) >= 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)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个性别的运动员数量大于5人及其平均每个运动员有多重
SELECT### Response: select 性别 , avg ( 体重 ) from 运动员 group by 性别 having count ( * ) > 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.
--哪个部首的汉字少于5个,其汉字最少的笔画是多少
SELECT### Response: select 部首 , min ( 笔画 ) from 汉字 group by 部首 having count ( * ) < 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.
--哪个部首的汉字不少于5个,平均每个汉字笔画是多少
SELECT### Response: select 部首 , avg ( 笔画 ) from 汉字 group by 部首 having count ( * ) >= 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,
实施时间,
分类体系,
最低罚款数,
最高罚款数,
厨余垃圾运输车辆,
有害垃圾运输车辆,
覆盖家庭比例,
志愿者数量)
-- Using valid SQLite, answer the following questions for the tables provided above.
--产出不超过5吨的城市垃圾来源有哪些及其最高总量占比
SELECT### Response: select 来源 , max ( 总量占比 ) from 城市垃圾来源 group by 来源 having avg ( 产出吨数 ) <= 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,
实施时间,
分类体系,
最低罚款数,
最高罚款数,
厨余垃圾运输车辆,
有害垃圾运输车辆,
覆盖家庭比例,
志愿者数量)
-- Using valid SQLite, answer the following questions for the tables provided above.
--不多于5处的城市垃圾来源有哪些,平均每处来源产出垃圾多少
SELECT### Response: select 来源 , avg ( 产出吨数 ) from 城市垃圾来源 group by 来源 having count ( * ) <= 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,
名称,
门店数量,
房屋经纪人数量,
覆盖城市数量,
购房成交总量,
租房成交总量,
成交排名,
评分)
CREATE TABLE 中介成交 (
中介id,
小区id,
年份,
购房成交量,
成交量占比)
-- Using valid SQLite, answer the following questions for the tables provided above.
--北京哪些地区有5个小区,平均每小区有多少栋楼
SELECT### Response: select 所属区域 , avg ( 楼栋数 ) from 北京小区 group by 所属区域 having count ( * ) == 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,
名称,
门店数量,
房屋经纪人数量,
覆盖城市数量,
购房成交总量,
租房成交总量,
成交排名,
评分)
CREATE TABLE 中介成交 (
中介id,
小区id,
年份,
购房成交量,
成交量占比)
-- Using valid SQLite, answer the following questions for the tables provided above.
--北京哪些地区少于500栋楼房总数及其最多有多少户
SELECT### Response: select 所属区域 , max ( 户数 ) from 北京小区 group by 所属区域 having sum ( 楼栋数 ) < 500. |
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.
--多于5个国家受台风影响的国家是哪些,经济损失最多的是多少
SELECT### Response: select 国家 , max ( 经济损失 ) from 台风影响的国家 group by 国家 having count ( * ) > 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,
国家,
经济损失)
-- Using valid SQLite, answer the following questions for the tables provided above.
--少于5个国家受台风影响的国家是哪些,经济损失最多的是多少
SELECT### Response: select 国家 , max ( 经济损失 ) from 台风影响的国家 group by 国家 having count ( * ) < 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,
菜名,
口味,
月销售量,
必点比例)
-- Using valid SQLite, answer the following questions for the tables provided above.
--不多于5个特色菜的饭店的菜名有哪些,其最少月销售量是多少
SELECT### Response: select 菜名 , min ( 月销售量 ) from 特色菜 group by 菜名 having count ( * ) <= 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,
菜名,
口味,
月销售量,
必点比例)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些菜的月总销售量不少于200及其必点比例平均有多少
SELECT### Response: select 菜名 , avg ( 必点比例 ) from 特色菜 group by 菜名 having sum ( 月销售量 ) >= 200. |
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 学部 , avg ( 院士人数 ) from 各学部院士分布 group by 学部 having count ( * ) < 5. |
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.
--院士总人数不超过20人的学部是哪些,院士占比最小是多少
SELECT### Response: select 学部 , min ( 所占比例 ) from 各学部院士分布 group by 学部 having sum ( 院士人数 ) <= 20. |
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.
--月供分布不少于5类的城市有哪些及其最小占比多少
SELECT### Response: select 城市 , min ( 占比 ) from 月供分布 group by 城市 having count ( * ) >= 5. |
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.
--月供分布大于5类的城市有哪些及其平均占比多少
SELECT### Response: select 城市 , avg ( 占比 ) from 月供分布 group by 城市 having count ( * ) > 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,
电影id)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个性别的演员平均年龄不超过20岁,该类演员平均出演电影数是多少
SELECT### Response: select 性别 , avg ( 出演电影数 ) from 演员 group by 性别 having avg ( 年龄 ) <= 20. |
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,
电影id)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个性别的演员平均年龄超过20岁,该类演员出演总电影数是多少
SELECT### Response: select 性别 , sum ( 出演电影数 ) from 演员 group by 性别 having avg ( 年龄 ) > 20. |
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.
--身高总和高于2米的足球运动员国籍是哪里,总体重是多少
SELECT### Response: select 国籍 , sum ( 体重 ) from 足球运动员 group by 国籍 having sum ( 身高 ) > 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,
国家,
场上位置,
进球数)
CREATE TABLE 运动员欧冠出场次数 (
名次,
出场次数,
运动员id,
国家,
场上位置)
-- Using valid SQLite, answer the following questions for the tables provided above.
--身高平均值不低于2米的足球运动员国籍是哪里,总体重是多少
SELECT### Response: select 国籍 , sum ( 体重 ) from 足球运动员 group by 国籍 having avg ( 身高 ) >= 2. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 电影作品 (
词条id,
影片名,
导演,
国家,
提名次数,
获奖次数)
CREATE TABLE 获奖国家名单 (
年份,
影片拍摄国家,
获奖次数)
CREATE TABLE 各演员获奖次数 (
姓名,
奖项,
提名次数,
获奖次数)
CREATE TABLE 历届帝后影后名单 (
年份,
帝后姓名,
帝后来自作品id,
影后姓名,
影后来自作品id)
-- Using valid SQLite, answer the following questions for the tables provided above.
--平均提名获奖次数大于3次的演员有哪些,该演员最少获得过多少次奖
SELECT### Response: select 姓名 , min ( 获奖次数 ) from 各演员获奖次数 group by 姓名 having avg ( 提名次数 ) > 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 电影作品 (
词条id,
影片名,
导演,
国家,
提名次数,
获奖次数)
CREATE TABLE 获奖国家名单 (
年份,
影片拍摄国家,
获奖次数)
CREATE TABLE 各演员获奖次数 (
姓名,
奖项,
提名次数,
获奖次数)
CREATE TABLE 历届帝后影后名单 (
年份,
帝后姓名,
帝后来自作品id,
影后姓名,
影后来自作品id)
-- Using valid SQLite, answer the following questions for the tables provided above.
--总提名获奖次数不高于3次的演员有哪些及其平均获得过多少次奖
SELECT### Response: select 姓名 , avg ( 获奖次数 ) from 各演员获奖次数 group by 姓名 having sum ( 提名次数 ) <= 3. |
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.
--中国电力装机量小于5的发电类型是什么,其最多新增装机量是多少
SELECT### Response: select 发电类型 , max ( 新增装机量(MW) ) from 中国电力装机量 group by 发电类型 having count ( * ) < 5. |
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.
--中国电力新增装机量总和不低于200万的发电类型是什么及其最多累计装机量
SELECT### Response: select 发电类型 , max ( 累计装机量(MW) ) from 中国电力装机量 group by 发电类型 having sum ( 新增装机量(MW) ) >= 2000000. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 城市 (
词条id,
名称,
所属省份,
市区面积)
CREATE TABLE IMAX电影院 (
词条id,
影院名称,
所在城市id,
开业时间,
屏幕宽,
屏幕高,
屏幕面积,
座位数)
CREATE TABLE 影院放映电影数量 (
年份,
影院id,
电影数量,
营收)
-- Using valid SQLite, answer the following questions for the tables provided above.
--有5个城市的省份是哪个及其市区平均面积是多少
SELECT### Response: select 所属省份 , avg ( 市区面积 ) from 城市 group by 所属省份 having count ( * ) == 5. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 城市 (
词条id,
名称,
所属省份,
市区面积)
CREATE TABLE IMAX电影院 (
词条id,
影院名称,
所在城市id,
开业时间,
屏幕宽,
屏幕高,
屏幕面积,
座位数)
CREATE TABLE 影院放映电影数量 (
年份,
影院id,
电影数量,
营收)
-- Using valid SQLite, answer the following questions for the tables provided above.
--少于5个城市的省份是哪个及其市区最少面积是多少
SELECT### Response: select 所属省份 , min ( 市区面积 ) from 城市 group by 所属省份 having count ( * ) < 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,
名称,
所属国家,
世界500强排名,
出货量,
市场份额)
CREATE TABLE 手机代言明星 (
明星id,
品牌id,
开始年份,
代言年数,
代言费,
代言型号数量)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个国家的手机品牌代言明星不少于5人,明星总年龄是多少
SELECT### Response: select 所属国家 , sum ( 年龄 ) from 代言明星 group by 所属国家 having count ( * ) >= 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,
名称,
所属国家,
世界500强排名,
出货量,
市场份额)
CREATE TABLE 手机代言明星 (
明星id,
品牌id,
开始年份,
代言年数,
代言费,
代言型号数量)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个国家的手机品牌代言明星有5人,明星总年龄数
SELECT### Response: select 所属国家 , sum ( 年龄 ) from 代言明星 group by 所属国家 having count ( * ) == 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,
人群,
使用占比)
-- Using valid SQLite, answer the following questions for the tables provided above.
--使用手机有不超过5个型号的人群有哪些,最大使用占比多少
SELECT### Response: select 人群 , max ( 使用占比 ) from 型号使用人群 group by 人群 having count ( * ) <= 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,
人群,
使用占比)
-- Using valid SQLite, answer the following questions for the tables provided above.
--使用手机有不少于5个型号的人群有哪些,最大使用占比多少
SELECT### Response: select 人群 , max ( 使用占比 ) from 型号使用人群 group by 人群 having count ( * ) >= 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,
公司,
赞助级别)
-- Using valid SQLite, answer the following questions for the tables provided above.
--平均历时少于30天的峰会的主办方是哪些,峰会平均报名多少人
SELECT### Response: select 主办单位 , avg ( 报名人数 ) from 峰会 group by 主办单位 having avg ( 历时天数 ) < 30. |
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.
--举办峰会少于5次的主办方有哪些及其最多历时多少天
SELECT### Response: select 主办单位 , max ( 历时天数 ) from 峰会 group by 主办单位 having count ( * ) < 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 奢侈品用户在意维度分布 (
年龄段,
看中维度,
人数占比)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个年龄段的奢侈品用户在意维度不少于5及其平均人数占比
SELECT### Response: select 年龄段 , avg ( 人数占比 ) from 奢侈品用户在意维度分布 group by 年龄段 having count ( * ) >= 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 奢侈品用户在意维度分布 (
年龄段,
看中维度,
人数占比)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个年龄段的奢侈品用户在意维度高于5其人数占比总和
SELECT### Response: select 年龄段 , sum ( 人数占比 ) from 奢侈品用户在意维度分布 group by 年龄段 having count ( * ) > 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.
--哪些城市的菜系总欢迎程度不低于8.5,菜系最高分布密度是多少
SELECT### Response: select 城市 , max ( 分布密度 ) from 菜系分布城市 group by 城市 having sum ( 受欢迎程度 ) >= 8.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.
--哪些城市的菜系总的受欢迎程度高于8.5,菜系分布密度总和
SELECT### Response: select 城市 , sum ( 分布密度 ) from 菜系分布城市 group by 城市 having sum ( 受欢迎程度 ) > 8.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 2018年奖牌榜 (
排名,
国家,
金牌数,
银牌数,
铜牌数,
奖牌总数)
-- Using valid SQLite, answer the following questions for the tables provided above.
--举办过多于5次的城市是哪里,平均参赛国家有多少
SELECT### Response: select 举办城市 , avg ( 参赛国家数量 ) from 冬季奥运会 group by 举办城市 having count ( * ) > 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 2018年奖牌榜 (
排名,
国家,
金牌数,
银牌数,
铜牌数,
奖牌总数)
-- Using valid SQLite, answer the following questions for the tables provided above.
--举办过的冬季运动会参赛国家总数多于100的城市有哪些及其参赛运动员最少有多少
SELECT### Response: select 举办城市 , min ( 参赛运动员数量 ) from 冬季奥运会 group by 举办城市 having sum ( 参赛国家数量 ) > 100. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 书籍 (
词条id,
名称,
作者,
作者国籍,
豆瓣评分,
评价人数,
5星占比,
1星占比)
CREATE TABLE 高分图书榜单 (
年份,
书籍id,
评分,
排名)
CREATE TABLE 最受关注图书榜单 (
年份,
书籍id,
关注数,
排名)
CREATE TABLE 最畅销图书榜单 (
年份,
书籍id,
购买数,
排名)
CREATE TABLE 购买平台 (
书籍id,
平台,
售价,
是否有货)
-- Using valid SQLite, answer the following questions for the tables provided above.
--出版过不多于5本图书的作者是哪些,这些书平均豆瓣评分是多少
SELECT### Response: select 作者 , avg ( 豆瓣评分 ) from 书籍 group by 作者 having count ( * ) <= 5. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 书籍 (
词条id,
名称,
作者,
作者国籍,
豆瓣评分,
评价人数,
5星占比,
1星占比)
CREATE TABLE 高分图书榜单 (
年份,
书籍id,
评分,
排名)
CREATE TABLE 最受关注图书榜单 (
年份,
书籍id,
关注数,
排名)
CREATE TABLE 最畅销图书榜单 (
年份,
书籍id,
购买数,
排名)
CREATE TABLE 购买平台 (
书籍id,
平台,
售价,
是否有货)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些作者出的书豆瓣评分总和不高于89及其平均评论人数有多少
SELECT### Response: select 作者 , avg ( 评价人数 ) from 书籍 group by 作者 having sum ( 豆瓣评分 ) <= 89. |
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.
--城市平均垃圾产出量低于50万吨的省份有哪些,其最少建造了多少垃圾场
SELECT### Response: select 所属省份 , min ( 垃圾场数量 ) from 城市 group by 所属省份 having avg ( 垃圾产出量(万吨) ) < 50. |
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.
--哪个城市学校数少于5所及其毕业总人数是多少
SELECT### Response: select 所在城市 , sum ( 毕业人数 ) from 学校 group by 所在城市 having count ( * ) < 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 公司宣讲会 (
公司id,
学校id,
宣讲时间,
拟招聘人数,
参加笔试人数,
参加面试人数,
实际招聘人数)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个城市学校数不超过5所及其毕业总人数是多少
SELECT### Response: select 所在城市 , sum ( 毕业人数 ) from 学校 group by 所在城市 having count ( * ) <= 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,
发行形式,
收益额,
收益占公司比例)
-- Using valid SQLite, answer the following questions for the tables provided above.
--游戏公司年均收益不低于5亿的国家有哪些及其国家游戏最少有多少
SELECT### Response: select 国家 , min ( 游戏数量 ) from 游戏公司 group by 国家 having avg ( 年收益 ) >= 500000000. |
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.
--哪个国家的游戏公司正好5家及其年平均收益有多少
SELECT### Response: select 国家 , avg ( 年收益 ) from 游戏公司 group by 国家 having count ( * ) == 5. |
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)
CREATE TABLE 笔记本型号系列 (
词条id,
名称,
屏幕尺寸,
分辨率,
内存容量,
硬盘容量,
CPU主频,
CPU型号,
售价,
上市时间,
产品id)
CREATE TABLE 笔记本型号平台售卖 (
型号id,
平台,
售卖量,
评分,
最好评价,
最差评价)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个平台的笔记本售卖量不多于5台,平台总评分多少
SELECT### Response: select 平台 , sum ( 评分 ) from 笔记本型号平台售卖 group by 平台 having count ( * ) <= 5. |
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)
CREATE TABLE 笔记本型号系列 (
词条id,
名称,
屏幕尺寸,
分辨率,
内存容量,
硬盘容量,
CPU主频,
CPU型号,
售价,
上市时间,
产品id)
CREATE TABLE 笔记本型号平台售卖 (
型号id,
平台,
售卖量,
评分,
最好评价,
最差评价)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个平台的笔记本售卖量少于5台,平台总评分多少
SELECT### Response: select 平台 , sum ( 评分 ) from 笔记本型号平台售卖 group by 平台 having count ( * ) < 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 商家交易额 (
商家id,
电商平台id,
上线品类数量,
促销品类数量,
平均折扣,
交易额,
占全年销售额比例)
CREATE TABLE 电商活动交易额 (
电商平台id,
活动日,
参加活动商家数量,
促销商品数量,
交易额)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些商家网点覆盖国家平均实体店大于2万家,这些国家平均每年营业额是多少
SELECT### Response: select 国家 , avg ( 年平均营业额 ) from 商家网点覆盖国家 group by 国家 having avg ( 实体店数量 ) > 20000. |
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.
--诗人年龄不超过50岁的朝代有哪些及其诗人平均有多少作品
SELECT### Response: select 所处朝代 , avg ( 作品数量 ) from 诗人 group by 所处朝代 having sum ( 年龄 ) <= 50. |
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.
--哪些朝代的诗人超过5人,其最小年龄是多少
SELECT### Response: select 所处朝代 , min ( 年龄 ) from 诗人 group by 所处朝代 having count ( * ) > 5. |
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.
--哪些类型的酒店活动费用不低于5万元,每场活动平均有多少人参加
SELECT### Response: select 活动类型 , avg ( 人数规模 ) from 酒店活动费用 group by 活动类型 having count ( * ) >= 5. |
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.
--哪些酒店活动类型的人数总规模不超过2万人及其平均活动费用有多少
SELECT### Response: select 活动类型 , avg ( 费用 ) from 酒店活动费用 group by 活动类型 having sum ( 人数规模 ) <= 20000. |
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,
会员性别,
25~30岁会员数量,
31~35岁会员数量,
36~40岁会员数量,
41~45岁会员数量,
45~55岁会员数量)
CREATE TABLE 会员城市分布 (
软件id,
会员性别,
城市,
会员数量,
成功率)
-- Using valid SQLite, answer the following questions for the tables provided above.
--相亲软件会费不超过5万的会员类型是什么及其最多会费是多少
SELECT### Response: select 会员类型 , max ( 会费 ) from 相亲软件会费 group by 会员类型 having count ( * ) <= 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,
会员性别,
25~30岁会员数量,
31~35岁会员数量,
36~40岁会员数量,
41~45岁会员数量,
45~55岁会员数量)
CREATE TABLE 会员城市分布 (
软件id,
会员性别,
城市,
会员数量,
成功率)
-- Using valid SQLite, answer the following questions for the tables provided above.
--相亲软件会费是5万的会员类型是什么及其平均每人会费多少
SELECT### Response: select 会员类型 , avg ( 会费 ) from 相亲软件会费 group by 会员类型 having count ( * ) == 5. |
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届学校平均毕业人数不超过2万人,2014届毕业最多是多少人
SELECT### Response: select 学历 , max ( 2014届人数 ) from 学校毕业人数 group by 学历 having avg ( 2016届人数 ) <= 20000. |
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.
--哪个学历学校毕业人数少于5万,2016届毕业人数一共是多少
SELECT### Response: select 学历 , sum ( 2016届人数 ) from 学校毕业人数 group by 学历 having count ( * ) < 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,
成立年份,
员工数量)
-- Using valid SQLite, answer the following questions for the tables provided above.
--联合实验室平均合作超过10年的方向是什么及其论文总产量多少
SELECT### Response: select 联合方向 , sum ( 论文产出数量 ) from 联合实验室 group by 联合方向 having avg ( 合作年数 ) > 10. |
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.
--哪个联合方向的实验室不少于5个,这些联合实验室中合作时间最长的是多少
SELECT### Response: select 联合方向 , max ( 合作年数 ) from 联合实验室 group by 联合方向 having count ( * ) >= 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,
会员性别,
25~30岁会员数量,
31~35岁会员数量,
36~40岁会员数量,
41~45岁会员数量,
45~55岁会员数量)
CREATE TABLE 会员城市分布 (
软件id,
会员性别,
城市,
会员数量,
成功率)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些性别的会员分布在超过5个城市,平均每个城市有多少会员
SELECT### Response: select 会员性别 , avg ( 会员数量 ) from 会员城市分布 group by 会员性别 having count ( * ) > 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,
会员性别,
25~30岁会员数量,
31~35岁会员数量,
36~40岁会员数量,
41~45岁会员数量,
45~55岁会员数量)
CREATE TABLE 会员城市分布 (
软件id,
会员性别,
城市,
会员数量,
成功率)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些性别的会员分布在不少于5个城市,其中城市会员最少有多少
SELECT### Response: select 会员性别 , min ( 会员数量 ) from 会员城市分布 group by 会员性别 having count ( * ) >= 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 公司宣讲会 (
公司id,
学校id,
宣讲时间,
拟招聘人数,
参加笔试人数,
参加面试人数,
实际招聘人数)
-- Using valid SQLite, answer the following questions for the tables provided above.
--公司对口不少于5个专业,这些专业有哪些及其平均没专业拟招聘多少人
SELECT### Response: select 专业 , avg ( 拟招聘人数 ) from 公司对口专业 group by 专业 having count ( * ) >= 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 公司宣讲会 (
公司id,
学校id,
宣讲时间,
拟招聘人数,
参加笔试人数,
参加面试人数,
实际招聘人数)
-- Using valid SQLite, answer the following questions for the tables provided above.
--公司拟招聘总人数不少于500人,招聘专业有哪些及其总基本工资是多少
SELECT### Response: select 专业 , sum ( 基本工资 ) from 公司对口专业 group by 专业 having sum ( 拟招聘人数 ) >= 500. |
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.
--中国被台风影视不少于5个省份,这些省份有哪些及其总的登陆强度有多少
SELECT### Response: select 省份 , sum ( 登陆强度 ) from 台风影响的中国省份 group by 省份 having count ( * ) < 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,
国家,
经济损失)
-- Using valid SQLite, answer the following questions for the tables provided above.
--中国被台风影视超过5个省份,这些省份有哪些及其最高登陆强度是多少
SELECT### Response: select 省份 , max ( 登陆强度 ) from 台风影响的中国省份 group by 省份 having count ( * ) > 5. |
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.
--电梯影响平均带看5次的城市有哪些及其平均成交周期是多少
SELECT### Response: select 城市 , avg ( 平均成交周期 ) from 电梯影响 group by 城市 having count ( * ) == 5. |
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.
--电梯影响平均带看超过5次的城市有哪些及其最多成交周期是多少
SELECT### Response: select 城市 , max ( 平均成交周期 ) from 电梯影响 group by 城市 having count ( * ) > 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.
--哪些省的城市平均餐饮收入不低于200万及其同比增长多少
SELECT### Response: select 所属省份 , sum ( 同比增长 ) from 城市 group by 所属省份 having avg ( 餐饮收入 ) >= 2000000. |
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.
--哪些省的城市平均餐饮收入低于200万及其同比最大增长多少
SELECT### Response: select 所属省份 , max ( 同比增长 ) from 城市 group by 所属省份 having avg ( 餐饮收入 ) < 2000000. |
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.
--哪种类型的电视剧不少于5集及其最少有多少集
SELECT### Response: select 类型 , min ( 集数 ) from 电视剧 group by 类型 having count ( * ) >= 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 历届获奖演职员名单 (
年份,
届数,
电视剧奖id,
具体奖项,
获奖人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 类型 having count ( * ) == 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,
场上位置,
球衣号码,
是否主力)
CREATE TABLE 运动员转会 (
运动员id,
俱乐部id,
加入日期,
服役时间,
号码,
薪资)
CREATE TABLE 教练 (
词条id,
中文名,
国籍,
毕业院校,
执教时长,
年薪)
CREATE TABLE 俱乐部教练 (
教练id,
俱乐部id,
加入日期,
身份)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个国家的篮球运动员平均身高高于2.5米,运动员体重最轻的是多少
SELECT### Response: select 国籍 , min ( 体重 ) from 篮球运动员 group by 国籍 having avg ( 身高 ) > 2.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,
场上位置,
球衣号码,
是否主力)
CREATE TABLE 运动员转会 (
运动员id,
俱乐部id,
加入日期,
服役时间,
号码,
薪资)
CREATE TABLE 教练 (
词条id,
中文名,
国籍,
毕业院校,
执教时长,
年薪)
CREATE TABLE 俱乐部教练 (
教练id,
俱乐部id,
加入日期,
身份)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个国家的篮球运动员平均身高不低于2.5米,运动员体重最轻的是多少
SELECT### Response: select 国籍 , min ( 体重 ) from 篮球运动员 group by 国籍 having avg ( 身高 ) >= 2.5. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 滴滴打车出行 (
季节,
是否工作日,
温度,
湿度,
风速,
日订单数量,
人均打车次数,
平均等待时间)
CREATE TABLE 共享单车出行 (
季节,
是否工作日,
温度,
湿度,
风速,
人均骑车次数,
人均骑车距离)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个季节的平均温度不超15摄氏度,这个季度共享单车出行中人均骑车次数是多少
SELECT### Response: select 季节 , avg ( 人均骑车次数 ) from 共享单车出行 group by 季节 having avg ( 温度 ) <= 15. |
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.
--互联网企业公司多于5家的创始人有哪些及其最少年营业额是多少
SELECT### Response: select 创始人 , min ( 年营业额 ) from 公司 group by 创始人 having count ( * ) > 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,
营收,
利润,
营收同比增长,
利润同比增长)
CREATE TABLE 公司各品牌收入排名 (
公司id,
品牌id,
营收占比,
利润占比,
支出占比)
-- Using valid SQLite, answer the following questions for the tables provided above.
--互联网企业公司少于5家的创始人有哪些及其最少年营业额是多少
SELECT### Response: select 创始人 , min ( 年营业额 ) from 公司 group by 创始人 having count ( * ) < 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,
国家,
经济损失)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些登录地点的台风平均登陆强度不大于10,其中平均经济损失是多少
SELECT### Response: select 登陆地点 , avg ( 经济损失 ) from 台风 group by 登陆地点 having avg ( 登陆强度 ) <= 10. |
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.
--哪些登录地点的台风登陆总强度大于10,其中平均死亡人数是多少
SELECT### Response: select 登陆地点 , avg ( 死亡人数 ) from 台风 group by 登陆地点 having sum ( 登陆强度 ) > 10. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 各省中小学假期 (
省份,
年级,
寒假天数,
暑假天数)
CREATE TABLE 大学假期 (
学校,
所属省份,
寒假天数,
暑假天数)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些省份的大学平均寒假天数小于30,其中暑假天数最少的是多少
SELECT### Response: select 所属省份 , min ( 暑假天数 ) from 大学假期 group by 所属省份 having avg ( 寒假天数 ) < 30. |
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.
--哪些城市的海外研究重心数量为5,其员工数量最多的是多少
SELECT### Response: select 所在城市 , max ( 员工数量 ) from 海外研究中心 group by 所在城市 having count ( * ) == 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,
成立年份,
员工数量)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些城市的海外研究重心数量不小于5,其员工数量总和是多少
SELECT### Response: select 所在城市 , sum ( 员工数量 ) from 海外研究中心 group by 所在城市 having count ( * ) >= 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 商家交易额 (
商家id,
电商平台id,
上线品类数量,
促销品类数量,
平均折扣,
交易额,
占全年销售额比例)
CREATE TABLE 电商活动交易额 (
电商平台id,
活动日,
参加活动商家数量,
促销商品数量,
交易额)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些公司的电商数小于5,其最大影响力指数是多少
SELECT### Response: select 所属公司 , max ( 影响力指数 ) from 电商 group by 所属公司 having count ( * ) < 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 商家交易额 (
商家id,
电商平台id,
上线品类数量,
促销品类数量,
平均折扣,
交易额,
占全年销售额比例)
CREATE TABLE 电商活动交易额 (
电商平台id,
活动日,
参加活动商家数量,
促销商品数量,
交易额)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些公司的电商数为5,其最大影响力指数是多少
SELECT### Response: select 所属公司 , max ( 影响力指数 ) from 电商 group by 所属公司 having count ( * ) == 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,
国家,
旅行天数,
景点数量)
CREATE TABLE 国内游路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
预售价格,
参团价格,
起团人数,
个人价格,
景点数)
CREATE TABLE 邮轮路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
内舱房价格,
海景房价格,
阳台房价格,
航行区域,
邮轮公司)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些城市出发的邮轮路线的内舱房总价不小于1000,其最大阳台房价格是多少
SELECT### Response: select 出发城市 , max ( 阳台房价格 ) from 邮轮路线 group by 出发城市 having sum ( 内舱房价格 ) >= 1000. |
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.
--哪些城市出发的邮轮路线的内舱房总价格小于1000,其海景房总价格是多少
SELECT### Response: select 出发城市 , sum ( 海景房价格 ) from 邮轮路线 group by 出发城市 having sum ( 内舱房价格 ) < 1000. |
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.
--哪些球队参加欧冠赛事的出场次数大于5及平均出场次数是多少
SELECT### Response: select 所属球队 , avg ( 出场次数 ) from 欧冠赛事 group by 所属球队 having count ( * ) > 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 运动员欧冠出场次数 (
名次,
出场次数,
运动员id,
国家,
场上位置)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些球队参加欧冠赛事的出场总次数不大于10及进球次数最小的球队进球次数是多少
SELECT### Response: select 所属球队 , min ( 进球次数 ) from 欧冠赛事 group by 所属球队 having sum ( 出场次数 ) <= 10. |
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.
--哪些赛事类型的运动项目奖牌数大于5及其最大小项目总数为多少
SELECT### Response: select 赛事类型 , max ( 小项目总数 ) from 运动项目奖牌数 group by 赛事类型 having count ( * ) > 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,
赛事类型,
小项目总数,
奖牌总数)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪些赛事类型的运动项目奖牌数不超5及其最大小项目总数为多少
SELECT### Response: select 赛事类型 , max ( 小项目总数 ) from 运动项目奖牌数 group by 赛事类型 having count ( * ) <= 5. |
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.
--评价者来自哪些各省市容高评分不超60的省份,这些省份的市民素质评分总和是多少
SELECT### Response: select 评价者来自区域 , sum ( 市民素质评分 ) from 各省市容评分 group by 评价者来自区域 having avg ( 市容评分 ) <= 60. |
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.
--评价者来自哪些各省市容高评分大于5的的省份,这些省份的市容评分总分和是多少
SELECT### Response: select 评价者来自区域 , sum ( 市容评分 ) from 各省市容评分 group by 评价者来自区域 having count ( * ) > 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,
铜牌获得者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 性别 having count ( * ) < 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,
铜牌获得者id)
CREATE TABLE 球员夺冠次数 (
球员id,
赛事id,
冠军次数,
亚军次数,
季军次数)
-- Using valid SQLite, answer the following questions for the tables provided above.
--哪个性别的羽毛球球员数量少于5个,其中这些球员的平均身高有多少
SELECT### Response: select 性别 , avg ( 身高 ) from 羽毛球球员 group by 性别 having count ( * ) < 5. |
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.
--有哪些区域其评价者评价了多于5个省份,或者给出的各省美女平均比例不低于30%
SELECT### Response: select 评价者来自区域 from 各省美女比例 group by 评价者来自区域 having count ( * ) > 5 or avg ( 美女比例 ) >= 0.3. |
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.
--有哪些区域其评价者给出的各省美女平均比例为30%,或者对各省美女颜值平均分不高于4.8分
SELECT### Response: select 评价者来自区域 from 各省美女比例 group by 评价者来自区域 having avg ( 美女比例 ) == 0.3 or avg ( 美女平均颜值分数 ) <= 4.8. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 滴滴打车出行 (
季节,
是否工作日,
温度,
湿度,
风速,
日订单数量,
人均打车次数,
平均等待时间)
CREATE TABLE 共享单车出行 (
季节,
是否工作日,
温度,
湿度,
风速,
人均骑车次数,
人均骑车距离)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在滴滴打车出行中,哪些季节平均温度不低于25度,或者平均每日高于1000单
SELECT### Response: select 季节 from 滴滴打车出行 group by 季节 having avg ( 温度 ) >= 25 or avg ( 日订单数量 ) > 1000. |
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.
--哪些城市出发的出境游路线中,成人平均价格不高于4500元,或者门票平均总价格低于1000元
SELECT### Response: select 出发城市 from 出境游路线 group by 出发城市 having avg ( 成人价格 ) <= 4500 or avg ( 门票总价格 ) < 1000. |
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.
--有哪些股东公司其投资超过5家基金公司数量,或者平均出资比例高于10%
SELECT### Response: select 股东公司 from 基金公司的股东公司 group by 股东公司 having avg ( 出资比例 ) > 0.1 or count ( * ) > 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,
资产规模,
利润合计,
管理费合计)
-- Using valid SQLite, answer the following questions for the tables provided above.
--有哪些股东公司其投资超过5家基金公司数量,或者平均出资比例低于10%
SELECT### Response: select 股东公司 from 基金公司的股东公司 group by 股东公司 having avg ( 出资比例 ) < 0.1 or count ( * ) >= 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 劳伦斯获奖国家名单 (
国家,
获奖人性别,
获奖人数,
所占比例)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在劳伦斯获奖名单中,哪些国家的平均获奖人数为35,或者平均所占比例高于40%
SELECT### Response: select 国家 from 劳伦斯获奖国家名单 group by 国家 having avg ( 获奖人数 ) == 35 or avg ( 所占比例 ) > 0.4. |
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.
--在劳伦斯获奖名单中,哪些国家的平均获奖人数为35,或者所占总比例高于70%
SELECT### Response: select 国家 from 劳伦斯获奖国家名单 group by 国家 having avg ( 获奖人数 ) == 35 or sum ( 所占比例 ) > 0.7. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.