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 fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--What was the most common cause of fire between 2000 and 2005?
SELECT### Response: SELECT STAT_CAUSE_DESCR FROM Fires WHERE FIRE_YEAR BETWEEN 2000 AND 2005 GROUP BY STAT_CAUSE_DESCR 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 fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--How many fires were more than 100 acres in 2006?
SELECT### Response: SELECT count(*) FROM Fires WHERE FIRE_YEAR = 2006 AND FIRE_SIZE > 100. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Which states had the largest number of fires in 2001?
SELECT### Response: SELECT State FROM Fires WHERE FIRE_YEAR = 2001 GROUP BY State 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 fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--How many acres burned in fires in California each year between 2000 and 2005?
SELECT### Response: SELECT sum(FIRE_SIZE), FIRE_YEAR FROM Fires WHERE State = "CA" AND FIRE_YEAR BETWEEN 2000 AND 2005 GROUP BY FIRE_YEAR. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Which year had the largest number of fires?
SELECT### Response: SELECT FIRE_YEAR FROM Fires GROUP BY FIRE_YEAR 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 fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Show all fires caused by campfires in Texas.
SELECT### Response: SELECT * FROM Fires WHERE State = "TX" AND STAT_CAUSE_DESCR LIKE "Campfire". |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Who was responsible for the land of the biggest fire in Oregon in 2015?
SELECT### Response: SELECT OWNER_DESCR FROM FIres WHERE State = "OR" AND FIRE_YEAR = 2015 ORDER BY FIRE_SIZE DESC LIMIT 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Which counties in Washington had fires in 2012?
SELECT### Response: SELECT COUNTY FROM Fires WHERE State = "WA" AND FIRE_YEAR = 2012. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--How many arson-related fires were there in 2010?
SELECT### Response: SELECT count(*) FROM Fires WHERE FIRE_YEAR = 2010 AND STAT_CAUSE_DESCR LIKE "%Arson%". |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--How many years of data are recorded in this database?
SELECT### Response: SELECT count(DISTINCT FIRE_YEAR) FROM Fires. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Average date of year that fire was discovered from 2000~2004?
SELECT### Response: SELECT avg(DISCOVERY_DATE) FROM Fires where FIRE_YEAR BETWEEN 2000 AND 2004. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--What’s the most common cause of the fire (code) in the database?
SELECT### Response: SELECT STAT_CAUSE_CODE FROM Fires GROUP BY STAT_CAUSE_CODE 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 fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--What’s the year that have the largest acres in the fire area?
SELECT### Response: SELECT FIRE_YEAR FROM Fires ORDER BY FIRE_SIZE DESC LIMIT 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--How many missing / not specified name of the owner are there in the database?
SELECT### Response: SELECT count(*) FROM Fires WHERE OWNER_DESCR = "MISSING/NOT SPECIFIED". |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--What’s the county that contains most recorded burns in 2000 according to the database?
SELECT### Response: SELECT COUNTY FROM Fires GROUP BY COUNTY ORDER BY count(*). |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--How many distinct cause of the fire descriptions are there in the database?
SELECT### Response: SELECT count(DISTINCT STAT_CAUSE_DESCR) FROM Fires. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Sum of the acres burned in NC state in 2006?
SELECT### Response: SELECT sum(FIRE_SIZE) FROM Fires WHERE State = "NY" and FIRE_YEAR = "2006". |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--What was the cause of the largest wildfire in Utah in the year 1997?
SELECT### Response: SELECT * FROM Fires WHERE State = "UT" AND FIRE_YEAR = 1997 ORDER BY FIRE_SIZE DESC LIMIT 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--How many wildfires in Gloucester county have been larger than 10 acres?
SELECT### Response: SELECT count(*) FROM Fires WHERE COUNTY = "Gloucester" AND FIRE_SIZE > 10. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Which state experiences the most wildfires?
SELECT### Response: SELECT State FROM Fires GROUP BY State 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 fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--What is the leading cause of wildfires?
SELECT### Response: SELECT STAT_CAUSE_DESCR FROM Fires GROUP BY STAT_CAUSE_DESCR 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 fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--On what type of land (public or private) do more wildfires occur?
SELECT### Response: SELECT OWNER_DESCR FROM Fires GROUP BY OWNER_DESCR 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 fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--In 2014, how many wildfires were the result of mismanaged campfires?
SELECT### Response: SELECT count(*) FROM Fires WHERE STAT_CAUSE_DESCR LIKE "%Campfire%" AND FIRE_YEAR = 2014. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--How many total acres of land in Texas have seen a wildfire in the decade between 2000-2010?
SELECT### Response: SELECT sum(FIRE_SIZE) FROM Fires WHERE State = "TX" AND FIRE_YEAR BETWEEN 2000 AND 2010. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Which state has the most number of fires being recorded?
SELECT### Response: SELECT State FROM Fires GROUP BY State 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 fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--What is the most common reason that causes a fire?
SELECT### Response: SELECT STAT_CAUSE_DESCR FROM Fires GROUP BY STAT_CAUSE_DESCR 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 fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--What is the total area that has been burned until now?
SELECT### Response: SELECT sum(FIRE_SIZE) FROM Fires. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--How many acres burned in 2000s and 1990s?
SELECT### Response: SELECT sum(FIRE_SIZE) FROM Fires WHERE STATE = "TX" AND FIRE_YEAR BETWEEN 2000 AND 2010 UNION SELECT sum(FIRE_SIZE) FROM Fires WHERE STATE = "TX" AND FIRE_YEAR BETWEEN 1990 AND 2000. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--How many fire cases occur on the land without any owner?
SELECT### Response: SELECT count(*) FROM Fires WHERE OWNER_DESCR = "MISSING/NOT SPECIFIED". |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE fires (
fire_year,
discovery_date,
discovery_doy,
discovery_time,
stat_cause_code,
stat_cause_descr,
cont_date,
cont_doy,
cont_time,
fire_size,
fire_size_class,
latitude,
longitude,
owner_code,
owner_descr,
state,
county,
fips_code,
fips_name)
-- Using valid SQLite, answer the following questions for the tables provided above.
--What is the latitudinal band that is most likely to experience wildfires in the USA?
SELECT### Response: SELECT LATITUDE FROM Fires GROUP BY LATITUDE 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 torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--What are the top 100 torrent releases?
SELECT### Response: SELECT groupName FROM torrents ORDER BY totalSnatched DESC LIMIT 100. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--What are name of top 10 artists or groups?
SELECT### Response: SELECT artist FROM torrents GROUP BY artist ORDER BY sum(totalSnatched) DESC LIMIT 10. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--What are the top 10 torrent release types?
SELECT### Response: SELECT releaseType FROM torrents GROUP BY releaseType ORDER BY sum(totalSnatched) DESC LIMIT 10. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--What are the top 20 pop albums?
SELECT### Response: SELECT T2.groupName FROM torrents as T2 JOIN tags as T1 ON T1.id = T2.id WHERE T1.tag = "pop" and T2.releaseType = "album" ORDER BY T2.totalSnatched DESC LIMIT 20. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--What are the top 20 instrumental albums since 2000?
SELECT### Response: SELECT T2.groupName FROM torrents as T2 JOIN tags as T1 ON T1.id = T2.id WHERE T1.tag = "instrumental" and T2.releaseType = "album" and groupYear >= 2000 ORDER BY T2.totalSnatched DESC LIMIT 20. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--What type of musical album is the most popular?
SELECT### Response: SELECT T1.tag FROM torrents as T2 JOIN tags as T1 ON T1.id = T2.id WHERE T2.releaseType = "album" GROUP BY T1.tag ORDER BY sum(T2.totalSnatched) DESC LIMIT 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--What are the top 100 single musics?
SELECT### Response: SELECT groupName FROM torrents WHERE releaseType = "single" ORDER BY totalSnatched DESC LIMIT 100. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--What is the torrent download statistics for each release year?
SELECT### Response: SELECT sum(totalSnatched), groupYear FROM torrents GROUP BY groupYear. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--how many entries are of each type?
SELECT### Response: SELECT count(*), releaseType FROM torrents GROUP BY releaseType. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--how many unique entries are by the same Artist/group?
SELECT### Response: SELECT count(*), artist FROM torrents GROUP BY artist. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--which entry have been downloaded the most?
SELECT### Response: SELECT groupName FROM torrents ORDER BY totalSnatched DESC LIMIT 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--which entry have been downloaded the least?
SELECT### Response: SELECT groupName FROM torrents ORDER BY totalSnatched LIMIT 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--what are titles for each unique entry?
SELECT### Response: SELECT DISTINCT groupName FROM torrents. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--what year was each specific entry released?
SELECT### Response: SELECT groupName, groupYear FROM torrents. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--what are the entries by each specific artist/group?
SELECT### Response: SELECT groupName, artist FROM torrents. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--which tags exist?
SELECT### Response: SELECT DISTINCT tag FROM tags. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--what release types are captured in this data set?
SELECT### Response: SELECT DISTINCT releaseType FROM torrents. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Find me top 5 most popular releases after 2000?
SELECT### Response: SELECT groupName FROM torrents WHERE groupYear > 2000 ORDER BY totalSnatched DESC LIMIT 5. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Which albums have been downloaded more than 100 times?
SELECT### Response: SELECT DISTINCT groupName FROM torrents WHERE totalSnatched > 100 AND releaseType = "album". |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Name the most popular release on houston.
SELECT### Response: SELECT T2.groupName FROM torrents as T2 JOIN tags as T1 ON T1.id = T2.id WHERE T1.tag = "houston" ORDER BY totalSnatched DESC LIMIT 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Name the most popular and least popular releases of lasean camry?
SELECT### Response: SELECT groupName FROM torrents WHERE artist = "lasean camry" AND totalSnatched = (SELECT max(totalSnatched) FROM torrents WHERE artist = "lasean camry") UNION SELECT groupName FROM torrents WHERE artist = "lasean camry" AND totalSnatched = (SELECT min(totalSnatched) FROM torrents WHERE artist = "lasean camry"). |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Find me top 10 albums ranked by their popularity.
SELECT### Response: SELECT groupName FROM torrents WHERE releaseType = "album" ORDER BY totalSnatched DESC LIMIT 10. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Find me the most popular topics since 2010.
SELECT### Response: SELECT T1.tag FROM torrents as T2 JOIN tags as T1 ON T1.id = T2.id WHERE T2.groupYear >= 2010 GROUP BY T1.tag ORDER BY T2.totalSnatched DESC LIMIT 10. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Which year had the minimum number of releases?
SELECT### Response: SELECT groupYear FROM torrents GROUP BY groupYear ORDER BY count(groupName) LIMIT 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Which release is being downloaded the most?
SELECT### Response: SELECT groupName FROM torrents ORDER BY totalSnatched DESC LIMIT 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Who or which group is most popular in 2015?
SELECT### Response: SELECT artist FROM torrents WHERE groupYear = 2015 GROUP BY artist ORDER BY totalSnatched DESC LIMIT 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Which tag is used for which release title?
SELECT### Response: SELECT T1.tag, T2.groupName FROM torrents as T2 JOIN tags as T1 ON T1.id = T2.id. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Which year has the most released song?
SELECT### Response: SELECT groupYear FROM torrents GROUP BY groupYear ORDER BY count(groupName) DESC LIMIT 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Which artist/group is most productive?
SELECT### Response: SELECT artist FROM torrents GROUP BY artist ORDER BY count(groupName) DESC LIMIT 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Which artist/group has the highest average download of songs?
SELECT### Response: SELECT artist FROM torrents GROUP BY artist ORDER BY avg(totalSnatched) DESC LIMIT 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Which year has the most CDs released?
SELECT### Response: SELECT groupYear FROM torrents GROUP BY groupYear ORDER BY count(groupName) DESC LIMIT 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Which CD has been downloaded the most times?
SELECT### Response: SELECT groupName FROM torrents ORDER BY totalSnatched DESC LIMIT 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Which kind of release type is the most popular?
SELECT### Response: SELECT releaseType FROM torrents GROUP BY releaseType ORDER BY sum(totalSnatched) DESC LIMIT 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Whose CDs sells best?
SELECT### Response: SELECT artist FROM torrents GROUP BY artist ORDER BY sum(totalSnatched) DESC LIMIT 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--What are the downloaded numbers and their release types?
SELECT### Response: SELECT sum(totalSnatched), releaseType FROM torrents GROUP BY releaseType. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--What are the downloaded numbers of 2000s and before 2000?
SELECT### Response: SELECT sum(totalSnatched) FROM torrents WHERE groupYear BETWEEN 2000 AND 2010 UNION SELECT sum(totalSnatched) FROM torrents WHERE groupYear < 2000. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--How many same release titles are there in the table?
SELECT### Response: SELECT count(*) FROM ( SELECT groupName FROM torrents GROUP BY groupName HAVING count(*) > 1 ). |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Which artist release the most CDs?
SELECT### Response: SELECT artist FROM torrents GROUP BY artist ORDER BY count(groupName) DESC LIMIT 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--How many downloads of ep and album respectively?
SELECT### Response: SELECT sum(totalSnatched) FROM torrents WHERE releaseType = "ep" UNION SELECT sum(totalSnatched) FROM torrents WHERE releaseType = "album". |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--What are the artist/groups that released only one CD?
SELECT### Response: SELECT artist FROM torrents GROUP BY artist HAVING count(*) = 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE torrents (
group_name,
total_snatched,
artist,
group_year,
release_type,
group_id,
id)
CREATE TABLE tags (
index,
id,
tag)
-- Using valid SQLite, answer the following questions for the tables provided above.
--What are the actors who have had releases after 2010?
SELECT### Response: SELECT artist FROM torrents WHERE groupYear > 2010 GROUP BY artist. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE betfront (
year,
datetime,
country,
competion,
match,
home_opening,
draw_opening,
away_opening,
home_closing,
draw_closing,
away_closing)
CREATE TABLE football data (
season,
datetime,
div,
country,
league,
referee,
home_team,
away_team,
fthg,
ftag,
ftr,
hthg,
htag,
htr,
psh,
psd,
psa,
b365h,
b365d,
b365a,
lbh,
lbd,
lba,
bwh,
bwd,
bwa)
-- Using valid SQLite, answer the following questions for the tables provided above.
--What are the Pinnacle odds for Arsenal winning matches?
SELECT### Response: SELECT PSH FROM football_data WHERE HomeTeam LIKE "%Arsenal%" AND FTR = "H" UNION SELECT PSA FROM football_data WHERE AwayTeam LIKE "%Arsenal%" AND FTR = "A". |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE betfront (
year,
datetime,
country,
competion,
match,
home_opening,
draw_opening,
away_opening,
home_closing,
draw_closing,
away_closing)
CREATE TABLE football data (
season,
datetime,
div,
country,
league,
referee,
home_team,
away_team,
fthg,
ftag,
ftr,
hthg,
htag,
htr,
psh,
psd,
psa,
b365h,
b365d,
b365a,
lbh,
lbd,
lba,
bwh,
bwd,
bwa)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Which matches in Spain did the away team win?
SELECT### Response: SELECT * FROM football_data WHERE Country = "Spain" AND FTR = "A". |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE betfront (
year,
datetime,
country,
competion,
match,
home_opening,
draw_opening,
away_opening,
home_closing,
draw_closing,
away_closing)
CREATE TABLE football data (
season,
datetime,
div,
country,
league,
referee,
home_team,
away_team,
fthg,
ftag,
ftr,
hthg,
htag,
htr,
psh,
psd,
psa,
b365h,
b365d,
b365a,
lbh,
lbd,
lba,
bwh,
bwd,
bwa)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Which Premier League matches ended in a draw in 2016?
SELECT### Response: SELECT * FROM football_data WHERE Season = "2016" AND FTR = "D" AND League = "Premier League". |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE betfront (
year,
datetime,
country,
competion,
match,
home_opening,
draw_opening,
away_opening,
home_closing,
draw_closing,
away_closing)
CREATE TABLE football data (
season,
datetime,
div,
country,
league,
referee,
home_team,
away_team,
fthg,
ftag,
ftr,
hthg,
htag,
htr,
psh,
psd,
psa,
b365h,
b365d,
b365a,
lbh,
lbd,
lba,
bwh,
bwd,
bwa)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Which matches had draw odds from Bet365 higher than 3?
SELECT### Response: SELECT * FROM football_data WHERE B365D > 3. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE betfront (
year,
datetime,
country,
competion,
match,
home_opening,
draw_opening,
away_opening,
home_closing,
draw_closing,
away_closing)
CREATE TABLE football data (
season,
datetime,
div,
country,
league,
referee,
home_team,
away_team,
fthg,
ftag,
ftr,
hthg,
htag,
htr,
psh,
psd,
psa,
b365h,
b365d,
b365a,
lbh,
lbd,
lba,
bwh,
bwd,
bwa)
-- Using valid SQLite, answer the following questions for the tables provided above.
--What were the closing odds for a draw in matches with VfB Stuttgart?
SELECT### Response: SELECT DRAW_CLOSING FROM betfront WHERE MATCH LIKE "%VfB Stuttgart%". |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE betfront (
year,
datetime,
country,
competion,
match,
home_opening,
draw_opening,
away_opening,
home_closing,
draw_closing,
away_closing)
CREATE TABLE football data (
season,
datetime,
div,
country,
league,
referee,
home_team,
away_team,
fthg,
ftag,
ftr,
hthg,
htag,
htr,
psh,
psd,
psa,
b365h,
b365d,
b365a,
lbh,
lbd,
lba,
bwh,
bwd,
bwa)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Which games had no goals scored at full time?
SELECT### Response: SELECT * FROM football_data WHERE (FTHG + FTAG) = 0. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE betfront (
year,
datetime,
country,
competion,
match,
home_opening,
draw_opening,
away_opening,
home_closing,
draw_closing,
away_closing)
CREATE TABLE football data (
season,
datetime,
div,
country,
league,
referee,
home_team,
away_team,
fthg,
ftag,
ftr,
hthg,
htag,
htr,
psh,
psd,
psa,
b365h,
b365d,
b365a,
lbh,
lbd,
lba,
bwh,
bwd,
bwa)
-- Using valid SQLite, answer the following questions for the tables provided above.
--What is the away team against Omiya Ardija in 2018?
SELECT### Response: SELECT AwayTeam FROM football_data WHERE HomeTeam = "Omiya Ardija" AND Season LIKE "%2018%". |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE betfront (
year,
datetime,
country,
competion,
match,
home_opening,
draw_opening,
away_opening,
home_closing,
draw_closing,
away_closing)
CREATE TABLE football data (
season,
datetime,
div,
country,
league,
referee,
home_team,
away_team,
fthg,
ftag,
ftr,
hthg,
htag,
htr,
psh,
psd,
psa,
b365h,
b365d,
b365a,
lbh,
lbd,
lba,
bwh,
bwd,
bwa)
-- Using valid SQLite, answer the following questions for the tables provided above.
--How many matches in Spain in 2010?
SELECT### Response: SELECT count(*) FROM football_data WHERE Season LIKE "%2010%" AND Country = "Spain". |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE betfront (
year,
datetime,
country,
competion,
match,
home_opening,
draw_opening,
away_opening,
home_closing,
draw_closing,
away_closing)
CREATE TABLE football data (
season,
datetime,
div,
country,
league,
referee,
home_team,
away_team,
fthg,
ftag,
ftr,
hthg,
htag,
htr,
psh,
psd,
psa,
b365h,
b365d,
b365a,
lbh,
lbd,
lba,
bwh,
bwd,
bwa)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Which matches has the highest draw opening so far?
SELECT### Response: SELECT MATCH FROM betfront ORDER BY DRAW_OPENING DESC LIMIT 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE betfront (
year,
datetime,
country,
competion,
match,
home_opening,
draw_opening,
away_opening,
home_closing,
draw_closing,
away_closing)
CREATE TABLE football data (
season,
datetime,
div,
country,
league,
referee,
home_team,
away_team,
fthg,
ftag,
ftr,
hthg,
htag,
htr,
psh,
psd,
psa,
b365h,
b365d,
b365a,
lbh,
lbd,
lba,
bwh,
bwd,
bwa)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Which year has most matches?
SELECT### Response: SELECT YEAR FROM betfront GROUP BY YEAR 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 betfront (
year,
datetime,
country,
competion,
match,
home_opening,
draw_opening,
away_opening,
home_closing,
draw_closing,
away_closing)
CREATE TABLE football data (
season,
datetime,
div,
country,
league,
referee,
home_team,
away_team,
fthg,
ftag,
ftr,
hthg,
htag,
htr,
psh,
psd,
psa,
b365h,
b365d,
b365a,
lbh,
lbd,
lba,
bwh,
bwd,
bwa)
-- Using valid SQLite, answer the following questions for the tables provided above.
--How many matches did Pinnacle have betting records?
SELECT### Response: SELECT count(*) FROM football_data WHERE PSH != "" AND PSD != "" AND PSA != "". |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE betfront (
year,
datetime,
country,
competion,
match,
home_opening,
draw_opening,
away_opening,
home_closing,
draw_closing,
away_closing)
CREATE TABLE football data (
season,
datetime,
div,
country,
league,
referee,
home_team,
away_team,
fthg,
ftag,
ftr,
hthg,
htag,
htr,
psh,
psd,
psa,
b365h,
b365d,
b365a,
lbh,
lbd,
lba,
bwh,
bwd,
bwa)
-- Using valid SQLite, answer the following questions for the tables provided above.
--How many matches did Bet365 gives higher home win odds than Pinnacle?
SELECT### Response: SELECT count(*) FROM football_data WHERE B365H > PSH. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE betfront (
year,
datetime,
country,
competion,
match,
home_opening,
draw_opening,
away_opening,
home_closing,
draw_closing,
away_closing)
CREATE TABLE football data (
season,
datetime,
div,
country,
league,
referee,
home_team,
away_team,
fthg,
ftag,
ftr,
hthg,
htag,
htr,
psh,
psd,
psa,
b365h,
b365d,
b365a,
lbh,
lbd,
lba,
bwh,
bwd,
bwa)
-- Using valid SQLite, answer the following questions for the tables provided above.
--How many games that the total number of goals exceed 5?
SELECT### Response: SELECT count(*) FROM football_data WHERE FTHG + FTAG > 5. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE betfront (
year,
datetime,
country,
competion,
match,
home_opening,
draw_opening,
away_opening,
home_closing,
draw_closing,
away_closing)
CREATE TABLE football data (
season,
datetime,
div,
country,
league,
referee,
home_team,
away_team,
fthg,
ftag,
ftr,
hthg,
htag,
htr,
psh,
psd,
psa,
b365h,
b365d,
b365a,
lbh,
lbd,
lba,
bwh,
bwd,
bwa)
-- Using valid SQLite, answer the following questions for the tables provided above.
--What is the highest home losing odds in Bet365 ever?
SELECT### Response: SELECT max(B365A) FROM football_data. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE betfront (
year,
datetime,
country,
competion,
match,
home_opening,
draw_opening,
away_opening,
home_closing,
draw_closing,
away_closing)
CREATE TABLE football data (
season,
datetime,
div,
country,
league,
referee,
home_team,
away_team,
fthg,
ftag,
ftr,
hthg,
htag,
htr,
psh,
psd,
psa,
b365h,
b365d,
b365a,
lbh,
lbd,
lba,
bwh,
bwd,
bwa)
-- Using valid SQLite, answer the following questions for the tables provided above.
--How many number of games ended in a 0-0 tie?
SELECT### Response: SELECT count(*) FROM football_data WHERE FTHG = 0 AND FTAG = 0. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE betfront (
year,
datetime,
country,
competion,
match,
home_opening,
draw_opening,
away_opening,
home_closing,
draw_closing,
away_closing)
CREATE TABLE football data (
season,
datetime,
div,
country,
league,
referee,
home_team,
away_team,
fthg,
ftag,
ftr,
hthg,
htag,
htr,
psh,
psd,
psa,
b365h,
b365d,
b365a,
lbh,
lbd,
lba,
bwh,
bwd,
bwa)
-- Using valid SQLite, answer the following questions for the tables provided above.
--How many league division does football_data database has?
SELECT### Response: SELECT count(Div) FROM football_data. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE betfront (
year,
datetime,
country,
competion,
match,
home_opening,
draw_opening,
away_opening,
home_closing,
draw_closing,
away_closing)
CREATE TABLE football data (
season,
datetime,
div,
country,
league,
referee,
home_team,
away_team,
fthg,
ftag,
ftr,
hthg,
htag,
htr,
psh,
psd,
psa,
b365h,
b365d,
b365a,
lbh,
lbd,
lba,
bwh,
bwd,
bwa)
-- Using valid SQLite, answer the following questions for the tables provided above.
--Do other leagues have referee name records outside of Scotland and England?
SELECT### Response: SELECT count(League) FROM football_data WHERE Country != "Scotland" and Country != "England" and Referee != "". |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE betfront (
year,
datetime,
country,
competion,
match,
home_opening,
draw_opening,
away_opening,
home_closing,
draw_closing,
away_closing)
CREATE TABLE football data (
season,
datetime,
div,
country,
league,
referee,
home_team,
away_team,
fthg,
ftag,
ftr,
hthg,
htag,
htr,
psh,
psd,
psa,
b365h,
b365d,
b365a,
lbh,
lbd,
lba,
bwh,
bwd,
bwa)
-- Using valid SQLite, answer the following questions for the tables provided above.
--What's the odds for draw on Bet365 for the game Swindon v.s. Millwall for 2016/2017 season?
SELECT### Response: SELECT B365D FROM football_data WHERE HomeTeam = "Swindon" and AwayTeam = "Millwall" and Season = "2016/2017". |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE table_train_206 (
"id",
"gender",
"pregnancy_or_lactation",
"systolic_blood_pressure_sbp",
"hematocrit_hct",
"diabetic",
"contraception",
"diastolic_blood_pressure_dbp",
"serum_creatinine",
"NOUSE"
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- hematocrit > 34 % in female and > 35 % in male ;
SELECT### Response: SELECT * FROM table_train_206 WHERE (hematocrit_hct > 35 AND gender = 'male') OR (hematocrit_hct > 34 AND gender = 'female'). |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE table_train_255 (
"id",
"ldl_cholesterol",
"hemoglobin_a1c_hba1c",
"body_weight",
"urine_albumin_to_creatinine_ratio_uacr",
"hba1c",
"body_mass_index_bmi",
"triglyceride_tg",
"age",
"NOUSE"
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- participant is 65 to 80 years of age.
SELECT### Response: SELECT * FROM table_train_255 WHERE age >= 65 AND age <= 80. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE table_train_97 (
"id",
"pulmonary_disease",
"systolic_blood_pressure_sbp",
"diabetic",
"psychiatric_disease",
"hematologic_disease",
"diastolic_blood_pressure_dbp",
"lung_disease",
"NOUSE"
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- pulmonary or lung disorders
SELECT### Response: SELECT * FROM table_train_97 WHERE pulmonary_disease = 1 OR lung_disease = 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE table_train_90 (
"id",
"gender",
"alzheimer",
"breast_cancer",
"smoking",
"heart_rate",
"age",
"NOUSE"
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- female who have had breast cancer.
SELECT### Response: SELECT * FROM table_train_90 WHERE gender = 'female' AND breast_cancer = 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE table_train_177 (
"id",
"hemoglobin_a1c_hba1c",
"renal_disease",
"diabetic",
"creatinine_clearance_cl",
"urine_protein",
"proteinuria",
"fasting_glucose",
"NOUSE"
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- proteinuria ( urine protein > 200 mg / dl ) or a creatinine > 2 mg / dl
SELECT### Response: SELECT * FROM table_train_177 WHERE proteinuria = 1 OR (urine_protein > 200 OR creatinine_clearance_cl > 2). |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE table_train_199 (
"id",
"t2dm",
"hemoglobin_a1c_hba1c",
"renal_disease",
"diabetic",
"hypoglycemia",
"diabetes",
"seizure_disorder",
"glaucoma",
"hypertension",
"age",
"NOUSE"
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- patients with type i diabetes mellitus or uncontrolled t2dm ( hba1c > 11 % )
SELECT### Response: SELECT * FROM table_train_199 WHERE diabetic = 'i' OR t2dm = 1 OR hemoglobin_a1c_hba1c > 11. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE table_train_232 (
"id",
"metastatic_cancer",
"hemoglobin_a1c_hba1c",
"diabetic",
"short_life_expectancy",
"body_mass_index_bmi",
"a1c",
"NOUSE"
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- hba1c < 8 %
SELECT### Response: SELECT * FROM table_train_232 WHERE hemoglobin_a1c_hba1c < 8. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE table_train_195 (
"id",
"gender",
"pregnancy_or_lactation",
"allergy_to_perflutren",
"heart_disease",
"body_mass_index_bmi",
"age",
"NOUSE"
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- male or female 20 _ 75 years of age inclusive.
SELECT### Response: SELECT * FROM table_train_195 WHERE (gender = 'male' OR gender = 'female') AND (age >= 20 AND age <= 75). |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE table_train_55 (
"id",
"ejection_fraction_ef",
"systolic_dysfunction",
"language",
"valvular_dysfunction",
"consent",
"heart_disease",
"left_bundle_branch_block",
"trauma",
"pericardial_disease",
"complete_fluid_challenge",
"receiving_vasopressor",
"pulmonary_hypertension",
"prisoners",
"heart_transplant",
"NOUSE"
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- patients unable to provide consent such as non english speaking patients or patient / health care proxy unable to give consent
SELECT### Response: SELECT * FROM table_train_55 WHERE consent = 0 OR language <> 'english'. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE table_train_68 (
"id",
"sequential_organ_failure_assessment_sofa",
"pregnancy_or_lactation",
"piro_predispose_infection_response_organ_dysfunction_score",
"systolic_blood_pressure_sbp",
"hypotension",
"age",
"lactate",
"NOUSE"
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- minors ( less than 18 years of age )
SELECT### Response: SELECT * FROM table_train_68 WHERE age < 18. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE table_train_275 (
"id",
"systolic_blood_pressure_sbp",
"hemoglobin_a1c_hba1c",
"hba1c",
"body_mass_index_bmi",
"triglyceride_tg",
"age",
"NOUSE"
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- age < 18 or > 80 years
SELECT### Response: SELECT * FROM table_train_275 WHERE age < 18 OR age > 80. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.