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, 名称, 作者, 作者国籍, 豆瓣评分, 评价人数, 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. --哪个平台购买平台最少?一共花了多少钱? SELECT### Response: select 平台 , sum ( 售价 ) from 购买平台 group by 平台 order by count ( * ) asc limit 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 城市 ( 词条id, 名称, 所属省份, 地区生产总值, 生产总值增长率, 第一产业总值, 第二产业总值, 第三产业总值) CREATE TABLE 城市金融产业 ( 城市id, 金融业增加值, 增长率, 金融机构数量, 外币存款余额, 存款余额增长率, 贷款余额, 贷款余额增长率) CREATE TABLE 城市贸易产业 ( 城市id, 行业, 进口额, 进口额增长率, 出口额, 出口额增长率) CREATE TABLE 城市第一产业 ( 城市id, 产业类型, 收入, 收入增长率, 产量, 产量增长率) -- Using valid SQLite, answer the following questions for the tables provided above. --哪个省的平均地区生产总值最少?平均第三产业总值多少? SELECT### Response: select 所属省份 , avg ( 第三产业总值 ) from 城市 group by 所属省份 order by avg ( 地区生产总值 ) asc limit 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 城市 ( 词条id, 名称, 所属省份, 地区生产总值, 生产总值增长率, 第一产业总值, 第二产业总值, 第三产业总值) CREATE TABLE 城市金融产业 ( 城市id, 金融业增加值, 增长率, 金融机构数量, 外币存款余额, 存款余额增长率, 贷款余额, 贷款余额增长率) CREATE TABLE 城市贸易产业 ( 城市id, 行业, 进口额, 进口额增长率, 出口额, 出口额增长率) CREATE TABLE 城市第一产业 ( 城市id, 产业类型, 收入, 收入增长率, 产量, 产量增长率) -- Using valid SQLite, answer the following questions for the tables provided above. --哪个省的地区生产总值最小?第一产业总值最大多少? SELECT### Response: select 所属省份 , max ( 第一产业总值 ) from 城市 group by 所属省份 order by sum ( 地区生产总值 ) asc limit 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 城市 ( 词条id, 名称, 所属省份, 地区生产总值, 生产总值增长率, 第一产业总值, 第二产业总值, 第三产业总值) CREATE TABLE 城市金融产业 ( 城市id, 金融业增加值, 增长率, 金融机构数量, 外币存款余额, 存款余额增长率, 贷款余额, 贷款余额增长率) CREATE TABLE 城市贸易产业 ( 城市id, 行业, 进口额, 进口额增长率, 出口额, 出口额增长率) CREATE TABLE 城市第一产业 ( 城市id, 产业类型, 收入, 收入增长率, 产量, 产量增长率) -- Using valid SQLite, answer the following questions for the tables provided above. --哪个省的城市最多?最少地区生产总值有多少? SELECT### Response: select 所属省份 , min ( 地区生产总值 ) from 城市 group by 所属省份 order by count ( * ) desc limit 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 城市 ( 词条id, 名称, 所属省份, 地区生产总值, 生产总值增长率, 第一产业总值, 第二产业总值, 第三产业总值) CREATE TABLE 城市金融产业 ( 城市id, 金融业增加值, 增长率, 金融机构数量, 外币存款余额, 存款余额增长率, 贷款余额, 贷款余额增长率) CREATE TABLE 城市贸易产业 ( 城市id, 行业, 进口额, 进口额增长率, 出口额, 出口额增长率) CREATE TABLE 城市第一产业 ( 城市id, 产业类型, 收入, 收入增长率, 产量, 产量增长率) -- Using valid SQLite, answer the following questions for the tables provided above. --哪个省的城市最少?一共有多少地区生产总值? SELECT### Response: select 所属省份 , sum ( 地区生产总值 ) from 城市 group by 所属省份 order by count ( * ) asc limit 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 城市 ( 词条id, 名称, 所属省份, 地区生产总值, 生产总值增长率, 第一产业总值, 第二产业总值, 第三产业总值) CREATE TABLE 城市金融产业 ( 城市id, 金融业增加值, 增长率, 金融机构数量, 外币存款余额, 存款余额增长率, 贷款余额, 贷款余额增长率) CREATE TABLE 城市贸易产业 ( 城市id, 行业, 进口额, 进口额增长率, 出口额, 出口额增长率) CREATE TABLE 城市第一产业 ( 城市id, 产业类型, 收入, 收入增长率, 产量, 产量增长率) -- Using valid SQLite, answer the following questions for the tables provided above. --哪个省的城市最多?一共有多少地区生产总值? SELECT### Response: select 所属省份 , sum ( 地区生产总值 ) from 城市 group by 所属省份 order by count ( * ) desc limit 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 百城 ( 词条id, 城市, 排名, 人口吸引力指数, 同比排名变化, 环比排名变化) CREATE TABLE 人口来源城市 ( 城市id, 人口来源省份, 流入人口占比, 排名) CREATE TABLE 人口去向城市 ( 城市id, 人口去向省份, 流出人口占比, 排名) CREATE TABLE 流动人口年龄 ( 年份, 年龄段, 占比) CREATE TABLE 流动人口学历 ( 年份, 学历, 占比) CREATE TABLE 城市酒吧活力 ( 城市id, 酒吧数量, 排名, 周末客流量, 节假日客流量, 平日客流量) CREATE TABLE 酒吧顾客年龄 ( 顾客年龄段, 占比) CREATE TABLE 城市美食 ( 城市id, 美食名称, 搜索指数, 关注排名) CREATE TABLE 城市文化 ( 城市id, 文化名称, 关注热度, 关注排名) -- Using valid SQLite, answer the following questions for the tables provided above. --流动人口学历最少的是什么学历?最多占百分之多少? SELECT### Response: select 学历 , max ( 占比 ) from 流动人口学历 group by 学历 order by count ( * ) asc limit 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 百城 ( 词条id, 城市, 排名, 人口吸引力指数, 同比排名变化, 环比排名变化) CREATE TABLE 人口来源城市 ( 城市id, 人口来源省份, 流入人口占比, 排名) CREATE TABLE 人口去向城市 ( 城市id, 人口去向省份, 流出人口占比, 排名) CREATE TABLE 流动人口年龄 ( 年份, 年龄段, 占比) CREATE TABLE 流动人口学历 ( 年份, 学历, 占比) CREATE TABLE 城市酒吧活力 ( 城市id, 酒吧数量, 排名, 周末客流量, 节假日客流量, 平日客流量) CREATE TABLE 酒吧顾客年龄 ( 顾客年龄段, 占比) CREATE TABLE 城市美食 ( 城市id, 美食名称, 搜索指数, 关注排名) CREATE TABLE 城市文化 ( 城市id, 文化名称, 关注热度, 关注排名) -- Using valid SQLite, answer the following questions for the tables provided above. --流动人口学历最少的是什么学历?最少占百分之多少? SELECT### Response: select 学历 , min ( 占比 ) from 流动人口学历 group by 学历 order by count ( * ) asc limit 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 城市 ( 词条id, 城市, 所属省份, 城市人口, 城市面积, 汽车保有量级别(辆), 通勤高峰拥堵指数, 通勤高峰实际速度(千米/时), 拥堵排名) CREATE TABLE 全国交通枢纽 ( 词条id, 交通枢纽站, 所属城市id, 所属省份, 平均拥堵指数, 周边路网平均速度(千米/时), 拥堵排名) CREATE TABLE 旅游景点 ( 词条id, 景点名称, 所属城市id, 平均拥堵指数, 周边路网平均速度(千米/时), 拥堵排名) CREATE TABLE 全国热门景点 ( 景点id, 日均接待游客数量, 日均外省游客数量, 热度排名) CREATE TABLE 热门出境游城市 ( 城市, 所在国家, 国内游客数量, 排名) -- Using valid SQLite, answer the following questions for the tables provided above. --哪个省的总城市面积最大?总通勤高峰拥堵指数是多少? SELECT### Response: select 所属省份 , sum ( 通勤高峰拥堵指数 ) from 城市 group by 所属省份 order by sum ( 城市面积 ) desc limit 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 城市 ( 词条id, 城市, 所属省份, 城市人口, 城市面积, 汽车保有量级别(辆), 通勤高峰拥堵指数, 通勤高峰实际速度(千米/时), 拥堵排名) CREATE TABLE 全国交通枢纽 ( 词条id, 交通枢纽站, 所属城市id, 所属省份, 平均拥堵指数, 周边路网平均速度(千米/时), 拥堵排名) CREATE TABLE 旅游景点 ( 词条id, 景点名称, 所属城市id, 平均拥堵指数, 周边路网平均速度(千米/时), 拥堵排名) CREATE TABLE 全国热门景点 ( 景点id, 日均接待游客数量, 日均外省游客数量, 热度排名) CREATE TABLE 热门出境游城市 ( 城市, 所在国家, 国内游客数量, 排名) -- Using valid SQLite, answer the following questions for the tables provided above. --哪个省城市最少?最小城市面积是多少? SELECT### Response: select 所属省份 , min ( 城市面积 ) from 城市 group by 所属省份 order by count ( * ) asc limit 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 城市 ( 词条id, 城市, 所属省份, 城市人口, 城市面积, 汽车保有量级别(辆), 通勤高峰拥堵指数, 通勤高峰实际速度(千米/时), 拥堵排名) CREATE TABLE 全国交通枢纽 ( 词条id, 交通枢纽站, 所属城市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 所属省份 , max ( 城市面积 ) from 城市 group by 所属省份 order by count ( * ) desc limit 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 作者 ( 词条id, 姓名, 国籍, 毕业院校, 民族) CREATE TABLE 文集 ( 词条id, 名称, 作者id, 页数, 定价, 出版社, 出版时间, 开本) -- Using valid SQLite, answer the following questions for the tables provided above. --那个出版社的平均文集页数最多?最高定价多少? SELECT### Response: select 出版社 , max ( 定价 ) from 文集 group by 出版社 order by avg ( 页数 ) desc limit 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 作者 ( 词条id, 姓名, 国籍, 毕业院校, 民族) CREATE TABLE 文集 ( 词条id, 名称, 作者id, 页数, 定价, 出版社, 出版时间, 开本) -- Using valid SQLite, answer the following questions for the tables provided above. --那个出版社的文集最多?平均多少页? SELECT### Response: select 出版社 , avg ( 页数 ) from 文集 group by 出版社 order by count ( * ) desc limit 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 游泳泳姿 ( 词条id, 名称, 发明时间, 加入奥运会时间) CREATE TABLE 各泳姿参赛项目 ( 泳姿id, 50米, 100米, 200米, 400米, 800米, 1500米, 5000米, 10000米, 赛事) CREATE TABLE 泳坛名将 ( 词条id, 姓名, 性别, 国籍, 身高, 体重, 专业特点id) CREATE TABLE 赛事记录 ( 泳姿id, 长度, 赛事类型, 运动员id, 用时, 破记录年份) -- Using valid SQLite, answer the following questions for the tables provided above. --哪种赛事的记录最多?一共多长时间? SELECT### Response: select 赛事类型 , sum ( 用时 ) from 赛事记录 group by 赛事类型 order by count ( * ) desc limit 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 游泳泳姿 ( 词条id, 名称, 发明时间, 加入奥运会时间) CREATE TABLE 各泳姿参赛项目 ( 泳姿id, 50米, 100米, 200米, 400米, 800米, 1500米, 5000米, 10000米, 赛事) CREATE TABLE 泳坛名将 ( 词条id, 姓名, 性别, 国籍, 身高, 体重, 专业特点id) CREATE TABLE 赛事记录 ( 泳姿id, 长度, 赛事类型, 运动员id, 用时, 破记录年份) -- Using valid SQLite, answer the following questions for the tables provided above. --哪种赛事的记录最少?最长用了多长时间? SELECT### Response: select 赛事类型 , max ( 用时 ) from 赛事记录 group by 赛事类型 order by count ( * ) asc limit 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE 中国各城市马拉松 ( 词条id, 名称, 举办城市, 省份, 时间, 全程赛道, 人数规模) CREATE TABLE 马拉松赛程 ( 马拉松id, 赛程, 公里数, 报名人数, 中签率) CREATE TABLE 历届马拉松纪录 ( 年份, 城市, 参赛者最小年龄, 参赛者最大年龄, 全程最少时间) -- Using valid SQLite, answer the following questions for the tables provided above. --哪些中国城市马拉松的记录不多于5个?它们的举办地在哪? SELECT### Response: select T2.举办城市 , T2.名称 from 历届马拉松纪录 as T1 join 中国各城市马拉松 as T2 on 历届马拉松纪录.城市 == 中国各城市马拉松.举办城市 group by T1.城市 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 历届马拉松纪录 ( 年份, 城市, 参赛者最小年龄, 参赛者最大年龄, 全程最少时间) -- Using valid SQLite, answer the following questions for the tables provided above. --哪些中国城市马拉松的记录有5个?它们的举办地在哪? SELECT### Response: select T2.举办城市 , T2.名称 from 历届马拉松纪录 as T1 join 中国各城市马拉松 as T2 on 历届马拉松纪录.城市 == 中国各城市马拉松.举办城市 group by T1.城市 having count ( * ) == 5.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --What are the top 10 countries with most number of operational plants? SELECT### Response: SELECT Country FROM nuclear_power_plants WHERE Status = "Operational" GROUP BY Country ORDER BY count(Name) DESC LIMIT 10.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --What are the planed nuclear power plants and their located countries? SELECT### Response: SELECT Name, Country FROM nuclear_power_plants WHERE Status = "Planned".
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --What’s the most used nuclear reactor model? SELECT### Response: SELECT ReactorModel FROM nuclear_power_plants GROUP BY ReactorModel ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --Which country is Kaiga-4 built in? SELECT### Response: SELECT Country FROM nuclear_power_plants WHERE Name = "Kaiga-4".
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --How many PHWR are there today? SELECT### Response: SELECT count(*) FROM nuclear_power_plants WHERE ReactorType = "PHWR".
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --How many kinds of nuclear reactor model in the world? SELECT### Response: SELECT count(DISTINCT ReactorModel) FROM nuclear_power_plants.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --How many nuclear power plants were shut down now? SELECT### Response: SELECT count(*) FROM nuclear_power_plants WHERE Status = "Shutdown".
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --How many countries have at least 3 nuclear power plants? SELECT### Response: SELECT Country FROM nuclear_power_plants Group BY Country HAVING count(Name) > 3.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --Which country has the most nuclear power plants? SELECT### Response: SELECT Country FROM nuclear_power_plants GROUP BY Country ORDER BY count(name) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --Which country has only one nuclear power plants? SELECT### Response: SELECT Country FROM nuclear_power_plants GROUP BY Country HAVING count(Name) = 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --Which country has the most capacities of nuclear power plants? SELECT### Response: SELECT Country FROM nuclear_power_plants GROUP BY Country ORDER BY sum(Capacity) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --Which country has the least capacities of nuclear power plants? SELECT### Response: SELECT Country FROM nuclear_power_plants GROUP BY Country ORDER BY sum(Capacity) LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --What are the top 3 countries which have the most nuclear power plants? SELECT### Response: SELECT Country FROM nuclear_power_plants GROUP BY Country ORDER BY sum(Name) DESC LIMIT 3.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --Which country has the most nuclear station? SELECT### Response: SELECT Country FROM nuclear_power_plants GROUP BY Country ORDER BY count(Name) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --Which county has the most nuclear station shut down? SELECT### Response: SELECT Country FROM nuclear_power_plants WHERE Status = "Shutdown" GROUP BY Country ORDER BY count(Name) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --What nuclear station has the largest nuclear power plant capacity? SELECT### Response: SELECT Name FROM nuclear_power_plants ORDER BY Capacity DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --How many operating nuclear station in France? SELECT### Response: SELECT count(*) FROM nuclear_power_plants WHERE Country = "France" and Status = "Operational".
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --How many nuclear station are under construction? SELECT### Response: SELECT count(Name) FROM nuclear_power_plants WHERE Status = "Under Construction".
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --What nuclear reactor model is the most popular? SELECT### Response: SELECT ReactorModel FROM nuclear_power_plants GROUP BY ReactorModel ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --Which country is Chinon-A3 in? SELECT### Response: SELECT Country FROM nuclear_power_plants WHERE Name = "Chinon-A3".
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --What are operational nuclear power plants in Japan called? SELECT### Response: SELECT Name FROM nuclear_power_plants where Status = "Operational" and Country = "Japan".
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --Which country first started using nuclear power plant(s)? SELECT### Response: SELECT Country FROM nuclear_power_plants ORDER BY OperationalFrom LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --How many nuclear power plants are in preparation to be used in Japan? SELECT### Response: SELECT count(*) FROM nuclear_power_plants WHERE Country = "Japan" AND Status = "Under Construction".
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --What is the current situation of the nuclear power plant in the United States with the maximum capacity? SELECT### Response: SELECT Status FROM nuclear_power_plants WHERE Country = "United States" ORDER BY Capacity DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --What is the maximum capacity of existing pressurized water reactor? SELECT### Response: SELECT max(Capacity) FROM nuclear_power_plants WHERE ReactorType = "PWR" and Status = "Operational".
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --Which nation has the most nuclear plants under construction? SELECT### Response: SELECT Country FROM nuclear_power_plants WHERE Status = "Under Construction" GROUP BY Country ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --Which country has the most under constriction power plants to date? SELECT### Response: SELECT Country FROM nuclear_power_plants WHERE Status = "Under Construction" GROUP BY Country ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --Where is the first BWR type power plant built and located? SELECT### Response: SELECT Longitude, Latitude FROM nuclear_power_plants WHERE ReactorType = "BWR" ORDER BY ConstructionStartAt LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --Which country lead the total capacity of the power plants it held? SELECT### Response: SELECT Country FROM nuclear_power_plants GROUP BY Country ORDER BY sum(Capacity) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --What is the main source of the information for this table? SELECT### Response: SELECT Source FROM nuclear_power_plants GROUP BY Source ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --Which reactor type has the largest average capacity? SELECT### Response: SELECT ReactorType FROM nuclear_power_plants GROUP BY ReactorType ORDER BY avg(Capacity) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE nuclear power plants ( id, name, latitude, longitude, country, status, reactor_type, reactor_model, construction_start_at, operational_from, operational_to, capacity, last_updated_at, source) -- Using valid SQLite, answer the following questions for the tables provided above. --Which country is Kursk-1 in? SELECT### Response: SELECT Country FROM nuclear_power_plants WHERE Name = "Kursk-1".
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE greater manchester crime ( crime_id, crime_ts, location, lsoa, type, outcome) -- Using valid SQLite, answer the following questions for the tables provided above. --Which streets in Manchester have the highest rates of crime? SELECT### Response: SELECT Location FROM GreaterManchesterCrime WHERE Location like "%Street%" GROUP BY Location ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE greater manchester crime ( crime_id, crime_ts, location, lsoa, type, outcome) -- Using valid SQLite, answer the following questions for the tables provided above. --When was the last instance of a violent or sexual offense in Manchester? SELECT### Response: SELECT CrimeID FROM GreaterManchesterCrime WHERE Type = "Violence and sexual offences" ORDER BY CrimeTS DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE greater manchester crime ( crime_id, crime_ts, location, lsoa, type, outcome) -- Using valid SQLite, answer the following questions for the tables provided above. --Where was the last instance of a violent or sexual offense in Manchester? SELECT### Response: SELECT Location FROM GreaterManchesterCrime WHERE Type = "Violence and sexual offences" ORDER BY CrimeTS DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE greater manchester crime ( crime_id, crime_ts, location, lsoa, type, outcome) -- Using valid SQLite, answer the following questions for the tables provided above. --Which neighborhood has the highest crime rate? SELECT### Response: SELECT LSOA FROM GreaterManchesterCrime GROUP BY LSOA ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE greater manchester crime ( crime_id, crime_ts, location, lsoa, type, outcome) -- Using valid SQLite, answer the following questions for the tables provided above. --What is the crime rate for Eden Street area? SELECT### Response: SELECT count(*) FROM GreaterManchesterCrime WHERE Location like "%Eden Street%".
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE greater manchester crime ( crime_id, crime_ts, location, lsoa, type, outcome) -- Using valid SQLite, answer the following questions for the tables provided above. --What is the most common type of crime? SELECT### Response: SELECT Type FROM GreaterManchesterCrime GROUP BY Type ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE greater manchester crime ( crime_id, crime_ts, location, lsoa, type, outcome) -- Using valid SQLite, answer the following questions for the tables provided above. --Which neighborhood/area has the highest burglary rate? SELECT### Response: SELECT Location FROM GreaterManchesterCrime WHERE Type = "Burglary" GROUP BY Location ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE greater manchester crime ( crime_id, crime_ts, location, lsoa, type, outcome) -- Using valid SQLite, answer the following questions for the tables provided above. --Which area do most of the crimes happen? SELECT### Response: SELECT Location FROM GreaterManchesterCrime GROUP BY Location ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE greater manchester crime ( crime_id, crime_ts, location, lsoa, type, outcome) -- Using valid SQLite, answer the following questions for the tables provided above. --Which Lower Layer Output Area do most of the crimes happen? SELECT### Response: SELECT LSOA FROM GreaterManchesterCrime GROUP BY LSOA ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE greater manchester crime ( crime_id, crime_ts, location, lsoa, type, outcome) -- Using valid SQLite, answer the following questions for the tables provided above. --What time do most of the crimes happen? SELECT### Response: SELECT CrimeTS FROM GreaterManchesterCrime GROUP BY CrimeTS ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE greater manchester crime ( crime_id, crime_ts, location, lsoa, type, outcome) -- Using valid SQLite, answer the following questions for the tables provided above. --What are the most likely outcome of the police investigation if the crime happen on "street"? SELECT### Response: SELECT Outcome FROM GreaterManchesterCrime WHERE Location LIKE "%Street%" GROUP BY Outcome ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE greater manchester crime ( crime_id, crime_ts, location, lsoa, type, outcome) -- Using valid SQLite, answer the following questions for the tables provided above. --Which type of crime happen the most in Salford? SELECT### Response: SELECT Type FROM GreaterManchesterCrime WHERE LSOA LIKE "%Salford%" GROUP BY Type ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE greater manchester crime ( crime_id, crime_ts, location, lsoa, type, outcome) -- Using valid SQLite, answer the following questions for the tables provided above. --How many crimes are under investigation? SELECT### Response: SELECT count(*) FROM GreaterManchesterCrime WHERE Outcome = "Under investigation".
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE greater manchester crime ( crime_id, crime_ts, location, lsoa, type, outcome) -- Using valid SQLite, answer the following questions for the tables provided above. --How many crimes has been conducted? SELECT### Response: SELECT count(*) FROM GreaterManchesterCrime.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE greater manchester crime ( crime_id, crime_ts, location, lsoa, type, outcome) -- Using valid SQLite, answer the following questions for the tables provided above. --What is the top 3 area of crime conducted? SELECT### Response: SELECT Location FROM GreaterManchesterCrime GROUP BY Location ORDER BY count(*) DESC LIMIT 3.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE greater manchester crime ( crime_id, crime_ts, location, lsoa, type, outcome) -- Using valid SQLite, answer the following questions for the tables provided above. --Which type of crime has the highest rate of "Investigation complete"? SELECT### Response: SELECT Type FROM GreaterManchesterCrime WHERE Outcome LIKE "%Investigation complete%" GROUP BY Type ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE greater manchester crime ( crime_id, crime_ts, location, lsoa, type, outcome) -- Using valid SQLite, answer the following questions for the tables provided above. --How many crimes were classified as "Drugs"? SELECT### Response: SELECT count(*) FROM GreaterManchesterCrime WHERE Type LIKE "%Drug%".
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE greater manchester crime ( crime_id, crime_ts, location, lsoa, type, outcome) -- Using valid SQLite, answer the following questions for the tables provided above. --How many crimes are still "Under investigation" to date? SELECT### Response: SELECT count(*) FROM GreaterManchesterCrime WHERE Outcome LIke "%Under investigation%".
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE greater manchester crime ( crime_id, crime_ts, location, lsoa, type, outcome) -- Using valid SQLite, answer the following questions for the tables provided above. --Which location has the top amount of "Drugs" crime conducted? SELECT### Response: SELECT Location FROM GreaterManchesterCrime WHERE Type LIke "%Drug%" GROUP BY Location ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE greater manchester crime ( crime_id, crime_ts, location, lsoa, type, outcome) -- Using valid SQLite, answer the following questions for the tables provided above. --What’s the most common type of crime? SELECT### Response: SELECT Type FROM GreaterManchesterCrime GROUP BY Type ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE greater manchester crime ( crime_id, crime_ts, location, lsoa, type, outcome) -- Using valid SQLite, answer the following questions for the tables provided above. --Where is the most dangerous area? SELECT### Response: SELECT Location FROM GreaterManchesterCrime GROUP BY Location ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE greater manchester crime ( crime_id, crime_ts, location, lsoa, type, outcome) -- Using valid SQLite, answer the following questions for the tables provided above. --Where is the safest area? SELECT### Response: SELECT Location FROM GreaterManchesterCrime GROUP BY Location ORDER BY count(*) LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE greater manchester crime ( crime_id, crime_ts, location, lsoa, type, outcome) -- Using valid SQLite, answer the following questions for the tables provided above. --Where is the place with the largest number of sexual offenses crime events? SELECT### Response: SELECT Location FROM GreaterManchesterCrime WHERE Type = "Violence and sexual offences" GROUP BY Location ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE greater manchester crime ( crime_id, crime_ts, location, lsoa, type, outcome) -- Using valid SQLite, answer the following questions for the tables provided above. --If it is possible to increase the number of police officers, which place is with the first priority? SELECT### Response: SELECT Location FROM GreaterManchesterCrime GROUP BY Location ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE greater manchester crime ( crime_id, crime_ts, location, lsoa, type, outcome) -- Using valid SQLite, answer the following questions for the tables provided above. --Which type of crime has the most prosecution cases? SELECT### Response: SELECT Type FROM GreaterManchesterCrime WHERE Outcome = "Awaiting court outcome" GROUP BY Type ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE greater manchester crime ( crime_id, crime_ts, location, lsoa, type, outcome) -- Using valid SQLite, answer the following questions for the tables provided above. --Which type of crime has the most investigation complete cases? SELECT### Response: SELECT Type FROM GreaterManchesterCrime WHERE Outcome = "Investigation complete; no suspect identified" GROUP BY Type ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE greater manchester crime ( crime_id, crime_ts, location, lsoa, type, outcome) -- Using valid SQLite, answer the following questions for the tables provided above. --What is the result in case 6B:E2:54:C6:58:D2? SELECT### Response: SELECT Outcome FROM GreaterManchesterCrime WHERE CrimeID = "6B:E2:54:C6:58:D2".
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE sampledata15 ( sample_pk, state, year, month, day, site, commod, source_id, variety, origin, country, disttype, commtype, claim, quantity, growst, packst, distst) CREATE TABLE resultsdata15 ( sample_pk, commod, commtype, lab, pestcode, testclass, concen, lod, conunit, confmethod, confmethod2, annotate, quantitate, mean, extract, determin) -- Using valid SQLite, answer the following questions for the tables provided above. --Provide the list of products with pesticide residues detected. SELECT### Response: SELECT DISTINCT commod FROM resultsdata15 WHERE concen != "".
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE sampledata15 ( sample_pk, state, year, month, day, site, commod, source_id, variety, origin, country, disttype, commtype, claim, quantity, growst, packst, distst) CREATE TABLE resultsdata15 ( sample_pk, commod, commtype, lab, pestcode, testclass, concen, lod, conunit, confmethod, confmethod2, annotate, quantitate, mean, extract, determin) -- Using valid SQLite, answer the following questions for the tables provided above. --What is the most effective extraction method in terms of pesticide residues detection? SELECT### Response: SELECT extract FROM resultsdata15 GROUP BY extract ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE sampledata15 ( sample_pk, state, year, month, day, site, commod, source_id, variety, origin, country, disttype, commtype, claim, quantity, growst, packst, distst) CREATE TABLE resultsdata15 ( sample_pk, commod, commtype, lab, pestcode, testclass, concen, lod, conunit, confmethod, confmethod2, annotate, quantitate, mean, extract, determin) -- Using valid SQLite, answer the following questions for the tables provided above. --What is the most effective determinative method in terms of pesticide residues detection? SELECT### Response: SELECT determin FROM resultsdata15 GROUP BY determin ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE sampledata15 ( sample_pk, state, year, month, day, site, commod, source_id, variety, origin, country, disttype, commtype, claim, quantity, growst, packst, distst) CREATE TABLE resultsdata15 ( sample_pk, commod, commtype, lab, pestcode, testclass, concen, lod, conunit, confmethod, confmethod2, annotate, quantitate, mean, extract, determin) -- Using valid SQLite, answer the following questions for the tables provided above. --What are the top 5 analyzing labs where pesticide residues detection was conducted? SELECT### Response: SELECT lab FROM resultsdata15 GROUP BY lab ORDER BY count(*) DESC LIMIT 5.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE sampledata15 ( sample_pk, state, year, month, day, site, commod, source_id, variety, origin, country, disttype, commtype, claim, quantity, growst, packst, distst) CREATE TABLE resultsdata15 ( sample_pk, commod, commtype, lab, pestcode, testclass, concen, lod, conunit, confmethod, confmethod2, annotate, quantitate, mean, extract, determin) -- Using valid SQLite, answer the following questions for the tables provided above. --Wha commodity type of apple has the highest pesticide residues to consume? SELECT### Response: SELECT commtype FROM resultsdata15 WHERE commod = "AP" GROUP BY commtype ORDER BY sum(concen) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE sampledata15 ( sample_pk, state, year, month, day, site, commod, source_id, variety, origin, country, disttype, commtype, claim, quantity, growst, packst, distst) CREATE TABLE resultsdata15 ( sample_pk, commod, commtype, lab, pestcode, testclass, concen, lod, conunit, confmethod, confmethod2, annotate, quantitate, mean, extract, determin) -- Using valid SQLite, answer the following questions for the tables provided above. --Rank the country of product origins in terms of pesticide residues detection. SELECT### Response: SELECT T1.country FROM sampledata15 as T1 JOIN resultsdata15 as T2 ON T1.sample_pk = T2.sample_pk GROUP BY T1.country ORDER BY T2.concen.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE sampledata15 ( sample_pk, state, year, month, day, site, commod, source_id, variety, origin, country, disttype, commtype, claim, quantity, growst, packst, distst) CREATE TABLE resultsdata15 ( sample_pk, commod, commtype, lab, pestcode, testclass, concen, lod, conunit, confmethod, confmethod2, annotate, quantitate, mean, extract, determin) -- Using valid SQLite, answer the following questions for the tables provided above. --What type of collection facility results in the most risky consumption in terms of pesticide residues detection? SELECT### Response: SELECT T1.disttype FROM sampledata15 as T1 JOIN resultsdata15 as T2 ON T1.sample_pk = T2.sample_pk GROUP BY T1.disttype ORDER BY sum(T2.concen) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE sampledata15 ( sample_pk, state, year, month, day, site, commod, source_id, variety, origin, country, disttype, commtype, claim, quantity, growst, packst, distst) CREATE TABLE resultsdata15 ( sample_pk, commod, commtype, lab, pestcode, testclass, concen, lod, conunit, confmethod, confmethod2, annotate, quantitate, mean, extract, determin) -- Using valid SQLite, answer the following questions for the tables provided above. --What are the country of product origins where pesticide residues were not detected? SELECT### Response: SELECT T1.country FROM sampledata15 as T1 JOIN resultsdata15 as T2 ON T1.sample_pk = T2.sample_pk WHERE T2.concen = "0" GROUP BY T1.country.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE sampledata15 ( sample_pk, state, year, month, day, site, commod, source_id, variety, origin, country, disttype, commtype, claim, quantity, growst, packst, distst) CREATE TABLE resultsdata15 ( sample_pk, commod, commtype, lab, pestcode, testclass, concen, lod, conunit, confmethod, confmethod2, annotate, quantitate, mean, extract, determin) -- Using valid SQLite, answer the following questions for the tables provided above. --how many entries are of each specific food? SELECT### Response: SELECT commod, count(*) FROM sampledata15 GROUP BY commod.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE sampledata15 ( sample_pk, state, year, month, day, site, commod, source_id, variety, origin, country, disttype, commtype, claim, quantity, growst, packst, distst) CREATE TABLE resultsdata15 ( sample_pk, commod, commtype, lab, pestcode, testclass, concen, lod, conunit, confmethod, confmethod2, annotate, quantitate, mean, extract, determin) -- Using valid SQLite, answer the following questions for the tables provided above. --which pesticides are most used? SELECT### Response: SELECT pestcode FROM resultsdata15 GROUP BY pestcode ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE sampledata15 ( sample_pk, state, year, month, day, site, commod, source_id, variety, origin, country, disttype, commtype, claim, quantity, growst, packst, distst) CREATE TABLE resultsdata15 ( sample_pk, commod, commtype, lab, pestcode, testclass, concen, lod, conunit, confmethod, confmethod2, annotate, quantitate, mean, extract, determin) -- Using valid SQLite, answer the following questions for the tables provided above. --which pesticides have been used the least? SELECT### Response: SELECT pestcode FROM resultsdata15 GROUP BY pestcode ORDER BY count(*) LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE sampledata15 ( sample_pk, state, year, month, day, site, commod, source_id, variety, origin, country, disttype, commtype, claim, quantity, growst, packst, distst) CREATE TABLE resultsdata15 ( sample_pk, commod, commtype, lab, pestcode, testclass, concen, lod, conunit, confmethod, confmethod2, annotate, quantitate, mean, extract, determin) -- Using valid SQLite, answer the following questions for the tables provided above. --how was a specific sample tested? SELECT### Response: SELECT sample_pk, testclass FROM resultsdata15.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE sampledata15 ( sample_pk, state, year, month, day, site, commod, source_id, variety, origin, country, disttype, commtype, claim, quantity, growst, packst, distst) CREATE TABLE resultsdata15 ( sample_pk, commod, commtype, lab, pestcode, testclass, concen, lod, conunit, confmethod, confmethod2, annotate, quantitate, mean, extract, determin) -- Using valid SQLite, answer the following questions for the tables provided above. --in which state was a specific sample grown? SELECT### Response: SELECT sample_pk, growst FROM sampledata15.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE sampledata15 ( sample_pk, state, year, month, day, site, commod, source_id, variety, origin, country, disttype, commtype, claim, quantity, growst, packst, distst) CREATE TABLE resultsdata15 ( sample_pk, commod, commtype, lab, pestcode, testclass, concen, lod, conunit, confmethod, confmethod2, annotate, quantitate, mean, extract, determin) -- Using valid SQLite, answer the following questions for the tables provided above. --in which state was a specific sample packed? SELECT### Response: SELECT sample_pk, packst FROM sampledata15.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE sampledata15 ( sample_pk, state, year, month, day, site, commod, source_id, variety, origin, country, disttype, commtype, claim, quantity, growst, packst, distst) CREATE TABLE resultsdata15 ( sample_pk, commod, commtype, lab, pestcode, testclass, concen, lod, conunit, confmethod, confmethod2, annotate, quantitate, mean, extract, determin) -- Using valid SQLite, answer the following questions for the tables provided above. --in which state was a specific sample distributed? SELECT### Response: SELECT sample_pk, distst FROM sampledata15.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE sampledata15 ( sample_pk, state, year, month, day, site, commod, source_id, variety, origin, country, disttype, commtype, claim, quantity, growst, packst, distst) CREATE TABLE resultsdata15 ( sample_pk, commod, commtype, lab, pestcode, testclass, concen, lod, conunit, confmethod, confmethod2, annotate, quantitate, mean, extract, determin) -- Using valid SQLite, answer the following questions for the tables provided above. --show all imported samples? SELECT### Response: SELECT sample_pk FROM sampledata15 WHERE origin = "2".
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE sampledata15 ( sample_pk, state, year, month, day, site, commod, source_id, variety, origin, country, disttype, commtype, claim, quantity, growst, packst, distst) CREATE TABLE resultsdata15 ( sample_pk, commod, commtype, lab, pestcode, testclass, concen, lod, conunit, confmethod, confmethod2, annotate, quantitate, mean, extract, determin) -- Using valid SQLite, answer the following questions for the tables provided above. --which foods are captured in the data set? SELECT### Response: SELECT DISTINCT commod FROM sampledata15.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE sampledata15 ( sample_pk, state, year, month, day, site, commod, source_id, variety, origin, country, disttype, commtype, claim, quantity, growst, packst, distst) CREATE TABLE resultsdata15 ( sample_pk, commod, commtype, lab, pestcode, testclass, concen, lod, conunit, confmethod, confmethod2, annotate, quantitate, mean, extract, determin) -- Using valid SQLite, answer the following questions for the tables provided above. --how many samples have unknown countries of origin? SELECT### Response: SELECT count(*) FROM sampledata15 WHERE origin = "3".
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE sampledata15 ( sample_pk, state, year, month, day, site, commod, source_id, variety, origin, country, disttype, commtype, claim, quantity, growst, packst, distst) CREATE TABLE resultsdata15 ( sample_pk, commod, commtype, lab, pestcode, testclass, concen, lod, conunit, confmethod, confmethod2, annotate, quantitate, mean, extract, determin) -- Using valid SQLite, answer the following questions for the tables provided above. --Which are the top 10 commodities that have the highest residue during 2015? SELECT### Response: SELECT T2.commod FROM resultsdata15 as T2 JOIN sampledata15 as T1 ON T1.sample_pk = T2.sample_pk WHERE T1.year = 15 GROUP BY T2.commod ORDER BY sum(T2.concen) DESC LIMIT 10.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE sampledata15 ( sample_pk, state, year, month, day, site, commod, source_id, variety, origin, country, disttype, commtype, claim, quantity, growst, packst, distst) CREATE TABLE resultsdata15 ( sample_pk, commod, commtype, lab, pestcode, testclass, concen, lod, conunit, confmethod, confmethod2, annotate, quantitate, mean, extract, determin) -- Using valid SQLite, answer the following questions for the tables provided above. --Name some imported commodities that are not found in the US. SELECT### Response: SELECT commod FROM sampledata15 WHERE origin = 2 AND commod not in (SELECT commod FROM sampledata15 WHERE origin = 1).
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE sampledata15 ( sample_pk, state, year, month, day, site, commod, source_id, variety, origin, country, disttype, commtype, claim, quantity, growst, packst, distst) CREATE TABLE resultsdata15 ( sample_pk, commod, commtype, lab, pestcode, testclass, concen, lod, conunit, confmethod, confmethod2, annotate, quantitate, mean, extract, determin) -- Using valid SQLite, answer the following questions for the tables provided above. --Tell me the average pesticide residue for each state in the US where food is grown. SELECT### Response: SELECT T1.growst, avg(T2.concen) FROM sampledata15 as T1 JOIN resultsdata15 as T2 ON T1.sample_pk = T2.sample_pk GROUP BY T1.growst.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE sampledata15 ( sample_pk, state, year, month, day, site, commod, source_id, variety, origin, country, disttype, commtype, claim, quantity, growst, packst, distst) CREATE TABLE resultsdata15 ( sample_pk, commod, commtype, lab, pestcode, testclass, concen, lod, conunit, confmethod, confmethod2, annotate, quantitate, mean, extract, determin) -- Using valid SQLite, answer the following questions for the tables provided above. --Which varieties of apple typically have higher pesticide levels? SELECT### Response: SELECT T1.variety FROM resultsdata15 as T2 JOIN sampledata15 as T1 ON T1.sample_pk = T2.sample_pk WHERE T2.commod = "AP" GROUP BY T1.variety ORDER BY sum(T2.concen) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE sampledata15 ( sample_pk, state, year, month, day, site, commod, source_id, variety, origin, country, disttype, commtype, claim, quantity, growst, packst, distst) CREATE TABLE resultsdata15 ( sample_pk, commod, commtype, lab, pestcode, testclass, concen, lod, conunit, confmethod, confmethod2, annotate, quantitate, mean, extract, determin) -- Using valid SQLite, answer the following questions for the tables provided above. --Which commodities have the pesticides concentration much higher than their limit for detection? SELECT### Response: SELECT commod FROM resultsdata15 WHERE concen > lod.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE sampledata15 ( sample_pk, state, year, month, day, site, commod, source_id, variety, origin, country, disttype, commtype, claim, quantity, growst, packst, distst) CREATE TABLE resultsdata15 ( sample_pk, commod, commtype, lab, pestcode, testclass, concen, lod, conunit, confmethod, confmethod2, annotate, quantitate, mean, extract, determin) -- Using valid SQLite, answer the following questions for the tables provided above. --Name top 5 labs with the maximum number of testing. SELECT### Response: SELECT lab FROM resultsdata15 GROUP BY lab ORDER BY count(*) DESC LIMIT 5.