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,
名称,
创始人,
所属国家,
世界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.
--平台都卖哪些笔记本,它们的CPU是什么型号的,并给出评分平均是多少
SELECT### Response: select T2.CPU型号 , T2.名称 , avg ( T1.评分 ) from 笔记本型号平台售卖 as T1 join 笔记本型号系列 as T2 on 笔记本型号平台售卖.型号id == 笔记本型号系列.词条id group by T1.型号id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 汽车公司 (
词条id,
名称,
所属国家,
经营范围,
母公司,
主要车系数量,
世界500强排名,
主要荣誉)
CREATE TABLE 汽车公司中国事业部 (
公司id,
中国事业部名称,
位于城市,
所属省份,
总投资金额,
负责产品数量,
主要产品)
CREATE TABLE 汽车产品 (
词条id,
名称,
推出时间,
车型,
车款数量,
保值率,
生产公司id)
CREATE TABLE 车型 (
词条id,
名称,
排量,
油耗,
售价,
所属产品id,
关注指数,
累计销量,
安全排行,
性能排行,
油耗排行,
空间排行,
舒适排行)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各公司生产的产品中,都有哪些汽车公司,它们都属于哪个国家,并给出车的数量一共有多少
SELECT### Response: select T2.所属国家 , T2.名称 , sum ( T1.车款数量 ) from 汽车产品 as T1 join 汽车公司 as T2 on 汽车产品.生产公司id == 汽车公司.词条id group by T1.生产公司id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 汽车公司 (
词条id,
名称,
所属国家,
经营范围,
母公司,
主要车系数量,
世界500强排名,
主要荣誉)
CREATE TABLE 汽车公司中国事业部 (
公司id,
中国事业部名称,
位于城市,
所属省份,
总投资金额,
负责产品数量,
主要产品)
CREATE TABLE 汽车产品 (
词条id,
名称,
推出时间,
车型,
车款数量,
保值率,
生产公司id)
CREATE TABLE 车型 (
词条id,
名称,
排量,
油耗,
售价,
所属产品id,
关注指数,
累计销量,
安全排行,
性能排行,
油耗排行,
空间排行,
舒适排行)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各公司生产的产品中,都有哪些汽车公司,它们都属于哪个国家,并给出车的数量最多有多少
SELECT### Response: select T2.所属国家 , T2.名称 , max ( T1.车款数量 ) from 汽车产品 as T1 join 汽车公司 as T2 on 汽车产品.生产公司id == 汽车公司.词条id group by T1.生产公司id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 汽车公司 (
词条id,
名称,
所属国家,
经营范围,
母公司,
主要车系数量,
世界500强排名,
主要荣誉)
CREATE TABLE 汽车公司中国事业部 (
公司id,
中国事业部名称,
位于城市,
所属省份,
总投资金额,
负责产品数量,
主要产品)
CREATE TABLE 汽车产品 (
词条id,
名称,
推出时间,
车型,
车款数量,
保值率,
生产公司id)
CREATE TABLE 车型 (
词条id,
名称,
排量,
油耗,
售价,
所属产品id,
关注指数,
累计销量,
安全排行,
性能排行,
油耗排行,
空间排行,
舒适排行)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各公司生产的产品中,都有哪些汽车公司,它们都属于哪个国家,并给出车的数量最少有多少
SELECT### Response: select T2.所属国家 , T2.名称 , min ( T1.车款数量 ) from 汽车产品 as T1 join 汽车公司 as T2 on 汽车产品.生产公司id == 汽车公司.词条id group by T1.生产公司id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 汽车公司 (
词条id,
名称,
所属国家,
经营范围,
母公司,
主要车系数量,
世界500强排名,
主要荣誉)
CREATE TABLE 汽车公司中国事业部 (
公司id,
中国事业部名称,
位于城市,
所属省份,
总投资金额,
负责产品数量,
主要产品)
CREATE TABLE 汽车产品 (
词条id,
名称,
推出时间,
车型,
车款数量,
保值率,
生产公司id)
CREATE TABLE 车型 (
词条id,
名称,
排量,
油耗,
售价,
所属产品id,
关注指数,
累计销量,
安全排行,
性能排行,
油耗排行,
空间排行,
舒适排行)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各公司生产的产品中,都有哪些汽车公司,它们都属于哪个国家,并给出车的数量平均有多少
SELECT### Response: select T2.所属国家 , T2.名称 , avg ( T1.车款数量 ) from 汽车产品 as T1 join 汽车公司 as T2 on 汽车产品.生产公司id == 汽车公司.词条id group by T1.生产公司id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 水果 (
词条id,
名称,
特性,
适合季节,
每100克热量,
每100克水分)
CREATE TABLE 省份 (
词条id,
名称,
气候,
所属区域)
CREATE TABLE 水果产地 (
水果id,
省份id,
是否特产,
年平均产量,
销售形式)
CREATE TABLE 水果销售城市 (
水果id,
原产省份id,
销往省份id,
年销售量)
-- Using valid SQLite, answer the following questions for the tables provided above.
--水果的原产地都有哪些水果,它们是什么特性的,并给出总共有多少年平均产量
SELECT### Response: select T2.特性 , T2.名称 , sum ( T1.年平均产量 ) from 水果产地 as T1 join 水果 as T2 on 水果产地.水果id == 水果.词条id group by T1.水果id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 水果 (
词条id,
名称,
特性,
适合季节,
每100克热量,
每100克水分)
CREATE TABLE 省份 (
词条id,
名称,
气候,
所属区域)
CREATE TABLE 水果产地 (
水果id,
省份id,
是否特产,
年平均产量,
销售形式)
CREATE TABLE 水果销售城市 (
水果id,
原产省份id,
销往省份id,
年销售量)
-- Using valid SQLite, answer the following questions for the tables provided above.
--水果的原产地都有哪些水果,它们是什么特性的,并给出最多有多少年平均产量
SELECT### Response: select T2.特性 , T2.名称 , max ( T1.年平均产量 ) from 水果产地 as T1 join 水果 as T2 on 水果产地.水果id == 水果.词条id group by T1.水果id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 水果 (
词条id,
名称,
特性,
适合季节,
每100克热量,
每100克水分)
CREATE TABLE 省份 (
词条id,
名称,
气候,
所属区域)
CREATE TABLE 水果产地 (
水果id,
省份id,
是否特产,
年平均产量,
销售形式)
CREATE TABLE 水果销售城市 (
水果id,
原产省份id,
销往省份id,
年销售量)
-- Using valid SQLite, answer the following questions for the tables provided above.
--水果的原产地都有哪些水果,它们是什么特性的,并给出平均有多少年平均产量
SELECT### Response: select T2.特性 , T2.名称 , avg ( T1.年平均产量 ) from 水果产地 as T1 join 水果 as T2 on 水果产地.水果id == 水果.词条id group by T1.水果id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 水果 (
词条id,
名称,
特性,
适合季节,
每100克热量,
每100克水分)
CREATE TABLE 省份 (
词条id,
名称,
气候,
所属区域)
CREATE TABLE 水果产地 (
水果id,
省份id,
是否特产,
年平均产量,
销售形式)
CREATE TABLE 水果销售城市 (
水果id,
原产省份id,
销往省份id,
年销售量)
-- Using valid SQLite, answer the following questions for the tables provided above.
--水果的原产地都有哪些水果,它们是什么特性的,并给出最少有多少年平均产量
SELECT### Response: select T2.特性 , T2.名称 , min ( T1.年平均产量 ) from 水果产地 as T1 join 水果 as T2 on 水果产地.水果id == 水果.词条id group by T1.水果id. |
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 T2.总部地点 , T2.名称 , avg ( T1.建成数量 ) from 银行服务网点 as T1 join 银行总部 as T2 on 银行服务网点.银行id == 银行总部.词条id group by T1.银行id. |
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 T2.总部地点 , T2.名称 , sum ( T1.建成数量 ) from 银行服务网点 as T1 join 银行总部 as T2 on 银行服务网点.银行id == 银行总部.词条id group by T1.银行id. |
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 T2.总部地点 , T2.名称 , min ( T1.建成数量 ) from 银行服务网点 as T1 join 银行总部 as T2 on 银行服务网点.银行id == 银行总部.词条id group by T1.银行id. |
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 T2.总部地点 , T2.名称 , max ( T1.建成数量 ) from 银行服务网点 as T1 join 银行总部 as T2 on 银行服务网点.银行id == 银行总部.词条id group by T1.银行id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 城市 (
词条id,
城市,
所属省份,
城市人口,
城市面积,
汽车保有量级别(辆),
通勤高峰拥堵指数,
通勤高峰实际速度(千米/时),
拥堵排名)
CREATE TABLE 全国交通枢纽 (
词条id,
交通枢纽站,
所属城市id,
所属省份,
平均拥堵指数,
周边路网平均速度(千米/时),
拥堵排名)
CREATE TABLE 旅游景点 (
词条id,
景点名称,
所属城市id,
平均拥堵指数,
周边路网平均速度(千米/时),
拥堵排名)
CREATE TABLE 全国热门景点 (
景点id,
日均接待游客数量,
日均外省游客数量,
热度排名)
CREATE TABLE 热门出境游城市 (
城市,
所在国家,
国内游客数量,
排名)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各城市的交通枢纽中,都有哪些城市,它们都属于哪个省,并计算各个枢纽的平均拥堵指数平均下来是多少
SELECT### Response: select T2.所属省份 , T2.城市 , avg ( T1.平均拥堵指数 ) from 全国交通枢纽 as T1 join 城市 as T2 on 全国交通枢纽.所属城市id == 城市.词条id group by T1.所属城市id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 城市 (
词条id,
城市,
所属省份,
城市人口,
城市面积,
汽车保有量级别(辆),
通勤高峰拥堵指数,
通勤高峰实际速度(千米/时),
拥堵排名)
CREATE TABLE 全国交通枢纽 (
词条id,
交通枢纽站,
所属城市id,
所属省份,
平均拥堵指数,
周边路网平均速度(千米/时),
拥堵排名)
CREATE TABLE 旅游景点 (
词条id,
景点名称,
所属城市id,
平均拥堵指数,
周边路网平均速度(千米/时),
拥堵排名)
CREATE TABLE 全国热门景点 (
景点id,
日均接待游客数量,
日均外省游客数量,
热度排名)
CREATE TABLE 热门出境游城市 (
城市,
所在国家,
国内游客数量,
排名)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各城市的交通枢纽中,都有哪些城市,它们都属于哪个省,并计算各个枢纽的平均拥堵指数加起来总共有多少
SELECT### Response: select T2.所属省份 , T2.城市 , sum ( T1.平均拥堵指数 ) from 全国交通枢纽 as T1 join 城市 as T2 on 全国交通枢纽.所属城市id == 城市.词条id group by T1.所属城市id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 城市 (
词条id,
城市,
所属省份,
城市人口,
城市面积,
汽车保有量级别(辆),
通勤高峰拥堵指数,
通勤高峰实际速度(千米/时),
拥堵排名)
CREATE TABLE 全国交通枢纽 (
词条id,
交通枢纽站,
所属城市id,
所属省份,
平均拥堵指数,
周边路网平均速度(千米/时),
拥堵排名)
CREATE TABLE 旅游景点 (
词条id,
景点名称,
所属城市id,
平均拥堵指数,
周边路网平均速度(千米/时),
拥堵排名)
CREATE TABLE 全国热门景点 (
景点id,
日均接待游客数量,
日均外省游客数量,
热度排名)
CREATE TABLE 热门出境游城市 (
城市,
所在国家,
国内游客数量,
排名)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各城市的交通枢纽中,都有哪些城市,它们都属于哪个省,并给出各个枢纽的平均拥堵指数中最多的那个是多少
SELECT### Response: select T2.所属省份 , T2.城市 , max ( T1.平均拥堵指数 ) from 全国交通枢纽 as T1 join 城市 as T2 on 全国交通枢纽.所属城市id == 城市.词条id group by T1.所属城市id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 城市 (
词条id,
城市,
所属省份,
城市人口,
城市面积,
汽车保有量级别(辆),
通勤高峰拥堵指数,
通勤高峰实际速度(千米/时),
拥堵排名)
CREATE TABLE 全国交通枢纽 (
词条id,
交通枢纽站,
所属城市id,
所属省份,
平均拥堵指数,
周边路网平均速度(千米/时),
拥堵排名)
CREATE TABLE 旅游景点 (
词条id,
景点名称,
所属城市id,
平均拥堵指数,
周边路网平均速度(千米/时),
拥堵排名)
CREATE TABLE 全国热门景点 (
景点id,
日均接待游客数量,
日均外省游客数量,
热度排名)
CREATE TABLE 热门出境游城市 (
城市,
所在国家,
国内游客数量,
排名)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各城市的交通枢纽中,都有哪些城市,它们都属于哪个省,并给出各个枢纽的平均拥堵指数中最少的那个是多少
SELECT### Response: select T2.所属省份 , T2.城市 , min ( T1.平均拥堵指数 ) from 全国交通枢纽 as T1 join 城市 as T2 on 全国交通枢纽.所属城市id == 城市.词条id group by T1.所属城市id. |
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 T2.所属城市 , T2.名称 , min ( T1.距离 ) from 酒店距离机场路程 as T1 join 机场 as T2 on 酒店距离机场路程.机场id == 机场.词条id group by T1.机场id. |
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 T2.所属城市 , T2.名称 , avg ( T1.距离 ) from 酒店距离机场路程 as T1 join 机场 as T2 on 酒店距离机场路程.机场id == 机场.词条id group by T1.机场id. |
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 T2.所属城市 , T2.名称 , sum ( T1.距离 ) from 酒店距离机场路程 as T1 join 机场 as T2 on 酒店距离机场路程.机场id == 机场.词条id group by T1.机场id. |
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 T2.所属城市 , T2.名称 , max ( T1.距离 ) from 酒店距离机场路程 as T1 join 机场 as T2 on 酒店距离机场路程.机场id == 机场.词条id group by T1.机场id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 旅行社 (
词条id,
名称,
级别,
出境游国家数量,
国内游城市数量,
出境游路线数量,
国内游路线数量,
亚洲排名,
接待海外游客数量,
境外公司数量,
控股子公司数量,
有业务关系的旅行商数量,
免税店数量)
CREATE TABLE 出境游路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
成人价格,
儿童价格,
国家数量,
景点数,
门票总价格)
CREATE TABLE 出境游所含国家 (
路线id,
国家,
旅行天数,
景点数量)
CREATE TABLE 国内游路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
预售价格,
参团价格,
起团人数,
个人价格,
景点数)
CREATE TABLE 邮轮路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
内舱房价格,
海景房价格,
阳台房价格,
航行区域,
邮轮公司)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各旅行社的出境游路线中,都有哪些旅行社,它们都是什么级别的,并给出成人最低多少钱
SELECT### Response: select T2.级别 , T2.名称 , min ( T1.成人价格 ) from 出境游路线 as T1 join 旅行社 as T2 on 出境游路线.旅行社id == 旅行社.词条id group by T1.旅行社id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 旅行社 (
词条id,
名称,
级别,
出境游国家数量,
国内游城市数量,
出境游路线数量,
国内游路线数量,
亚洲排名,
接待海外游客数量,
境外公司数量,
控股子公司数量,
有业务关系的旅行商数量,
免税店数量)
CREATE TABLE 出境游路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
成人价格,
儿童价格,
国家数量,
景点数,
门票总价格)
CREATE TABLE 出境游所含国家 (
路线id,
国家,
旅行天数,
景点数量)
CREATE TABLE 国内游路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
预售价格,
参团价格,
起团人数,
个人价格,
景点数)
CREATE TABLE 邮轮路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
内舱房价格,
海景房价格,
阳台房价格,
航行区域,
邮轮公司)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各旅行社的出境游路线中,都有哪些旅行社,它们都是什么级别的,并给出成人总共多少钱
SELECT### Response: select T2.级别 , T2.名称 , sum ( T1.成人价格 ) from 出境游路线 as T1 join 旅行社 as T2 on 出境游路线.旅行社id == 旅行社.词条id group by T1.旅行社id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 旅行社 (
词条id,
名称,
级别,
出境游国家数量,
国内游城市数量,
出境游路线数量,
国内游路线数量,
亚洲排名,
接待海外游客数量,
境外公司数量,
控股子公司数量,
有业务关系的旅行商数量,
免税店数量)
CREATE TABLE 出境游路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
成人价格,
儿童价格,
国家数量,
景点数,
门票总价格)
CREATE TABLE 出境游所含国家 (
路线id,
国家,
旅行天数,
景点数量)
CREATE TABLE 国内游路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
预售价格,
参团价格,
起团人数,
个人价格,
景点数)
CREATE TABLE 邮轮路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
内舱房价格,
海景房价格,
阳台房价格,
航行区域,
邮轮公司)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各旅行社的出境游路线中,都有哪些旅行社,它们都是什么级别的,并给出成人平均多少钱
SELECT### Response: select T2.级别 , T2.名称 , avg ( T1.成人价格 ) from 出境游路线 as T1 join 旅行社 as T2 on 出境游路线.旅行社id == 旅行社.词条id group by T1.旅行社id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 旅行社 (
词条id,
名称,
级别,
出境游国家数量,
国内游城市数量,
出境游路线数量,
国内游路线数量,
亚洲排名,
接待海外游客数量,
境外公司数量,
控股子公司数量,
有业务关系的旅行商数量,
免税店数量)
CREATE TABLE 出境游路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
成人价格,
儿童价格,
国家数量,
景点数,
门票总价格)
CREATE TABLE 出境游所含国家 (
路线id,
国家,
旅行天数,
景点数量)
CREATE TABLE 国内游路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
预售价格,
参团价格,
起团人数,
个人价格,
景点数)
CREATE TABLE 邮轮路线 (
词条id,
路线名称,
旅行社id,
出发城市,
天数,
内舱房价格,
海景房价格,
阳台房价格,
航行区域,
邮轮公司)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各旅行社的出境游路线中,都有哪些旅行社,它们都是什么级别的,并给出成人最高多少钱
SELECT### Response: select T2.级别 , T2.名称 , max ( T1.成人价格 ) from 出境游路线 as T1 join 旅行社 as T2 on 出境游路线.旅行社id == 旅行社.词条id group by T1.旅行社id. |
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 T2.人群 , T2.赛事名称 , max ( T1.冠军数量 ) from 冠军国家 as T1 join 重要赛事 as T2 on 冠军国家.赛事id == 重要赛事.词条id group by T1.赛事id. |
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 T2.人群 , T2.赛事名称 , min ( T1.冠军数量 ) from 冠军国家 as T1 join 重要赛事 as T2 on 冠军国家.赛事id == 重要赛事.词条id group by T1.赛事id. |
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 T2.人群 , T2.赛事名称 , avg ( T1.冠军数量 ) from 冠军国家 as T1 join 重要赛事 as T2 on 冠军国家.赛事id == 重要赛事.词条id group by T1.赛事id. |
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 T2.人群 , T2.赛事名称 , sum ( T1.冠军数量 ) from 冠军国家 as T1 join 重要赛事 as T2 on 冠军国家.赛事id == 重要赛事.词条id group by T1.赛事id. |
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 T2.所属国家 , T2.名称 , min ( T1.售价 ) from 音箱产品 as T1 join 公司 as T2 on 音箱产品.所属公司id == 公司.词条id group by T1.所属公司id. |
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 T2.所属国家 , T2.名称 , sum ( T1.售价 ) from 音箱产品 as T1 join 公司 as T2 on 音箱产品.所属公司id == 公司.词条id group by T1.所属公司id. |
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 T2.所属国家 , T2.名称 , avg ( T1.售价 ) from 音箱产品 as T1 join 公司 as T2 on 音箱产品.所属公司id == 公司.词条id group by T1.所属公司id. |
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 T2.所属国家 , T2.名称 , max ( T1.售价 ) from 音箱产品 as T1 join 公司 as T2 on 音箱产品.所属公司id == 公司.词条id group by T1.所属公司id. |
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,
上线时间,
官网,
百度权重,
PR值,
反链数,
综合分数,
总排名,
所在省排名,
电商网站排名)
CREATE TABLE 活动日 (
词条id,
活动名称,
时间,
发明公司id)
CREATE TABLE 网站活动收入 (
网站id,
活动id,
年份,
下单金额,
同比增长)
CREATE TABLE 网站打假 (
网站id,
年份,
315提名次数,
买家打假次数,
同比增长)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各公司推出的购物网站中,都有哪些公司,它们的创始人都是谁,并给出百度权重最高是多少
SELECT### Response: select T2.创始人 , T2.名称 , max ( T1.百度权重 ) from 购物网 as T1 join 公司 as T2 on 购物网.所属公司id == 公司.词条id group by T1.所属公司id. |
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,
上线时间,
官网,
百度权重,
PR值,
反链数,
综合分数,
总排名,
所在省排名,
电商网站排名)
CREATE TABLE 活动日 (
词条id,
活动名称,
时间,
发明公司id)
CREATE TABLE 网站活动收入 (
网站id,
活动id,
年份,
下单金额,
同比增长)
CREATE TABLE 网站打假 (
网站id,
年份,
315提名次数,
买家打假次数,
同比增长)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各公司推出的购物网站中,都有哪些公司,它们的创始人都是谁,并给出百度权重平均是多少
SELECT### Response: select T2.创始人 , T2.名称 , avg ( T1.百度权重 ) from 购物网 as T1 join 公司 as T2 on 购物网.所属公司id == 公司.词条id group by T1.所属公司id. |
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,
上线时间,
官网,
百度权重,
PR值,
反链数,
综合分数,
总排名,
所在省排名,
电商网站排名)
CREATE TABLE 活动日 (
词条id,
活动名称,
时间,
发明公司id)
CREATE TABLE 网站活动收入 (
网站id,
活动id,
年份,
下单金额,
同比增长)
CREATE TABLE 网站打假 (
网站id,
年份,
315提名次数,
买家打假次数,
同比增长)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各公司推出的购物网站中,都有哪些公司,它们的创始人都是谁,并给出百度权重最低是多少
SELECT### Response: select T2.创始人 , T2.名称 , min ( T1.百度权重 ) from 购物网 as T1 join 公司 as T2 on 购物网.所属公司id == 公司.词条id group by T1.所属公司id. |
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,
上线时间,
官网,
百度权重,
PR值,
反链数,
综合分数,
总排名,
所在省排名,
电商网站排名)
CREATE TABLE 活动日 (
词条id,
活动名称,
时间,
发明公司id)
CREATE TABLE 网站活动收入 (
网站id,
活动id,
年份,
下单金额,
同比增长)
CREATE TABLE 网站打假 (
网站id,
年份,
315提名次数,
买家打假次数,
同比增长)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各公司推出的购物网站中,都有哪些公司,它们的创始人都是谁,并给出百度权重总共有多少
SELECT### Response: select T2.创始人 , T2.名称 , sum ( T1.百度权重 ) from 购物网 as T1 join 公司 as T2 on 购物网.所属公司id == 公司.词条id group by T1.所属公司id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 峰会 (
词条id,
名称,
主办单位,
举办时间,
历时天数,
举办地点,
分论坛数量,
门票价格,
门票数量,
报名人数,
直播观看人数)
CREATE TABLE 嘉宾 (
词条id,
姓名,
任职单位,
职位)
CREATE TABLE 峰会嘉宾 (
嘉宾id,
峰会id,
演讲主题,
论坛,
开始时间,
演讲时长)
CREATE TABLE 峰会赞助公司 (
峰会id,
公司,
赞助级别)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各嘉宾参加的峰会中,都有哪些嘉宾,它们都在哪些单位任职,以及演讲时间最长的是多久
SELECT### Response: select T2.任职单位 , T2.姓名 , max ( T1.演讲时长 ) from 峰会嘉宾 as T1 join 嘉宾 as T2 on 峰会嘉宾.嘉宾id == 嘉宾.词条id group by T1.嘉宾id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 峰会 (
词条id,
名称,
主办单位,
举办时间,
历时天数,
举办地点,
分论坛数量,
门票价格,
门票数量,
报名人数,
直播观看人数)
CREATE TABLE 嘉宾 (
词条id,
姓名,
任职单位,
职位)
CREATE TABLE 峰会嘉宾 (
嘉宾id,
峰会id,
演讲主题,
论坛,
开始时间,
演讲时长)
CREATE TABLE 峰会赞助公司 (
峰会id,
公司,
赞助级别)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各嘉宾参加的峰会中,都有哪些嘉宾,它们都在哪些单位任职,以及演讲时间平均多久
SELECT### Response: select T2.任职单位 , T2.姓名 , avg ( T1.演讲时长 ) from 峰会嘉宾 as T1 join 嘉宾 as T2 on 峰会嘉宾.嘉宾id == 嘉宾.词条id group by T1.嘉宾id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 峰会 (
词条id,
名称,
主办单位,
举办时间,
历时天数,
举办地点,
分论坛数量,
门票价格,
门票数量,
报名人数,
直播观看人数)
CREATE TABLE 嘉宾 (
词条id,
姓名,
任职单位,
职位)
CREATE TABLE 峰会嘉宾 (
嘉宾id,
峰会id,
演讲主题,
论坛,
开始时间,
演讲时长)
CREATE TABLE 峰会赞助公司 (
峰会id,
公司,
赞助级别)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各嘉宾参加的峰会中,都有哪些嘉宾,它们都在哪些单位任职,以及演讲时间最短的是多久
SELECT### Response: select T2.任职单位 , T2.姓名 , min ( T1.演讲时长 ) from 峰会嘉宾 as T1 join 嘉宾 as T2 on 峰会嘉宾.嘉宾id == 嘉宾.词条id group by T1.嘉宾id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 峰会 (
词条id,
名称,
主办单位,
举办时间,
历时天数,
举办地点,
分论坛数量,
门票价格,
门票数量,
报名人数,
直播观看人数)
CREATE TABLE 嘉宾 (
词条id,
姓名,
任职单位,
职位)
CREATE TABLE 峰会嘉宾 (
嘉宾id,
峰会id,
演讲主题,
论坛,
开始时间,
演讲时长)
CREATE TABLE 峰会赞助公司 (
峰会id,
公司,
赞助级别)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各嘉宾参加的峰会中,都有哪些嘉宾,它们都在哪些单位任职,以及演讲时间总共多久
SELECT### Response: select T2.任职单位 , T2.姓名 , sum ( T1.演讲时长 ) from 峰会嘉宾 as T1 join 嘉宾 as T2 on 峰会嘉宾.嘉宾id == 嘉宾.词条id group by T1.嘉宾id. |
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 T2.位于城市 , T2.名称 , max ( T1.占地面积 ) from 房产公司典型项目 as T1 join 地产集团 as T2 on 房产公司典型项目.所属集团id == 地产集团.词条id group by T1.所属集团id. |
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 T2.位于城市 , T2.名称 , avg ( T1.占地面积 ) from 房产公司典型项目 as T1 join 地产集团 as T2 on 房产公司典型项目.所属集团id == 地产集团.词条id group by T1.所属集团id. |
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 T2.位于城市 , T2.名称 , sum ( T1.占地面积 ) from 房产公司典型项目 as T1 join 地产集团 as T2 on 房产公司典型项目.所属集团id == 地产集团.词条id group by T1.所属集团id. |
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 T2.位于城市 , T2.名称 , min ( T1.占地面积 ) from 房产公司典型项目 as T1 join 地产集团 as T2 on 房产公司典型项目.所属集团id == 地产集团.词条id group by T1.所属集团id. |
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 T2.所属省份 , T2.名称 , max ( T1.建成数量 ) from 银行服务网点 as T1 join 城市 as T2 on 银行服务网点.城市id == 城市.词条id group by T1.城市id. |
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 T2.所属省份 , T2.名称 , min ( T1.建成数量 ) from 银行服务网点 as T1 join 城市 as T2 on 银行服务网点.城市id == 城市.词条id group by T1.城市id. |
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 T2.所属省份 , T2.名称 , sum ( T1.建成数量 ) from 银行服务网点 as T1 join 城市 as T2 on 银行服务网点.城市id == 城市.词条id group by T1.城市id. |
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 T2.所属省份 , T2.名称 , avg ( T1.建成数量 ) from 银行服务网点 as T1 join 城市 as T2 on 银行服务网点.城市id == 城市.词条id group by T1.城市id. |
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 T2.总部地点 , T2.名称 , max ( T1.营收占比 ) from 公司各品牌收入排名 as T1 join 公司 as T2 on 公司各品牌收入排名.公司id == 公司.词条id group by T1.公司id. |
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 T2.总部地点 , T2.名称 , min ( T1.营收占比 ) from 公司各品牌收入排名 as T1 join 公司 as T2 on 公司各品牌收入排名.公司id == 公司.词条id group by T1.公司id. |
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 T2.总部地点 , T2.名称 , sum ( T1.营收占比 ) from 公司各品牌收入排名 as T1 join 公司 as T2 on 公司各品牌收入排名.公司id == 公司.词条id group by T1.公司id. |
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 T2.总部地点 , T2.名称 , avg ( T1.营收占比 ) from 公司各品牌收入排名 as T1 join 公司 as T2 on 公司各品牌收入排名.公司id == 公司.词条id group by T1.公司id. |
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 T2.所属省份 , T2.名称 , avg ( T1.分店数量 ) from 餐饮公司城市连锁 as T1 join 城市 as T2 on 餐饮公司城市连锁.城市id == 城市.词条id group by T1.城市id. |
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 T2.所属省份 , T2.名称 , min ( T1.分店数量 ) from 餐饮公司城市连锁 as T1 join 城市 as T2 on 餐饮公司城市连锁.城市id == 城市.词条id group by T1.城市id. |
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 T2.所属省份 , T2.名称 , sum ( T1.分店数量 ) from 餐饮公司城市连锁 as T1 join 城市 as T2 on 餐饮公司城市连锁.城市id == 城市.词条id group by T1.城市id. |
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 T2.所属省份 , T2.名称 , max ( T1.分店数量 ) from 餐饮公司城市连锁 as T1 join 城市 as T2 on 餐饮公司城市连锁.城市id == 城市.词条id group by T1.城市id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 智能手机公司 (
词条id,
名称,
所属国家,
年营业额,
年利润,
世界排名)
CREATE TABLE 智能手机全球出货量 (
公司id,
2017年出货量,
2017年市场占比,
2018年出货量,
2018年市场占比,
占比提升幅度)
CREATE TABLE 智能手机部署国家 (
公司id,
部署国家,
部署年份,
销售量排名)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在智能手机出货量及全球占比中,都有哪些智能手机公司,它们都属于哪个国家,以及全球在2017年最少出货了多少
SELECT### Response: select T2.所属国家 , T2.名称 , min ( T1.2017年出货量 ) from 智能手机全球出货量 as T1 join 智能手机公司 as T2 on 智能手机全球出货量.公司id == 智能手机公司.词条id group by T1.公司id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 智能手机公司 (
词条id,
名称,
所属国家,
年营业额,
年利润,
世界排名)
CREATE TABLE 智能手机全球出货量 (
公司id,
2017年出货量,
2017年市场占比,
2018年出货量,
2018年市场占比,
占比提升幅度)
CREATE TABLE 智能手机部署国家 (
公司id,
部署国家,
部署年份,
销售量排名)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在智能手机出货量及全球占比中,都有哪些智能手机公司,它们都属于哪个国家,以及全球在2017年最多出货了多少
SELECT### Response: select T2.所属国家 , T2.名称 , max ( T1.2017年出货量 ) from 智能手机全球出货量 as T1 join 智能手机公司 as T2 on 智能手机全球出货量.公司id == 智能手机公司.词条id group by T1.公司id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 智能手机公司 (
词条id,
名称,
所属国家,
年营业额,
年利润,
世界排名)
CREATE TABLE 智能手机全球出货量 (
公司id,
2017年出货量,
2017年市场占比,
2018年出货量,
2018年市场占比,
占比提升幅度)
CREATE TABLE 智能手机部署国家 (
公司id,
部署国家,
部署年份,
销售量排名)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在智能手机出货量及全球占比中,都有哪些智能手机公司,它们都属于哪个国家,以及全球在2017年总共出货了多少
SELECT### Response: select T2.所属国家 , T2.名称 , sum ( T1.2017年出货量 ) from 智能手机全球出货量 as T1 join 智能手机公司 as T2 on 智能手机全球出货量.公司id == 智能手机公司.词条id group by T1.公司id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 智能手机公司 (
词条id,
名称,
所属国家,
年营业额,
年利润,
世界排名)
CREATE TABLE 智能手机全球出货量 (
公司id,
2017年出货量,
2017年市场占比,
2018年出货量,
2018年市场占比,
占比提升幅度)
CREATE TABLE 智能手机部署国家 (
公司id,
部署国家,
部署年份,
销售量排名)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在智能手机出货量及全球占比中,都有哪些智能手机公司,它们都属于哪个国家,以及全球在2017年平均出货了多少
SELECT### Response: select T2.所属国家 , T2.名称 , avg ( T1.2017年出货量 ) from 智能手机全球出货量 as T1 join 智能手机公司 as T2 on 智能手机全球出货量.公司id == 智能手机公司.词条id group by T1.公司id. |
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.
--在俱乐部交易的球员中,都有哪些篮球俱乐部,它们都属于哪个地区,以及服役平均多久
SELECT### Response: select T2.所属地区 , T2.中文队名 , avg ( T1.服役时间 ) from 运动员转会 as T1 join 篮球俱乐部 as T2 on 运动员转会.俱乐部id == 篮球俱乐部.词条id group by T1.俱乐部id. |
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.
--在俱乐部交易的球员中,都有哪些篮球俱乐部,它们都属于哪个地区,以及服役最短多久
SELECT### Response: select T2.所属地区 , T2.中文队名 , min ( T1.服役时间 ) from 运动员转会 as T1 join 篮球俱乐部 as T2 on 运动员转会.俱乐部id == 篮球俱乐部.词条id group by T1.俱乐部id. |
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.
--在俱乐部交易的球员中,都有哪些篮球俱乐部,它们都属于哪个地区,以及服役最长多久
SELECT### Response: select T2.所属地区 , T2.中文队名 , max ( T1.服役时间 ) from 运动员转会 as T1 join 篮球俱乐部 as T2 on 运动员转会.俱乐部id == 篮球俱乐部.词条id group by T1.俱乐部id. |
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.
--在俱乐部交易的球员中,都有哪些篮球俱乐部,它们都属于哪个地区,以及服役总共多久
SELECT### Response: select T2.所属地区 , T2.中文队名 , sum ( T1.服役时间 ) from 运动员转会 as T1 join 篮球俱乐部 as T2 on 运动员转会.俱乐部id == 篮球俱乐部.词条id group by T1.俱乐部id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 网球运动员 (
词条id,
姓名,
性别,
国籍,
专业特点)
CREATE TABLE 网球赛事单打冠军排名 (
运动员id,
赛事,
夺冠次数,
夺冠年份)
CREATE TABLE 网球赛事历届单打冠军 (
年份,
赛事,
性别,
冠军id,
亚军id,
决赛比分)
CREATE TABLE 网球比赛记录 (
记录项目,
保持者id,
说明)
-- Using valid SQLite, answer the following questions for the tables provided above.
--网球单打冠军都有哪些运动员,性别都是男是女,以及拿过最少多少次冠军
SELECT### Response: select T2.性别 , T2.姓名 , min ( T1.夺冠次数 ) from 网球赛事单打冠军排名 as T1 join 网球运动员 as T2 on 网球赛事单打冠军排名.运动员id == 网球运动员.词条id group by T1.运动员id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 网球运动员 (
词条id,
姓名,
性别,
国籍,
专业特点)
CREATE TABLE 网球赛事单打冠军排名 (
运动员id,
赛事,
夺冠次数,
夺冠年份)
CREATE TABLE 网球赛事历届单打冠军 (
年份,
赛事,
性别,
冠军id,
亚军id,
决赛比分)
CREATE TABLE 网球比赛记录 (
记录项目,
保持者id,
说明)
-- Using valid SQLite, answer the following questions for the tables provided above.
--网球单打冠军都有哪些运动员,性别都是男是女,以及拿过平均多少次冠军
SELECT### Response: select T2.性别 , T2.姓名 , avg ( T1.夺冠次数 ) from 网球赛事单打冠军排名 as T1 join 网球运动员 as T2 on 网球赛事单打冠军排名.运动员id == 网球运动员.词条id group by T1.运动员id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 网球运动员 (
词条id,
姓名,
性别,
国籍,
专业特点)
CREATE TABLE 网球赛事单打冠军排名 (
运动员id,
赛事,
夺冠次数,
夺冠年份)
CREATE TABLE 网球赛事历届单打冠军 (
年份,
赛事,
性别,
冠军id,
亚军id,
决赛比分)
CREATE TABLE 网球比赛记录 (
记录项目,
保持者id,
说明)
-- Using valid SQLite, answer the following questions for the tables provided above.
--网球单打冠军都有哪些运动员,性别都是男是女,以及拿过总共多少次冠军
SELECT### Response: select T2.性别 , T2.姓名 , sum ( T1.夺冠次数 ) from 网球赛事单打冠军排名 as T1 join 网球运动员 as T2 on 网球赛事单打冠军排名.运动员id == 网球运动员.词条id group by T1.运动员id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 网球运动员 (
词条id,
姓名,
性别,
国籍,
专业特点)
CREATE TABLE 网球赛事单打冠军排名 (
运动员id,
赛事,
夺冠次数,
夺冠年份)
CREATE TABLE 网球赛事历届单打冠军 (
年份,
赛事,
性别,
冠军id,
亚军id,
决赛比分)
CREATE TABLE 网球比赛记录 (
记录项目,
保持者id,
说明)
-- Using valid SQLite, answer the following questions for the tables provided above.
--网球单打冠军都有哪些运动员,性别都是男是女,以及拿过最多多少次冠军
SELECT### Response: select T2.性别 , T2.姓名 , max ( T1.夺冠次数 ) from 网球赛事单打冠军排名 as T1 join 网球运动员 as T2 on 网球赛事单打冠军排名.运动员id == 网球运动员.词条id group by T1.运动员id. |
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 T2.起源国家 , T2.名称 , sum ( T1.所获金牌总数 ) from 项目流行国家 as T1 join 运动项目 as T2 on 项目流行国家.项目id == 运动项目.词条id group by T1.项目id. |
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 T2.起源国家 , T2.名称 , min ( T1.所获金牌总数 ) from 项目流行国家 as T1 join 运动项目 as T2 on 项目流行国家.项目id == 运动项目.词条id group by T1.项目id. |
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 T2.起源国家 , T2.名称 , max ( T1.所获金牌总数 ) from 项目流行国家 as T1 join 运动项目 as T2 on 项目流行国家.项目id == 运动项目.词条id group by T1.项目id. |
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 T2.起源国家 , T2.名称 , avg ( T1.所获金牌总数 ) from 项目流行国家 as T1 join 运动项目 as T2 on 项目流行国家.项目id == 运动项目.词条id group by T1.项目id. |
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.
--在各车型在平台的售卖统计中,都有哪些车型,它们都在哪个地方上牌的,以及价格最高的多少钱
SELECT### Response: select T2.上牌地 , T2.名称 , max ( T1.售价 ) from 车型平台售卖 as T1 join 车型 as T2 on 车型平台售卖.车型id == 车型.词条id group by T1.车型id. |
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.
--在各车型在平台的售卖统计中,都有哪些车型,它们都在哪个地方上牌的,以及总共卖了多少钱
SELECT### Response: select T2.上牌地 , T2.名称 , sum ( T1.售价 ) from 车型平台售卖 as T1 join 车型 as T2 on 车型平台售卖.车型id == 车型.词条id group by T1.车型id. |
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.
--在各车型在平台的售卖统计中,都有哪些车型,它们都在哪个地方上牌的,以及平均卖了多少钱
SELECT### Response: select T2.上牌地 , T2.名称 , avg ( T1.售价 ) from 车型平台售卖 as T1 join 车型 as T2 on 车型平台售卖.车型id == 车型.词条id group by T1.车型id. |
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.
--在各车型在平台的售卖统计中,都有哪些车型,它们都在哪个地方上牌的,以及价格最便宜的多少钱
SELECT### Response: select T2.上牌地 , T2.名称 , min ( T1.售价 ) from 车型平台售卖 as T1 join 车型 as T2 on 车型平台售卖.车型id == 车型.词条id group by T1.车型id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 公司 (
词条id,
名称,
行业,
校招人数)
CREATE TABLE 学校 (
词条id,
名称,
所在城市,
毕业人数)
CREATE TABLE 学校各专业 (
学校id,
专业,
毕业人数,
专业全国排名,
平均薪资)
CREATE TABLE 公司对口专业 (
公司id,
专业,
对应岗位,
拟招聘人数,
基本工资,
工资幅度)
CREATE TABLE 公司宣讲会 (
公司id,
学校id,
宣讲时间,
拟招聘人数,
参加笔试人数,
参加面试人数,
实际招聘人数)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各学校召开的宣讲会中,都有哪些学校,它们都在哪座城市,以及打算招聘总计多少人
SELECT### Response: select T2.所在城市 , T2.名称 , sum ( T1.拟招聘人数 ) from 公司宣讲会 as T1 join 学校 as T2 on 公司宣讲会.学校id == 学校.词条id group by T1.学校id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 公司 (
词条id,
名称,
行业,
校招人数)
CREATE TABLE 学校 (
词条id,
名称,
所在城市,
毕业人数)
CREATE TABLE 学校各专业 (
学校id,
专业,
毕业人数,
专业全国排名,
平均薪资)
CREATE TABLE 公司对口专业 (
公司id,
专业,
对应岗位,
拟招聘人数,
基本工资,
工资幅度)
CREATE TABLE 公司宣讲会 (
公司id,
学校id,
宣讲时间,
拟招聘人数,
参加笔试人数,
参加面试人数,
实际招聘人数)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各学校召开的宣讲会中,都有哪些学校,它们都在哪座城市,以及打算招聘最多多少人
SELECT### Response: select T2.所在城市 , T2.名称 , max ( T1.拟招聘人数 ) from 公司宣讲会 as T1 join 学校 as T2 on 公司宣讲会.学校id == 学校.词条id group by T1.学校id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 公司 (
词条id,
名称,
行业,
校招人数)
CREATE TABLE 学校 (
词条id,
名称,
所在城市,
毕业人数)
CREATE TABLE 学校各专业 (
学校id,
专业,
毕业人数,
专业全国排名,
平均薪资)
CREATE TABLE 公司对口专业 (
公司id,
专业,
对应岗位,
拟招聘人数,
基本工资,
工资幅度)
CREATE TABLE 公司宣讲会 (
公司id,
学校id,
宣讲时间,
拟招聘人数,
参加笔试人数,
参加面试人数,
实际招聘人数)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各学校召开的宣讲会中,都有哪些学校,它们都在哪座城市,以及打算招聘最少多少人
SELECT### Response: select T2.所在城市 , T2.名称 , min ( T1.拟招聘人数 ) from 公司宣讲会 as T1 join 学校 as T2 on 公司宣讲会.学校id == 学校.词条id group by T1.学校id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 公司 (
词条id,
名称,
行业,
校招人数)
CREATE TABLE 学校 (
词条id,
名称,
所在城市,
毕业人数)
CREATE TABLE 学校各专业 (
学校id,
专业,
毕业人数,
专业全国排名,
平均薪资)
CREATE TABLE 公司对口专业 (
公司id,
专业,
对应岗位,
拟招聘人数,
基本工资,
工资幅度)
CREATE TABLE 公司宣讲会 (
公司id,
学校id,
宣讲时间,
拟招聘人数,
参加笔试人数,
参加面试人数,
实际招聘人数)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各学校召开的宣讲会中,都有哪些学校,它们都在哪座城市,以及打算招聘平均多少人
SELECT### Response: select T2.所在城市 , T2.名称 , avg ( T1.拟招聘人数 ) from 公司宣讲会 as T1 join 学校 as T2 on 公司宣讲会.学校id == 学校.词条id group by T1.学校id. |
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 T2.地址 , T2.名称 , min ( T1.步行距离 ) from 酒店交通 as T1 join 酒店 as T2 on 酒店交通.酒店id == 酒店.词条id group by T1.酒店id. |
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 T2.地址 , T2.名称 , max ( T1.步行距离 ) from 酒店交通 as T1 join 酒店 as T2 on 酒店交通.酒店id == 酒店.词条id group by T1.酒店id. |
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 T2.地址 , T2.名称 , sum ( T1.步行距离 ) from 酒店交通 as T1 join 酒店 as T2 on 酒店交通.酒店id == 酒店.词条id group by T1.酒店id. |
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 T2.地址 , T2.名称 , avg ( T1.步行距离 ) from 酒店交通 as T1 join 酒店 as T2 on 酒店交通.酒店id == 酒店.词条id group by T1.酒店id. |
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 T2.所属项目 , T2.名称 , sum ( T1.转播费 ) from 赛事转播 as T1 join 体育赛事 as T2 on 赛事转播.赛事id == 体育赛事.词条id group by T1.赛事id. |
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 T2.所属项目 , T2.名称 , max ( T1.转播费 ) from 赛事转播 as T1 join 体育赛事 as T2 on 赛事转播.赛事id == 体育赛事.词条id group by T1.赛事id. |
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 T2.所属项目 , T2.名称 , min ( T1.转播费 ) from 赛事转播 as T1 join 体育赛事 as T2 on 赛事转播.赛事id == 体育赛事.词条id group by T1.赛事id. |
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 T2.所属项目 , T2.名称 , avg ( T1.转播费 ) from 赛事转播 as T1 join 体育赛事 as T2 on 赛事转播.赛事id == 体育赛事.词条id group by T1.赛事id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 诺贝尔奖项 (
词条id,
名称,
领域,
第一次颁奖时间,
获奖者最大年龄,
获奖者最小年龄,
获奖者平均年龄)
CREATE TABLE 高校 (
词条id,
名称,
所属国家,
世界排名,
独立科研机构数量,
重点学科数量)
CREATE TABLE 高校获奖名单 (
高校id,
奖项id,
人数,
排名)
CREATE TABLE 各国获奖名单 (
国家,
奖项id,
人数)
CREATE TABLE 科学家 (
词条id,
姓名,
性别,
国籍,
出生日期,
职业)
CREATE TABLE 毕业院校 (
科学家id,
高校id,
获得学位)
CREATE TABLE 诺贝尔奖科学家名单 (
年份,
奖项id,
科学家id,
理由)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各高校获得的诺贝尔奖中,都有哪些高校,它们都属于哪个国家,以及获奖的人总共有多少
SELECT### Response: select T2.所属国家 , T2.名称 , sum ( T1.人数 ) from 高校获奖名单 as T1 join 高校 as T2 on 高校获奖名单.高校id == 高校.词条id group by T1.高校id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 诺贝尔奖项 (
词条id,
名称,
领域,
第一次颁奖时间,
获奖者最大年龄,
获奖者最小年龄,
获奖者平均年龄)
CREATE TABLE 高校 (
词条id,
名称,
所属国家,
世界排名,
独立科研机构数量,
重点学科数量)
CREATE TABLE 高校获奖名单 (
高校id,
奖项id,
人数,
排名)
CREATE TABLE 各国获奖名单 (
国家,
奖项id,
人数)
CREATE TABLE 科学家 (
词条id,
姓名,
性别,
国籍,
出生日期,
职业)
CREATE TABLE 毕业院校 (
科学家id,
高校id,
获得学位)
CREATE TABLE 诺贝尔奖科学家名单 (
年份,
奖项id,
科学家id,
理由)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各高校获得的诺贝尔奖中,都有哪些高校,它们都属于哪个国家,以及获奖的人最少有多少
SELECT### Response: select T2.所属国家 , T2.名称 , min ( T1.人数 ) from 高校获奖名单 as T1 join 高校 as T2 on 高校获奖名单.高校id == 高校.词条id group by T1.高校id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 诺贝尔奖项 (
词条id,
名称,
领域,
第一次颁奖时间,
获奖者最大年龄,
获奖者最小年龄,
获奖者平均年龄)
CREATE TABLE 高校 (
词条id,
名称,
所属国家,
世界排名,
独立科研机构数量,
重点学科数量)
CREATE TABLE 高校获奖名单 (
高校id,
奖项id,
人数,
排名)
CREATE TABLE 各国获奖名单 (
国家,
奖项id,
人数)
CREATE TABLE 科学家 (
词条id,
姓名,
性别,
国籍,
出生日期,
职业)
CREATE TABLE 毕业院校 (
科学家id,
高校id,
获得学位)
CREATE TABLE 诺贝尔奖科学家名单 (
年份,
奖项id,
科学家id,
理由)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各高校获得的诺贝尔奖中,都有哪些高校,它们都属于哪个国家,以及获奖的人最多有多少
SELECT### Response: select T2.所属国家 , T2.名称 , max ( T1.人数 ) from 高校获奖名单 as T1 join 高校 as T2 on 高校获奖名单.高校id == 高校.词条id group by T1.高校id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 诺贝尔奖项 (
词条id,
名称,
领域,
第一次颁奖时间,
获奖者最大年龄,
获奖者最小年龄,
获奖者平均年龄)
CREATE TABLE 高校 (
词条id,
名称,
所属国家,
世界排名,
独立科研机构数量,
重点学科数量)
CREATE TABLE 高校获奖名单 (
高校id,
奖项id,
人数,
排名)
CREATE TABLE 各国获奖名单 (
国家,
奖项id,
人数)
CREATE TABLE 科学家 (
词条id,
姓名,
性别,
国籍,
出生日期,
职业)
CREATE TABLE 毕业院校 (
科学家id,
高校id,
获得学位)
CREATE TABLE 诺贝尔奖科学家名单 (
年份,
奖项id,
科学家id,
理由)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各高校获得的诺贝尔奖中,都有哪些高校,它们都属于哪个国家,以及获奖的人平均有多少
SELECT### Response: select T2.所属国家 , T2.名称 , avg ( T1.人数 ) from 高校获奖名单 as T1 join 高校 as T2 on 高校获奖名单.高校id == 高校.词条id group by T1.高校id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 朝代 (
词条id,
名称,
起始时间,
结束时间,
都城,
人口数量,
国土面积)
CREATE TABLE 皇帝 (
词条id,
中文名,
所处朝代id,
出生时间,
去世时间,
主要成就,
年号)
CREATE TABLE 各朝代皇帝 (
皇帝id,
朝代id,
登基时间,
在位时间,
第几位)
CREATE TABLE 年号 (
年号,
朝代id,
上一年号,
下一年号)
CREATE TABLE 大臣 (
词条id,
姓名,
所处朝代id,
出生时间,
去世时间,
职业)
CREATE TABLE 大臣辅佐的皇帝 (
大臣id,
皇帝id,
辅佐时间)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各皇帝的辅佐大臣中,都有哪些皇帝,它们主要都有哪些成就,以及辅佐最长的是多久
SELECT### Response: select T2.主要成就 , T2.中文名 , max ( T1.辅佐时间 ) from 大臣辅佐的皇帝 as T1 join 皇帝 as T2 on 大臣辅佐的皇帝.皇帝id == 皇帝.词条id group by T1.皇帝id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 朝代 (
词条id,
名称,
起始时间,
结束时间,
都城,
人口数量,
国土面积)
CREATE TABLE 皇帝 (
词条id,
中文名,
所处朝代id,
出生时间,
去世时间,
主要成就,
年号)
CREATE TABLE 各朝代皇帝 (
皇帝id,
朝代id,
登基时间,
在位时间,
第几位)
CREATE TABLE 年号 (
年号,
朝代id,
上一年号,
下一年号)
CREATE TABLE 大臣 (
词条id,
姓名,
所处朝代id,
出生时间,
去世时间,
职业)
CREATE TABLE 大臣辅佐的皇帝 (
大臣id,
皇帝id,
辅佐时间)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各皇帝的辅佐大臣中,都有哪些皇帝,它们主要都有哪些成就,以及辅佐时间平均多久
SELECT### Response: select T2.主要成就 , T2.中文名 , avg ( T1.辅佐时间 ) from 大臣辅佐的皇帝 as T1 join 皇帝 as T2 on 大臣辅佐的皇帝.皇帝id == 皇帝.词条id group by T1.皇帝id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 朝代 (
词条id,
名称,
起始时间,
结束时间,
都城,
人口数量,
国土面积)
CREATE TABLE 皇帝 (
词条id,
中文名,
所处朝代id,
出生时间,
去世时间,
主要成就,
年号)
CREATE TABLE 各朝代皇帝 (
皇帝id,
朝代id,
登基时间,
在位时间,
第几位)
CREATE TABLE 年号 (
年号,
朝代id,
上一年号,
下一年号)
CREATE TABLE 大臣 (
词条id,
姓名,
所处朝代id,
出生时间,
去世时间,
职业)
CREATE TABLE 大臣辅佐的皇帝 (
大臣id,
皇帝id,
辅佐时间)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各皇帝的辅佐大臣中,都有哪些皇帝,它们主要都有哪些成就,以及辅佐最短的是多久
SELECT### Response: select T2.主要成就 , T2.中文名 , min ( T1.辅佐时间 ) from 大臣辅佐的皇帝 as T1 join 皇帝 as T2 on 大臣辅佐的皇帝.皇帝id == 皇帝.词条id group by T1.皇帝id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 朝代 (
词条id,
名称,
起始时间,
结束时间,
都城,
人口数量,
国土面积)
CREATE TABLE 皇帝 (
词条id,
中文名,
所处朝代id,
出生时间,
去世时间,
主要成就,
年号)
CREATE TABLE 各朝代皇帝 (
皇帝id,
朝代id,
登基时间,
在位时间,
第几位)
CREATE TABLE 年号 (
年号,
朝代id,
上一年号,
下一年号)
CREATE TABLE 大臣 (
词条id,
姓名,
所处朝代id,
出生时间,
去世时间,
职业)
CREATE TABLE 大臣辅佐的皇帝 (
大臣id,
皇帝id,
辅佐时间)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各皇帝的辅佐大臣中,都有哪些皇帝,它们主要都有哪些成就,以及辅佐时间总共多久
SELECT### Response: select T2.主要成就 , T2.中文名 , sum ( T1.辅佐时间 ) from 大臣辅佐的皇帝 as T1 join 皇帝 as T2 on 大臣辅佐的皇帝.皇帝id == 皇帝.词条id group by T1.皇帝id. |
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,
起飞时间,
航班号,
航空公司id,
机龄,
经济舱价格,
头等舱价格,
经济舱余票,
头等舱余票,
历经时间)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各出发机场的航班信息中,都有哪些机场,它们都属于哪个地区,以及机龄加起来总共多少
SELECT### Response: select T2.所属地区 , T2.名称 , sum ( T1.机龄 ) from 航班信息 as T1 join 机场 as T2 on 航班信息.出发机场id == 机场.词条id group by T1.出发机场id. |
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,
起飞时间,
航班号,
航空公司id,
机龄,
经济舱价格,
头等舱价格,
经济舱余票,
头等舱余票,
历经时间)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各到达机场的航班信息中,都有哪些机场,它们都属于哪个地区,以及机龄最短的是多少
SELECT### Response: select T2.所属地区 , T2.名称 , min ( T1.机龄 ) from 航班信息 as T1 join 机场 as T2 on 航班信息.到达机场id == 机场.词条id group by T1.到达机场id. |
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,
起飞时间,
航班号,
航空公司id,
机龄,
经济舱价格,
头等舱价格,
经济舱余票,
头等舱余票,
历经时间)
-- Using valid SQLite, answer the following questions for the tables provided above.
--在各到达机场的航班信息中,都有哪些机场,它们都属于哪个地区,以及机龄最长的是多少
SELECT### Response: select T2.所属地区 , T2.名称 , max ( T1.机龄 ) from 航班信息 as T1 join 机场 as T2 on 航班信息.到达机场id == 机场.词条id group by T1.到达机场id. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.