text stringlengths 310 1.28k |
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "comparison_of_some_cameras_compatible_wi" (
"camera" text,
"sensor_resolution" text,
"sensor" text,
"output" text,
"cpu_usage" text,
"ir_le_ds" text
);
Question: What was the output with no IR LEDs?
<|assistant|>
SELECT "output" FROM "comparison_of_some_cameras_compatible_wi" WHERE "ir_le_ds"='no';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "comparison_of_some_cameras_compatible_wi" (
"camera" text,
"sensor_resolution" text,
"sensor" text,
"output" text,
"cpu_usage" text,
"ir_le_ds" text
);
Question: What sensor has a resolution of 640x480 with small CPU usage, jpeg compressed output and a camera of sony playstation eyetoy?
<|assistant|>
SELECT "sensor" FROM "comparison_of_some_cameras_compatible_wi" WHERE "sensor_resolution"='640x480' AND "cpu_usage"='small' AND "output"='jpeg compressed' AND "camera"='sony playstation eyetoy';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "diesel_multiple_units" (
"type" text,
"numbers" text,
"year_built" real,
"quantity_built" text,
"power_horsepower" real,
"max_speed_km_h" real
);
Question: What is the max speed of the unit with an 8+4 quantity built before 1971?
<|assistant|>
SELECT SUM("max_speed_km_h") FROM "diesel_multiple_units" WHERE "quantity_built"='8+4' AND "year_built"<1971;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "diesel_multiple_units" (
"type" text,
"numbers" text,
"year_built" real,
"quantity_built" text,
"power_horsepower" real,
"max_speed_km_h" real
);
Question: What is the numbers of the thn unit with a power greater than 220?
<|assistant|>
SELECT "numbers" FROM "diesel_multiple_units" WHERE "power_horsepower">220 AND "type"='thn';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "diesel_multiple_units" (
"type" text,
"numbers" text,
"year_built" real,
"quantity_built" text,
"power_horsepower" real,
"max_speed_km_h" real
);
Question: What is the power of the unit built after 1995?
<|assistant|>
SELECT SUM("power_horsepower") FROM "diesel_multiple_units" WHERE "year_built">1995;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"record" text,
"game_site" text,
"attendance" real
);
Question: Week larger than 6, and a Date of november 22, 1959 had what result?
<|assistant|>
SELECT "result" FROM "schedule" WHERE "week">6 AND "date"='november 22, 1959';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"record" text,
"game_site" text,
"attendance" real
);
Question: Result of w 21β7 had what average week?
<|assistant|>
SELECT AVG("week") FROM "schedule" WHERE "result"='w 21β7';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"record" text,
"game_site" text,
"attendance" real
);
Question: Date of november 29, 1959 had what lowest attendance?
<|assistant|>
SELECT MIN("attendance") FROM "schedule" WHERE "date"='november 29, 1959';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"record" text,
"game_site" text,
"attendance" real
);
Question: Week that has a Date of december 5, 1959 had what week?
<|assistant|>
SELECT "week" FROM "schedule" WHERE "date"='december 5, 1959';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule_and_results" (
"game" real,
"november" real,
"opponent" text,
"score" text,
"record" text
);
Question: Which Game has an Opponent of @ carolina hurricanes?
<|assistant|>
SELECT SUM("game") FROM "schedule_and_results" WHERE "opponent"='@ carolina hurricanes';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule_and_results" (
"game" real,
"november" real,
"opponent" text,
"score" text,
"record" text
);
Question: How many games have a November of 10?
<|assistant|>
SELECT COUNT("game") FROM "schedule_and_results" WHERE "november"=10;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule_and_results" (
"game" real,
"november" real,
"opponent" text,
"score" text,
"record" text
);
Question: Which Game has a November of 22?
<|assistant|>
SELECT SUM("game") FROM "schedule_and_results" WHERE "november"=22;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "chart_the_eight_wives" (
"year_of_marriage" real,
"name" text,
"her_age" real,
"his_age" real,
"num_of_children" real
);
Question: What is the mean year of marriage when her age was more than 19 and his age was 30?
<|assistant|>
SELECT AVG("year_of_marriage") FROM "chart_the_eight_wives" WHERE "her_age">19 AND "his_age"=30;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "chart_the_eight_wives" (
"year_of_marriage" real,
"name" text,
"her_age" real,
"his_age" real,
"num_of_children" real
);
Question: What is the lowest figure for her age when the year of marriage is before 1853, the number of children is less than 8, and the bride was Eliza Maria Partridge?
<|assistant|>
SELECT MIN("her_age") FROM "chart_the_eight_wives" WHERE "year_of_marriage"<1853 AND "num_of_children"<8 AND "name"='eliza maria partridge';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "chart_the_eight_wives" (
"year_of_marriage" real,
"name" text,
"her_age" real,
"his_age" real,
"num_of_children" real
);
Question: What is the total number of her age figures where his age is less than 33, the bride was diontha walker, and the number of children was less than 0?
<|assistant|>
SELECT SUM("her_age") FROM "chart_the_eight_wives" WHERE "his_age"<33 AND "name"='diontha walker' AND "num_of_children"<0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "torneio_rio_s_o_paulo" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
Question: How much Lost has an Against larger than 19, and a Drawn smaller than 1?
<|assistant|>
SELECT SUM("lost") FROM "torneio_rio_s_o_paulo" WHERE "against">19 AND "drawn"<1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "torneio_rio_s_o_paulo" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
Question: Which Played has a Lost of 3, and an Against of 23?
<|assistant|>
SELECT AVG("played") FROM "torneio_rio_s_o_paulo" WHERE "lost"=3 AND "against"=23;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "torneio_rio_s_o_paulo" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
Question: Which Played is the highest one that has an Against smaller than 18, and Points smaller than 10?
<|assistant|>
SELECT MAX("played") FROM "torneio_rio_s_o_paulo" WHERE "against"<18 AND "points"<10;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "torneio_rio_s_o_paulo" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
Question: Which Against is the highest one that has a Drawn larger than 1, and a Team of corinthians, and a Played smaller than 7?
<|assistant|>
SELECT MAX("against") FROM "torneio_rio_s_o_paulo" WHERE "drawn">1 AND "team"='corinthians' AND "played"<7;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"game" real,
"october" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
Question: What opponent has october less than 20, and 8 for points?
<|assistant|>
SELECT "opponent" FROM "regular_season" WHERE "october"<20 AND "points"=8;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "draft_picks" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team_league" text
);
Question: What position does Drew Callander play?
<|assistant|>
SELECT "position" FROM "draft_picks" WHERE "player"='drew callander';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "draft_picks" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team_league" text
);
Question: What round did Ray Kurpis play?
<|assistant|>
SELECT "round" FROM "draft_picks" WHERE "player"='ray kurpis';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "american_seafoods_company_fleet" (
"name" text,
"length" text,
"tonnage" real,
"built_by" text,
"year" real,
"engines" text,
"horsepowers" real,
"former_names" text
);
Question: Which Built by has a Name of northern jaeger?
<|assistant|>
SELECT "built_by" FROM "american_seafoods_company_fleet" WHERE "name"='northern jaeger';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "american_seafoods_company_fleet" (
"name" text,
"length" text,
"tonnage" real,
"built_by" text,
"year" real,
"engines" text,
"horsepowers" real,
"former_names" text
);
Question: How many Horsepowers have a Year smaller than 1974, and a Tonnage of 4437?
<|assistant|>
SELECT SUM("horsepowers") FROM "american_seafoods_company_fleet" WHERE "year"<1974 AND "tonnage"=4437;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
Question: When was the 2014 fifa world cup qualification?
<|assistant|>
SELECT "date" FROM "international_goals" WHERE "competition"='2014 fifa world cup qualification';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
Question: When was the date of an event at Tokyo venue?
<|assistant|>
SELECT "date" FROM "international_goals" WHERE "venue"='tokyo';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1980" (
"date" text,
"city" text,
"opponent" text,
"results" text,
"type_of_game" text
);
Question: What city did Yugoslavia play against Poland in?
<|assistant|>
SELECT "city" FROM "1980" WHERE "opponent"='poland';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1980" (
"date" text,
"city" text,
"opponent" text,
"results" text,
"type_of_game" text
);
Question: What day did Yugoslavia play Luxembourg?
<|assistant|>
SELECT "date" FROM "1980" WHERE "opponent"='luxembourg';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1980" (
"date" text,
"city" text,
"opponent" text,
"results" text,
"type_of_game" text
);
Question: What type of game was played in Ljubljana?
<|assistant|>
SELECT "type_of_game" FROM "1980" WHERE "city"='ljubljana';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1980" (
"date" text,
"city" text,
"opponent" text,
"results" text,
"type_of_game" text
);
Question: What's the result of the game played in Belgrade?
<|assistant|>
SELECT "results" FROM "1980" WHERE "city"='belgrade';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
Question: What was the score on March 23?
<|assistant|>
SELECT "score" FROM "regular_season" WHERE "date"='march 23';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
Question: When the Vancouver Canucks were visiting, what was the record when the score was 4-2?
<|assistant|>
SELECT "record" FROM "regular_season" WHERE "score"='4-2' AND "visitor"='vancouver canucks';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles_9_6_titles_3_runner_ups" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
Question: Which Partner has a Score of 6β7, 7β6, 6β7?
<|assistant|>
SELECT "partner" FROM "doubles_9_6_titles_3_runner_ups" WHERE "score"='6β7, 7β6, 6β7';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles_9_6_titles_3_runner_ups" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
Question: Which Score has a Date of 13 april 1997?
<|assistant|>
SELECT "score" FROM "doubles_9_6_titles_3_runner_ups" WHERE "date"='13 april 1997';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles_9_6_titles_3_runner_ups" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
Question: Which Partner has a Score of 7β6, 6β3?
<|assistant|>
SELECT "partner" FROM "doubles_9_6_titles_3_runner_ups" WHERE "score"='7β6, 6β3';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles_9_6_titles_3_runner_ups" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
Question: Which Date has a Tournament of bmw open?
<|assistant|>
SELECT "date" FROM "doubles_9_6_titles_3_runner_ups" WHERE "tournament"='bmw open';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles_9_6_titles_3_runner_ups" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
Question: Which Partner has a Tournament of catella swedish open?
<|assistant|>
SELECT "partner" FROM "doubles_9_6_titles_3_runner_ups" WHERE "tournament"='catella swedish open';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles_9_6_titles_3_runner_ups" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
Question: Which Date has a Surface of clay, and a Score of 6β3, 5β7, 2β6?
<|assistant|>
SELECT "date" FROM "doubles_9_6_titles_3_runner_ups" WHERE "surface"='clay' AND "score"='6β3, 5β7, 2β6';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "events" (
"date" text,
"race_name" text,
"location" text,
"uci_rating" text,
"winner" text,
"team" text
);
Question: Who was the winner of the tre valli varesine race?
<|assistant|>
SELECT "winner" FROM "events" WHERE "race_name"='tre valli varesine';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "events" (
"date" text,
"race_name" text,
"location" text,
"uci_rating" text,
"winner" text,
"team" text
);
Question: What is the date of the omloop van de vlaamse scheldeboorden race with a UCI rating of 1.1?
<|assistant|>
SELECT "date" FROM "events" WHERE "uci_rating"='1.1' AND "race_name"='omloop van de vlaamse scheldeboorden';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "events" (
"date" text,
"race_name" text,
"location" text,
"uci_rating" text,
"winner" text,
"team" text
);
Question: What is the date of the gp cittΓ di camaiore race?
<|assistant|>
SELECT "date" FROM "events" WHERE "race_name"='gp cittΓ di camaiore';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "events" (
"date" text,
"race_name" text,
"location" text,
"uci_rating" text,
"winner" text,
"team" text
);
Question: What is the UCI rating of the race in Italy with the progetto ciclismo alplast team?
<|assistant|>
SELECT "uci_rating" FROM "events" WHERE "location"='italy' AND "team"='progetto ciclismo alplast';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"record" text,
"game_site" text,
"attendance" real
);
Question: What is the date of the game being played at Schaeffer Stadium?
<|assistant|>
SELECT "date" FROM "schedule" WHERE "game_site"='schaeffer stadium';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "motorcycle_grand_prix_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"wins" real
);
Question: Which Points have a Year larger than 1966, and Wins larger than 1?
<|assistant|>
SELECT AVG("points") FROM "motorcycle_grand_prix_results" WHERE "year">1966 AND "wins">1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "motorcycle_grand_prix_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"wins" real
);
Question: Which Year is the lowest one that has Wins smaller than 0?
<|assistant|>
SELECT MIN("year") FROM "motorcycle_grand_prix_results" WHERE "wins"<0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "motorcycle_grand_prix_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"wins" real
);
Question: Which Points have Wins larger than 1?
<|assistant|>
SELECT AVG("points") FROM "motorcycle_grand_prix_results" WHERE "wins">1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "motorcycle_grand_prix_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"wins" real
);
Question: Which Wins have a Year of 1963, and a Class of 50cc?
<|assistant|>
SELECT AVG("wins") FROM "motorcycle_grand_prix_results" WHERE "year"=1963 AND "class"='50cc';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "liberec" (
"rank" real,
"name" text,
"nationality" text,
"1st_m" real,
"2nd_m" real,
"points" real,
"overall_wc_points_rank" text
);
Question: How many overall WC ponts (rank) did Anders Jacobsen get when his rank was smaller than 3?
<|assistant|>
SELECT "overall_wc_points_rank" FROM "liberec" WHERE "rank"<3 AND "name"='anders jacobsen';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "liberec" (
"rank" real,
"name" text,
"nationality" text,
"1st_m" real,
"2nd_m" real,
"points" real,
"overall_wc_points_rank" text
);
Question: Who had the highest rank with a 1st (m) of 129 and less than 255.6 points?
<|assistant|>
SELECT MAX("rank") FROM "liberec" WHERE "1st_m"=129 AND "points"<255.6;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "liberec" (
"rank" real,
"name" text,
"nationality" text,
"1st_m" real,
"2nd_m" real,
"points" real,
"overall_wc_points_rank" text
);
Question: Who had the lowest 1st (m), ranked lower than 8, with an overall WC points (rank) of 369 (16) with more than 258.2 points?
<|assistant|>
SELECT MIN("1st_m") FROM "liberec" WHERE "rank"<8 AND "overall_wc_points_rank"='369 (16)' AND "points">258.2;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "leaders" (
"rank" real,
"player" text,
"country" text,
"earnings" real,
"wins" real
);
Question: What is the player from Australia's rank with more than 16 wins?
<|assistant|>
SELECT COUNT("rank") FROM "leaders" WHERE "wins">16 AND "country"='australia';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "leaders" (
"rank" real,
"player" text,
"country" text,
"earnings" real,
"wins" real
);
Question: What is the lowest rank of a player with earnings under $11,936,443 and more than 16 wins?
<|assistant|>
SELECT MIN("rank") FROM "leaders" WHERE "earnings"<'11,936,443' AND "wins">16;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "leaders" (
"rank" real,
"player" text,
"country" text,
"earnings" real,
"wins" real
);
Question: What is the highest earnings of a player with more than 19 wins?
<|assistant|>
SELECT MAX("earnings") FROM "leaders" WHERE "wins">19;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "roller_coasters" (
"name" text,
"style" text,
"opened" real,
"manufacturer" text,
"themed_area" text
);
Question: Which average Opened has a Manufacturer of vekoma?
<|assistant|>
SELECT AVG("opened") FROM "roller_coasters" WHERE "manufacturer"='vekoma';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "roller_coasters" (
"name" text,
"style" text,
"opened" real,
"manufacturer" text,
"themed_area" text
);
Question: Which Opened is the highest one that has a Themed Area of aerial park, and a Manufacturer of zamperla?
<|assistant|>
SELECT MAX("opened") FROM "roller_coasters" WHERE "themed_area"='aerial park' AND "manufacturer"='zamperla';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "roller_coasters" (
"name" text,
"style" text,
"opened" real,
"manufacturer" text,
"themed_area" text
);
Question: Which Themed Area has a Name of troublesome trucks runaway coaster?
<|assistant|>
SELECT "themed_area" FROM "roller_coasters" WHERE "name"='troublesome trucks runaway coaster';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "roller_coasters" (
"name" text,
"style" text,
"opened" real,
"manufacturer" text,
"themed_area" text
);
Question: Which Manufacturer has a Style of steel sit down, and an Opened larger than 2008?
<|assistant|>
SELECT "manufacturer" FROM "roller_coasters" WHERE "style"='steel sit down' AND "opened">2008;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_round_selections" (
"pick" real,
"player" text,
"team" text,
"position" text,
"school" text
);
Question: What position has a pick less than 25 for the university of california?
<|assistant|>
SELECT "position" FROM "first_round_selections" WHERE "pick"<25 AND "school"='university of california';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_round_selections" (
"pick" real,
"player" text,
"team" text,
"position" text,
"school" text
);
Question: What is the pick number for tulane university?
<|assistant|>
SELECT SUM("pick") FROM "first_round_selections" WHERE "school"='tulane university';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_round_selections" (
"pick" real,
"player" text,
"team" text,
"position" text,
"school" text
);
Question: What is the pick number for the kansas city royals?
<|assistant|>
SELECT SUM("pick") FROM "first_round_selections" WHERE "team"='kansas city royals';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_round_selections" (
"pick" real,
"player" text,
"team" text,
"position" text,
"school" text
);
Question: What is the average Pick for the Pasco, Wa school?
<|assistant|>
SELECT AVG("pick") FROM "first_round_selections" WHERE "school"='pasco, wa';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "release_history" (
"date" text,
"label" text,
"region" text,
"format" text,
"catalog" text
);
Question: What Label released a CD single in 1993?
<|assistant|>
SELECT "label" FROM "release_history" WHERE "format"='cd single' AND "date"='1993';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "december" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
Question: Where was home with a record of 7β5β2?
<|assistant|>
SELECT "home" FROM "december" WHERE "record"='7β5β2';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "december" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
Question: On what date was the record 8β6β3?
<|assistant|>
SELECT "date" FROM "december" WHERE "record"='8β6β3';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "december" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
Question: What was the score when Pittsburgh was the visitor?
<|assistant|>
SELECT "score" FROM "december" WHERE "visitor"='pittsburgh';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "december" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
Question: On what date were the NY Rangers home?
<|assistant|>
SELECT "date" FROM "december" WHERE "home"='ny rangers';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "december" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
Question: Which visitor had a record of 7β5β3?
<|assistant|>
SELECT "visitor" FROM "december" WHERE "record"='7β5β3';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "december" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
Question: Who was home when Detroit was visiting with a score of 4 β 1?
<|assistant|>
SELECT "home" FROM "december" WHERE "visitor"='detroit' AND "score"='4 β 1';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "release_history" (
"region" text,
"date" real,
"label" text,
"format" text,
"catalog" text
);
Question: What is the earliest date with Great Expectations label with LP format?
<|assistant|>
SELECT MIN("date") FROM "release_history" WHERE "label"='great expectations' AND "format"='lp';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "release_history" (
"region" text,
"date" real,
"label" text,
"format" text,
"catalog" text
);
Question: What format was used for Mobil 1?
<|assistant|>
SELECT "format" FROM "release_history" WHERE "catalog"='mobil 1';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "under_23" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
Question: what team won the friendly match
<|assistant|>
SELECT "result" FROM "under_23" WHERE "competition"='friendly match';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "wins_by_club" (
"rank" real,
"club" text,
"wins" real,
"last_win" real,
"runner_up" real,
"last_losing_final" text
);
Question: Which Runner-up has a Last win smaller than 1998, and Wins of 1, and a Rank larger than 13?
<|assistant|>
SELECT COUNT("runner_up") FROM "wins_by_club" WHERE "last_win"<1998 AND "wins"=1 AND "rank">13;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "wins_by_club" (
"rank" real,
"club" text,
"wins" real,
"last_win" real,
"runner_up" real,
"last_losing_final" text
);
Question: How many Last wins have a Club of mansfield town, and Wins smaller than 1?
<|assistant|>
SELECT COUNT("last_win") FROM "wins_by_club" WHERE "club"='mansfield town' AND "wins"<1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "formula_one_entries_for_brm_type_15" (
"date" text,
"event" text,
"circuit" text,
"driver" text,
"race" text
);
Question: Which Driver has a Date of 16th september 1951, and a Race of dns?
<|assistant|>
SELECT "driver" FROM "formula_one_entries_for_brm_type_15" WHERE "date"='16th september 1951' AND "race"='dns';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "formula_one_entries_for_brm_type_15" (
"date" text,
"event" text,
"circuit" text,
"driver" text,
"race" text
);
Question: At which race did reg parnell win the goodwood trophy?
<|assistant|>
SELECT "race" FROM "formula_one_entries_for_brm_type_15" WHERE "event"='goodwood trophy' AND "driver"='reg parnell';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "formula_one_entries_for_brm_type_15" (
"date" text,
"event" text,
"circuit" text,
"driver" text,
"race" text
);
Question: Which Race has a Date of 31st may 1953, and an Event of grand prix de l'albigeois final?
<|assistant|>
SELECT "race" FROM "formula_one_entries_for_brm_type_15" WHERE "date"='31st may 1953' AND "event"='grand prix de l''albigeois final';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2009_final_statistics" (
"rank" real,
"airport" text,
"code_iata_icao" text,
"total_cargo_metric_tonnes" real,
"pct_change" text
);
Question: What's the highest rank of a PVG/ZSPD Code (IATA/ICAO) airport with a total cargo less than 2,543,394 metric tonnes?
<|assistant|>
SELECT MAX("rank") FROM "2009_final_statistics" WHERE "code_iata_icao"='pvg/zspd' AND "total_cargo_metric_tonnes"<'2,543,394';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2009_final_statistics" (
"rank" real,
"airport" text,
"code_iata_icao" text,
"total_cargo_metric_tonnes" real,
"pct_change" text
);
Question: What's the average total cargo in metric tonnes that has an 11.8% Change?
<|assistant|>
SELECT AVG("total_cargo_metric_tonnes") FROM "2009_final_statistics" WHERE "pct_change"='11.8%';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2009_final_statistics" (
"rank" real,
"airport" text,
"code_iata_icao" text,
"total_cargo_metric_tonnes" real,
"pct_change" text
);
Question: What is the highest rank of Tokyo International Airport?
<|assistant|>
SELECT MAX("rank") FROM "2009_final_statistics" WHERE "airport"='tokyo international airport';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "group_2" (
"games" real,
"drawn" real,
"lost" real,
"points_difference" text,
"points" real
);
Question: Where the games are smaller than 5 and the points are 6, what is the average lost?
<|assistant|>
SELECT AVG("lost") FROM "group_2" WHERE "points"=6 AND "games"<5;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "roster" (
"order" real,
"built" text,
"serial_numbers" text,
"quantity" real,
"1st_no" text
);
Question: with build 5/69-6/69 what's the order?
<|assistant|>
SELECT SUM("order") FROM "roster" WHERE "built"='5/69-6/69';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_17_10_7" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
Question: Which Outcome has a Score of 6β2, 6β2?
<|assistant|>
SELECT "outcome" FROM "singles_17_10_7" WHERE "score"='6β2, 6β2';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_17_10_7" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
Question: Which Date has an Outcome of winner, and a Score of 7β5, 6β4?
<|assistant|>
SELECT "date" FROM "singles_17_10_7" WHERE "outcome"='winner' AND "score"='7β5, 6β4';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_17_10_7" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
Question: Which Tournament has an Outcome of winner, and a Surface of clay, and a Score of 6β4, 6β1?
<|assistant|>
SELECT "tournament" FROM "singles_17_10_7" WHERE "outcome"='winner' AND "surface"='clay' AND "score"='6β4, 6β1';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_17_10_7" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
Question: What was the outcome in mari andersson's tournament?
<|assistant|>
SELECT "outcome" FROM "singles_17_10_7" WHERE "opponent"='mari andersson';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
Question: What's the loss of the game with the opponent of the Nationals with a score of 7-1?
<|assistant|>
SELECT "loss" FROM "game_log" WHERE "opponent"='nationals' AND "score"='7-1';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
Question: Which opponent has a record of 70-52?
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "record"='70-52';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
Question: What is the attendance of the game that has the opponent of The Nationals with a record of 68-51?
<|assistant|>
SELECT SUM("attendance") FROM "game_log" WHERE "opponent"='nationals' AND "record"='68-51';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
Question: What's the attendance of the game with a score of 5-4?
<|assistant|>
SELECT "attendance" FROM "game_log" WHERE "score"='5-4';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
Question: Who's the opponent of the game with the record 64-51?
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "record"='64-51';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"game" real,
"february" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
Question: Who were the opponents in games before number 54?
<|assistant|>
SELECT "opponent" FROM "regular_season" WHERE "game"<54;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "final_leaderboard" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" text
);
Question: what was the score of bert yancey
<|assistant|>
SELECT "score" FROM "final_leaderboard" WHERE "player"='bert yancey';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "current_fleet" (
"length_fuel" text,
"model" text,
"year_built" text,
"quantity" real,
"floor_styling" text,
"wheelchair_access" text
);
Question: What is the Length/Fuel of the bus with a Quantity of 30?
<|assistant|>
SELECT "length_fuel" FROM "current_fleet" WHERE "quantity"=30;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "current_fleet" (
"length_fuel" text,
"model" text,
"year_built" text,
"quantity" real,
"floor_styling" text,
"wheelchair_access" text
);
Question: What is the Length/Fuel of the bus built between 2000-2003 with a high Floor Styling?
<|assistant|>
SELECT "length_fuel" FROM "current_fleet" WHERE "floor_styling"='high' AND "year_built"='2000-2003';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "thomas_buffel_international_goals" (
"goal" real,
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
Question: In what Venue was the game with a Friendly Competition and 1 Goal played?
<|assistant|>
SELECT "venue" FROM "thomas_buffel_international_goals" WHERE "competition"='friendly' AND "goal"=1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" real
);
Question: What is the amount of money that a +5 to par with a score of 76-69-70-70=285?
<|assistant|>
SELECT COUNT("money") FROM "final_round" WHERE "to_par"='+5' AND "score"='76-69-70-70=285';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" real
);
Question: What is the name of the player with a 71-69-71-69=280 score?
<|assistant|>
SELECT "player" FROM "final_round" WHERE "score"='71-69-71-69=280';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "february" (
"game_num" real,
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text,
"points" real
);
Question: Which average Game # has a Home of san jose, and Points smaller than 71?
<|assistant|>
SELECT AVG("game_num") FROM "february" WHERE "home"='san jose' AND "points"<71;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "february" (
"game_num" real,
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text,
"points" real
);
Question: Which Home has a Game # of 59?
<|assistant|>
SELECT "home" FROM "february" WHERE "game_num"=59;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "february" (
"game_num" real,
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text,
"points" real
);
Question: Which Visitor has a Game # larger than 62, and a Date of february 25?
<|assistant|>
SELECT "visitor" FROM "february" WHERE "game_num">62 AND "date"='february 25';<|endoftext|> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.