output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT MIN("total") FROM "medal_table" WHERE "gold"=0 AND "bronze">2 AND "silver">1;
## Task Generate a SQL query to answer the following question: `What is the lowest total amount of medals from countries with 0 gold medals, more than 2 bronze medals, and more than 1 silver medal?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medal_table" ( "rank" text, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest total amount of medals from countries with 0 gold medals, more than 2 bronze medals, and more than 1 silver medal?`: ```sql
SELECT SUM("silver") FROM "medal_table" WHERE "rank"='14' AND "total"<1;
## Task Generate a SQL query to answer the following question: `What is the total number of silver medals for countries of rank 14, with less than 1 total medals?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medal_table" ( "rank" text, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the total number of silver medals for countries of rank 14, with less than 1 total medals?`: ```sql
SELECT COUNT("total") FROM "tackles" WHERE "fumble_rec">0 AND "fumble_force"=0;
## Task Generate a SQL query to answer the following question: `How many tackles for the player with over 0 fumble recovries and 0 forced fumbles?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "tackles" ( "player" text, "solo" real, "total" real, "sacks" text, "fumble_force" real, "fumble_rec" real ); ### SQL Given the database schema, here is the SQL query that answers `How many tackles for the player with over 0 fumble recovries and 0 forced fumbles?`: ```sql
SELECT COUNT("fumble_force") FROM "tackles" WHERE "solo"<2 AND "player"='jim laney';
## Task Generate a SQL query to answer the following question: `How many forced fumbles for jim laney with under 2 solo tackles?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "tackles" ( "player" text, "solo" real, "total" real, "sacks" text, "fumble_force" real, "fumble_rec" real ); ### SQL Given the database schema, here is the SQL query that answers `How many forced fumbles for jim laney with under 2 solo tackles?`: ```sql
SELECT MAX("total") FROM "tackles" WHERE "solo">15;
## Task Generate a SQL query to answer the following question: `What is the high total for players with over 15 solo tackles?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "tackles" ( "player" text, "solo" real, "total" real, "sacks" text, "fumble_force" real, "fumble_rec" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the high total for players with over 15 solo tackles?`: ```sql
SELECT SUM("fumble_rec") FROM "tackles" WHERE "sacks"='0' AND "fumble_force"=0 AND "player"='scott gajos' AND "solo"<2;
## Task Generate a SQL query to answer the following question: `How many fumble recoveries for scott gajos with 0 forced fubmles, 0 sacks, and under 2 solo tackles?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "tackles" ( "player" text, "solo" real, "total" real, "sacks" text, "fumble_force" real, "fumble_rec" real ); ### SQL Given the database schema, here is the SQL query that answers `How many fumble recoveries for scott gajos with 0 forced fubmles, 0 sacks, and under 2 solo tackles?`: ```sql
SELECT "opponent" FROM "friendly" WHERE "time"='20:00 gmt' AND "ground"='camp nou';
## Task Generate a SQL query to answer the following question: `Who is the Opponent playing at 20:00 GMT at Camp Nou?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "friendly" ( "date" text, "time" text, "competition" text, "opponent" text, "ground" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the Opponent playing at 20:00 GMT at Camp Nou?`: ```sql
SELECT "time" FROM "friendly" WHERE "score"='3-2';
## Task Generate a SQL query to answer the following question: `What time was the match played with a score of 3-2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "friendly" ( "date" text, "time" text, "competition" text, "opponent" text, "ground" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `What time was the match played with a score of 3-2?`: ```sql
SELECT "ground" FROM "friendly" WHERE "opponent"='aston villa';
## Task Generate a SQL query to answer the following question: `On which ground did the team play Aston Villa?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "friendly" ( "date" text, "time" text, "competition" text, "opponent" text, "ground" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `On which ground did the team play Aston Villa?`: ```sql
SELECT "competition" FROM "friendly" WHERE "ground"='san siro' AND "time"='18:30 gmt';
## Task Generate a SQL query to answer the following question: `What kind of competition was it at San Siro at 18:30 GMT?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "friendly" ( "date" text, "time" text, "competition" text, "opponent" text, "ground" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `What kind of competition was it at San Siro at 18:30 GMT?`: ```sql
SELECT COUNT("decile") FROM "wellington_city" WHERE "name"='redwood school';
## Task Generate a SQL query to answer the following question: `What is the total number of decile for the redwood school locality?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "wellington_city" ( "name" text, "years" text, "gender" text, "locality" text, "authority" text, "decile" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the total number of decile for the redwood school locality?`: ```sql
SELECT "report" FROM "other_grands_prix" WHERE "circuit"='tripoli';
## Task Generate a SQL query to answer the following question: `Which report includes a Circuit of Tripoli?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "other_grands_prix" ( "name" text, "circuit" text, "date" text, "winning_driver" text, "winning_constructor" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Which report includes a Circuit of Tripoli?`: ```sql