text stringlengths 310 1.28k |
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
Question: Which Year is the highest one that has a Venue of edmonton, canada?
<|assistant|>
SELECT MAX("year") FROM "achievements" WHERE "venue"='edmonton, canada';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
Question: Which Position has a Competition of world championships, and a Year larger than 1997?
<|assistant|>
SELECT "position" FROM "achievements" WHERE "competition"='world championships' AND "year">1997;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
Question: Which Venue has a Notes of heptathlon, and a Year of 1991?
<|assistant|>
SELECT "venue" FROM "achievements" WHERE "notes"='heptathlon' AND "year"=1991;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pro_wrestling_zero1_version_disputed_bra" (
"wrestler" text,
"reign" text,
"days_held" text,
"location" text,
"event" text
);
Question: What days held has noiz as the wrestler?
<|assistant|>
SELECT "days_held" FROM "pro_wrestling_zero1_version_disputed_bra" WHERE "wrestler"='noiz';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pro_wrestling_zero1_version_disputed_bra" (
"wrestler" text,
"reign" text,
"days_held" text,
"location" text,
"event" text
);
Question: What location has tatsuhito takaiwa as the wrestler?
<|assistant|>
SELECT "location" FROM "pro_wrestling_zero1_version_disputed_bra" WHERE "wrestler"='tatsuhito takaiwa';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pro_wrestling_zero1_version_disputed_bra" (
"wrestler" text,
"reign" text,
"days_held" text,
"location" text,
"event" text
);
Question: What event has 8 as the days held?
<|assistant|>
SELECT "event" FROM "pro_wrestling_zero1_version_disputed_bra" WHERE "days_held"='8';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pro_wrestling_zero1_version_disputed_bra" (
"wrestler" text,
"reign" text,
"days_held" text,
"location" text,
"event" text
);
Question: What event has unknown as the days held.?
<|assistant|>
SELECT "event" FROM "pro_wrestling_zero1_version_disputed_bra" WHERE "days_held"='unknown';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2011" (
"model" text,
"engine" text,
"displacement" text,
"valvetrain" text,
"fuel_system" text,
"max_power_at_rpm" text,
"max_torque_at_rpm" text
);
Question: What is the Displacement of the Iveco F1CE3481E Engine?
<|assistant|>
SELECT "displacement" FROM "2011" WHERE "engine"='iveco f1ce3481e';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2011" (
"model" text,
"engine" text,
"displacement" text,
"valvetrain" text,
"fuel_system" text,
"max_power_at_rpm" text,
"max_torque_at_rpm" text
);
Question: What is the Displacement of the 180 Multijet Power/3.0 HDI Model?
<|assistant|>
SELECT "displacement" FROM "2011" WHERE "model"='180 multijet power/3.0 hdi';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2011" (
"model" text,
"engine" text,
"displacement" text,
"valvetrain" text,
"fuel_system" text,
"max_power_at_rpm" text,
"max_torque_at_rpm" text
);
Question: What is the Valvetrain of the Diesel Engines Model?
<|assistant|>
SELECT "valvetrain" FROM "2011" WHERE "model"='diesel engines';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" real,
"finish" text
);
Question: Year(s) won of 1994 , 1997 has what average total?
<|assistant|>
SELECT AVG("total") FROM "made_the_cut" WHERE "year_s_won"='1994 , 1997';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" real,
"finish" text
);
Question: Player of corey pavin, and a To par larger than 5 has what average total?
<|assistant|>
SELECT AVG("total") FROM "made_the_cut" WHERE "player"='corey pavin' AND "to_par">5;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" real,
"finish" text
);
Question: Total smaller than 285, and a To par larger than 1 belongs to what player?
<|assistant|>
SELECT "player" FROM "made_the_cut" WHERE "total"<285 AND "to_par">1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" real,
"finish" text
);
Question: Total larger than 285, and a Finish of t30 belongs to what player?
<|assistant|>
SELECT "player" FROM "made_the_cut" WHERE "total">285 AND "finish"='t30';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
Question: Which player for a team with an 18-20 record had the most rebounds in a game?
<|assistant|>
SELECT "high_rebounds" FROM "game_log" WHERE "record"='18-20';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "islands_km" (
"rank" real,
"island_s_name" text,
"area_sqmi" real,
"area_km_2" real,
"location" text,
"population_2000" text
);
Question: What is the total area of Kruzof island?
<|assistant|>
SELECT COUNT("area_km_2") FROM "islands_km" WHERE "island_s_name"='kruzof island';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "external_links" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
Question: Name the total number of frequency Mhz with class of d and call sign of k201bm and ERP W less than 74
<|assistant|>
SELECT COUNT("frequency_m_hz") FROM "external_links" WHERE "class"='d' AND "call_sign"='k201bm' AND "erp_w"<74;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "external_links" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
Question: Name the least frequency Mhz with call sign of k202ag
<|assistant|>
SELECT MIN("frequency_m_hz") FROM "external_links" WHERE "call_sign"='k202ag';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "external_links" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
Question: Name the class with call sign of k220cp
<|assistant|>
SELECT "class" FROM "external_links" WHERE "call_sign"='k220cp';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule_and_results" (
"game" real,
"december" real,
"opponent" text,
"score" text,
"record" text
);
Question: What is the Winnipeg Jets record?
<|assistant|>
SELECT "record" FROM "schedule_and_results" WHERE "opponent"='winnipeg jets';<|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's the stadium on November 8?
<|assistant|>
SELECT "home" FROM "regular_season" WHERE "date"='november 8';<|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: Who was the visitor on March 17?
<|assistant|>
SELECT "visitor" FROM "regular_season" WHERE "date"='march 17';<|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's the score for Toronto Maple Leafs on November 10?
<|assistant|>
SELECT "score" FROM "regular_season" WHERE "home"='toronto maple leafs' AND "date"='november 10';<|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: Who was the visitor on October 31?
<|assistant|>
SELECT "visitor" FROM "regular_season" WHERE "date"='october 31';<|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,
"rank" text,
"wins" real
);
Question: What is the rank associated with 0 wins and a 350cc class?
<|assistant|>
SELECT "rank" FROM "motorcycle_grand_prix_results" WHERE "wins"=0 AND "class"='350cc';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "women" (
"athlete" text,
"country" text,
"run_1" real,
"run_2" real,
"run_3" real
);
Question: What is the run 2 of the athlete from Australia with a run 1 less than 53.75?
<|assistant|>
SELECT "run_2" FROM "women" WHERE "country"='australia' AND "run_1"<53.75;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "women" (
"athlete" text,
"country" text,
"run_1" real,
"run_2" real,
"run_3" real
);
Question: What is the run 2 of athlete Maria Orlova from Russia?
<|assistant|>
SELECT SUM("run_2") FROM "women" WHERE "country"='russia' AND "athlete"='maria orlova';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "women" (
"athlete" text,
"country" text,
"run_1" real,
"run_2" real,
"run_3" real
);
Question: What is the run 3 of the athlete with a run 1 more than 53.75 and a run 2 less than 52.91?
<|assistant|>
SELECT SUM("run_3") FROM "women" WHERE "run_1">53.75 AND "run_2"<52.91;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "women" (
"athlete" text,
"country" text,
"run_1" real,
"run_2" real,
"run_3" real
);
Question: What is the lowest run 3 an athlete with a run 2 less than 53.72 and a run 1 of 53.1 has?
<|assistant|>
SELECT MIN("run_3") FROM "women" WHERE "run_2"<53.72 AND "run_1"=53.1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "women" (
"athlete" text,
"country" text,
"run_1" real,
"run_2" real,
"run_3" real
);
Question: What is the lowest run 2 of the athlete with a run 1 of 52.44 and a run 3 less than 52.35?
<|assistant|>
SELECT MIN("run_2") FROM "women" WHERE "run_1"=52.44 AND "run_3"<52.35;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "standings" (
"position" real,
"driver" text,
"wins" real,
"poles" real,
"top_5_s" real,
"points" real
);
Question: How many points are associated with over 1 top 5, 1 win, over 0 poles, and andrew ranger as the driver?
<|assistant|>
SELECT MAX("points") FROM "standings" WHERE "top_5_s">1 AND "wins"=1 AND "poles">0 AND "driver"='andrew ranger';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "standings" (
"position" real,
"driver" text,
"wins" real,
"poles" real,
"top_5_s" real,
"points" real
);
Question: How many points are associated with 0 poles?
<|assistant|>
SELECT COUNT("points") FROM "standings" WHERE "poles"<0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "standings" (
"position" real,
"driver" text,
"wins" real,
"poles" real,
"top_5_s" real,
"points" real
);
Question: How many wins are associated with a position of under 6, over 8 top 5s, and 1793 points?
<|assistant|>
SELECT SUM("wins") FROM "standings" WHERE "position"<6 AND "top_5_s"=8 AND "points"=1793;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "march" (
"game_num" real,
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text,
"points" real
);
Question: What is the first game that has a home team of Detroit?
<|assistant|>
SELECT MIN("game_num") FROM "march" WHERE "home"='detroit';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "march" (
"game_num" real,
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text,
"points" real
);
Question: Which home team has higher than 92 points?
<|assistant|>
SELECT "home" FROM "march" WHERE "points">92;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "test_centuries_by_nightwatchmen" (
"player" text,
"team" text,
"score" text,
"versus" text,
"year" real
);
Question: what team's score is 101?
<|assistant|>
SELECT "team" FROM "test_centuries_by_nightwatchmen" WHERE "score"='101';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "test_centuries_by_nightwatchmen" (
"player" text,
"team" text,
"score" text,
"versus" text,
"year" real
);
Question: what team played against zimbabwe in 1999?
<|assistant|>
SELECT "team" FROM "test_centuries_by_nightwatchmen" WHERE "year"=1999 AND "versus"='zimbabwe';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "test_centuries_by_nightwatchmen" (
"player" text,
"team" text,
"score" text,
"versus" text,
"year" real
);
Question: what is the team that played in 2006?
<|assistant|>
SELECT "team" FROM "test_centuries_by_nightwatchmen" WHERE "year"=2006;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "highest_average_points_per_race_entered" (
"driver" text,
"entries" real,
"points" real,
"average_points_per_race_entered" real,
"average_pre_2010" real
);
Question: What is the lowest amount of points driver Romain Grosjean, who has an average pre-2010 less than 0, has?
<|assistant|>
SELECT MIN("points") FROM "highest_average_points_per_race_entered" WHERE "driver"='romain grosjean' AND "average_pre_2010"<0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "highest_average_points_per_race_entered" (
"driver" text,
"entries" real,
"points" real,
"average_points_per_race_entered" real,
"average_pre_2010" real
);
Question: What is the average number of entries driver Mark Webber, who has more than 1014.5 points, has?
<|assistant|>
SELECT AVG("entries") FROM "highest_average_points_per_race_entered" WHERE "driver"='mark webber' AND "points">1014.5;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "highest_average_points_per_race_entered" (
"driver" text,
"entries" real,
"points" real,
"average_points_per_race_entered" real,
"average_pre_2010" real
);
Question: What is the highest average points per race of the driver with less than 969 points and an average pre-2010 less than 0?
<|assistant|>
SELECT MAX("average_points_per_race_entered") FROM "highest_average_points_per_race_entered" WHERE "points"<969 AND "average_pre_2010"<0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "highest_average_points_per_race_entered" (
"driver" text,
"entries" real,
"points" real,
"average_points_per_race_entered" real,
"average_pre_2010" real
);
Question: What is the lowest average points per race entered of driver kimi räikkönen, who has more than 194 entries?
<|assistant|>
SELECT MIN("average_points_per_race_entered") FROM "highest_average_points_per_race_entered" WHERE "driver"='kimi räikkönen' AND "entries">194;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule_and_results" (
"game" real,
"january" real,
"opponent" text,
"score" text,
"record" text
);
Question: What is the first game played against the Chicago Black Hawks?
<|assistant|>
SELECT MIN("game") FROM "schedule_and_results" WHERE "opponent"='chicago black hawks';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "premier_division" (
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real
);
Question: Name the opponent for 9 november 1991
<|assistant|>
SELECT "opponent" FROM "premier_division" WHERE "date"='9 november 1991';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "cfl_teams_with_one_or_no_wins_in_a_seaso" (
"season" real,
"team" text,
"games" real,
"wins" real,
"losses" real,
"ties" real
);
Question: Which Losses is the lowest one that has Wins smaller than 0?
<|assistant|>
SELECT MIN("losses") FROM "cfl_teams_with_one_or_no_wins_in_a_seaso" WHERE "wins"<0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "cfl_teams_with_one_or_no_wins_in_a_seaso" (
"season" real,
"team" text,
"games" real,
"wins" real,
"losses" real,
"ties" real
);
Question: Which Losses have a Season larger than 1941, and a Team of hamilton wildcats, and Ties of 0?
<|assistant|>
SELECT "losses" FROM "cfl_teams_with_one_or_no_wins_in_a_seaso" WHERE "season">1941 AND "team"='hamilton wildcats' AND "ties"=0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "cfl_teams_with_one_or_no_wins_in_a_seaso" (
"season" real,
"team" text,
"games" real,
"wins" real,
"losses" real,
"ties" real
);
Question: Which Season has Ties smaller than 1, and a Team of vancouver grizzlies, and Wins smaller than 1?
<|assistant|>
SELECT SUM("season") FROM "cfl_teams_with_one_or_no_wins_in_a_seaso" WHERE "ties"<1 AND "team"='vancouver grizzlies' AND "wins"<1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "cfl_teams_with_one_or_no_wins_in_a_seaso" (
"season" real,
"team" text,
"games" real,
"wins" real,
"losses" real,
"ties" real
);
Question: How many Ties have Wins smaller than 1, and Games of 6, and Losses of 6, and a Season larger than 1941?
<|assistant|>
SELECT COUNT("ties") FROM "cfl_teams_with_one_or_no_wins_in_a_seaso" WHERE "wins"<1 AND "games"=6 AND "losses"=6 AND "season">1941;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "cfl_teams_with_one_or_no_wins_in_a_seaso" (
"season" real,
"team" text,
"games" real,
"wins" real,
"losses" real,
"ties" real
);
Question: Which Wins have a Team of winnipeg blue bombers, and a Season larger than 1964?
<|assistant|>
SELECT AVG("wins") FROM "cfl_teams_with_one_or_no_wins_in_a_seaso" WHERE "team"='winnipeg blue bombers' AND "season">1964;<|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: What engine class is associated with a year after 1985 and over 0 wins?
<|assistant|>
SELECT "class" FROM "motorcycle_grand_prix_results" WHERE "year">1985 AND "wins">0;<|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,
"save" text
);
Question: Which opponent has a loss of trout (7-4)?
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "loss"='trout (7-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,
"save" text
);
Question: Which opponent has a save of smith (22)?
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "save"='smith (22)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: How much Gold has a Bronze larger than 1, and a Silver larger than 2?
<|assistant|>
SELECT COUNT("gold") FROM "medal_table" WHERE "bronze">1 AND "silver">2;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: Which Total has a Nation of japan (jpn), and a Silver smaller than 1?
<|assistant|>
SELECT AVG("total") FROM "medal_table" WHERE "nation"='japan (jpn)' AND "silver"<1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pga_tour_wins_13" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
Question: What is the margin of victory in WGC-Accenture Match Play Championship?
<|assistant|>
SELECT "margin_of_victory" FROM "pga_tour_wins_13" WHERE "tournament"='wgc-accenture match play championship';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pga_tour_wins_13" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
Question: On what date was Nick Price the runner-up?
<|assistant|>
SELECT "date" FROM "pga_tour_wins_13" WHERE "runner_s_up"='nick price';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pga_tour_wins_13" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
Question: What is the margin of victory for Nick Price as a runner-up?
<|assistant|>
SELECT "margin_of_victory" FROM "pga_tour_wins_13" WHERE "runner_s_up"='nick price';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pga_tour_wins_13" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
Question: What is the margin of victory for PGA Championship?
<|assistant|>
SELECT "margin_of_victory" FROM "pga_tour_wins_13" WHERE "tournament"='pga championship';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pga_tour_wins_13" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
Question: On what date was the winning score –20 (68-67-65-64=264)?
<|assistant|>
SELECT "date" FROM "pga_tour_wins_13" WHERE "winning_score"='–20 (68-67-65-64=264)';<|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: Which player was D past Round 3?
<|assistant|>
SELECT "player" FROM "draft_picks" WHERE "position"='d' AND "round">3;<|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: Which Round was F picked?
<|assistant|>
SELECT "round" FROM "draft_picks" WHERE "position"='f';<|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 is Ryan Russell?
<|assistant|>
SELECT "position" FROM "draft_picks" WHERE "player"='ryan russell';<|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 country does Round 4 come from?
<|assistant|>
SELECT "nationality" FROM "draft_picks" WHERE "round"=4;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "playoffs" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"series" text
);
Question: Which opponent was present on April 14?
<|assistant|>
SELECT "opponent" FROM "playoffs" WHERE "date"='april 14';<|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,
"save" text
);
Question: what team lost on april 15
<|assistant|>
SELECT "loss" FROM "game_log" WHERE "date"='april 15';<|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,
"save" text
);
Question: what team played on april 21
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "date"='april 21';<|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,
"save" text
);
Question: what team scored on april 10
<|assistant|>
SELECT "score" FROM "game_log" WHERE "date"='april 10';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "preliminary_card" (
"weight_division" text,
"winner" text,
"loser" text,
"method" text,
"round" real,
"time" text
);
Question: Who lost with a time of 0:58?
<|assistant|>
SELECT "loser" FROM "preliminary_card" WHERE "time"='0:58';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "preliminary_card" (
"weight_division" text,
"winner" text,
"loser" text,
"method" text,
"round" real,
"time" text
);
Question: What is the average number of rounds for winner Rafael Cavalcante?
<|assistant|>
SELECT AVG("round") FROM "preliminary_card" WHERE "winner"='rafael cavalcante';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "preliminary_card" (
"weight_division" text,
"winner" text,
"loser" text,
"method" text,
"round" real,
"time" text
);
Question: What win method has a time of 2:32?
<|assistant|>
SELECT "method" FROM "preliminary_card" WHERE "time"='2:32';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "double_double_bonus" (
"hand" text,
"1_credit" text,
"2_credits" text,
"3_credits" text,
"4_credits" text,
"5_credits" text
);
Question: If Four aces yields 800 for 5 credits, what would the result be for 1 Credit?
<|assistant|>
SELECT "1_credit" FROM "double_double_bonus" WHERE "5_credits"='800' AND "hand"='four aces';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "world_championship_group_c_denmark" (
"games" real,
"drawn" real,
"lost" real,
"points_difference" text,
"points" real
);
Question: What is the sum of points values that are associated with 0 losses and more than 8 games?
<|assistant|>
SELECT SUM("points") FROM "world_championship_group_c_denmark" WHERE "lost"=0 AND "games">8;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "world_championship_group_c_denmark" (
"games" real,
"drawn" real,
"lost" real,
"points_difference" text,
"points" real
);
Question: What is the fewest losses associated with more than 13 points and fewer than 8 games?
<|assistant|>
SELECT MIN("lost") FROM "world_championship_group_c_denmark" WHERE "points">13 AND "games"<8;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "world_championship_group_c_denmark" (
"games" real,
"drawn" real,
"lost" real,
"points_difference" text,
"points" real
);
Question: What is the difference associated with more than 2 points, fewer than 3 losses, and fewer than 1 draw?
<|assistant|>
SELECT "points_difference" FROM "world_championship_group_c_denmark" WHERE "points">2 AND "lost"<3 AND "drawn"<1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "world_championship_group_c_denmark" (
"games" real,
"drawn" real,
"lost" real,
"points_difference" text,
"points" real
);
Question: What is the fewest number of points associated with more than 8 games?
<|assistant|>
SELECT MIN("points") FROM "world_championship_group_c_denmark" WHERE "games">8;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1921_1930" (
"title" text,
"date" text,
"theatre" text,
"role" text,
"dance_partner" text,
"director" text,
"lyrics" text,
"music" text
);
Question: Which title did richard kolner play?
<|assistant|>
SELECT "title" FROM "1921_1930" WHERE "role"='richard kolner';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1921_1930" (
"title" text,
"date" text,
"theatre" text,
"role" text,
"dance_partner" text,
"director" text,
"lyrics" text,
"music" text
);
Question: Which Title has a Dance Partner of adele astaire, and Lyrics of ira gershwin, and a Director of felix edwardes?
<|assistant|>
SELECT "title" FROM "1921_1930" WHERE "dance_partner"='adele astaire' AND "lyrics"='ira gershwin' AND "director"='felix edwardes';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1921_1930" (
"title" text,
"date" text,
"theatre" text,
"role" text,
"dance_partner" text,
"director" text,
"lyrics" text,
"music" text
);
Question: Which Role has a Theatre of globe, and a Music of jerome kern?
<|assistant|>
SELECT "role" FROM "1921_1930" WHERE "theatre"='globe' AND "music"='jerome kern';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "proposed" (
"rank" real,
"name" text,
"height_ft_m" text,
"year_est" text,
"city" text
);
Question: what name was on the year 2012
<|assistant|>
SELECT "name" FROM "proposed" WHERE "year_est"='2012';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "house_of_habsburg_lorraine_1765_1918" (
"name" text,
"birth" text,
"marriage" text,
"became_duchess" text,
"ceased_to_be_duchess" text,
"death" text,
"spouse" text
);
Question: Which member of house of Habsburg-Lorraine had the spouse Charles II?
<|assistant|>
SELECT "name" FROM "house_of_habsburg_lorraine_1765_1918" WHERE "spouse"='charles ii';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "house_of_habsburg_lorraine_1765_1918" (
"name" text,
"birth" text,
"marriage" text,
"became_duchess" text,
"ceased_to_be_duchess" text,
"death" text,
"spouse" text
);
Question: What is the marriage date for the Habsburg-Lorraine house member who died 29 December 1829?
<|assistant|>
SELECT "marriage" FROM "house_of_habsburg_lorraine_1765_1918" WHERE "death"='29 december 1829';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "house_of_habsburg_lorraine_1765_1918" (
"name" text,
"birth" text,
"marriage" text,
"became_duchess" text,
"ceased_to_be_duchess" text,
"death" text,
"spouse" text
);
Question: When did the duchess who became duchess on 7/8 April 1766 cease to be duchess?
<|assistant|>
SELECT "ceased_to_be_duchess" FROM "house_of_habsburg_lorraine_1765_1918" WHERE "became_duchess"='7/8 april 1766';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "house_of_habsburg_lorraine_1765_1918" (
"name" text,
"birth" text,
"marriage" text,
"became_duchess" text,
"ceased_to_be_duchess" text,
"death" text,
"spouse" text
);
Question: What is the date of death of the duchess born on 30 October 1797?
<|assistant|>
SELECT "death" FROM "house_of_habsburg_lorraine_1765_1918" WHERE "birth"='30 october 1797';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "house_of_habsburg_lorraine_1765_1918" (
"name" text,
"birth" text,
"marriage" text,
"became_duchess" text,
"ceased_to_be_duchess" text,
"death" text,
"spouse" text
);
Question: What is the birth date of the duchess who married on 1 May 1844?
<|assistant|>
SELECT "birth" FROM "house_of_habsburg_lorraine_1765_1918" WHERE "marriage"='1 may 1844';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nba_draft" (
"round" real,
"pick" real,
"player" text,
"nationality" text,
"school_club_team" text
);
Question: What is the highest numbered pick from round 7?
<|assistant|>
SELECT MAX("pick") FROM "nba_draft" WHERE "round"=7;<|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 Played has an Against larger than 11, and a Team of botafogo, and a Position smaller than 2?
<|assistant|>
SELECT COUNT("played") FROM "torneio_rio_s_o_paulo" WHERE "against">11 AND "team"='botafogo' AND "position"<2;<|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 average Drawn has Points smaller than 14, and a Lost smaller than 4, and a Played larger than 9?
<|assistant|>
SELECT AVG("drawn") FROM "torneio_rio_s_o_paulo" WHERE "points"<14 AND "lost"<4 AND "played">9;<|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 lowest one that has a Team of vasco da gama, and an Against smaller than 11?
<|assistant|>
SELECT MIN("played") FROM "torneio_rio_s_o_paulo" WHERE "team"='vasco da gama' AND "against"<11;<|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 larger than 4, and a Team of américa, and Points smaller than 5?
<|assistant|>
SELECT SUM("played") FROM "torneio_rio_s_o_paulo" WHERE "lost">4 AND "team"='américa' AND "points"<5;<|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 Lost has a Position of 3, and a Drawn larger than 3?
<|assistant|>
SELECT SUM("lost") FROM "torneio_rio_s_o_paulo" WHERE "position"=3 AND "drawn">3;<|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 a Drawn larger than 1, and Points smaller than 14, and an Against larger than 10?
<|assistant|>
SELECT COUNT("lost") FROM "torneio_rio_s_o_paulo" WHERE "drawn">1 AND "points"<14 AND "against">10;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_6_2_titles_4_runners_up" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
Question: What tournament has yvonne vermaak as the opponent?
<|assistant|>
SELECT "tournament" FROM "singles_6_2_titles_4_runners_up" WHERE "opponent"='yvonne vermaak';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_6_2_titles_4_runners_up" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
Question: What outcome has yvonne vermaak as the opponent?
<|assistant|>
SELECT "outcome" FROM "singles_6_2_titles_4_runners_up" WHERE "opponent"='yvonne vermaak';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_6_2_titles_4_runners_up" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
Question: What is the outcome for the Hershey tournament?
<|assistant|>
SELECT "outcome" FROM "singles_6_2_titles_4_runners_up" WHERE "tournament"='hershey';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"save" text
);
Question: Who played against Save Of Ni Fu-Deh?
<|assistant|>
SELECT "opponent" FROM "regular_season" WHERE "save"='ni fu-deh';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"save" text
);
Question: What's the loss of who has a Save of Miguel Saladin and played against Chinatrust Whales?
<|assistant|>
SELECT "loss" FROM "regular_season" WHERE "opponent"='chinatrust whales' AND "save"='miguel saladin';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"save" text
);
Question: Who's the opponent when Diegomar Markwell is the loss?
<|assistant|>
SELECT "opponent" FROM "regular_season" WHERE "loss"='diegomar markwell';<|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" text,
"record" text
);
Question: what game had a score of 86-71
<|assistant|>
SELECT "attendance" FROM "game_log" WHERE "record"='86-71';<|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" text,
"record" text
);
Question: what game took place on september 14
<|assistant|>
SELECT "record" FROM "game_log" WHERE "date"='september 14';<|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" text,
"record" text
);
Question: what game had an attendance of 21,629
<|assistant|>
SELECT "record" FROM "game_log" WHERE "attendance"='21,629';<|endoftext|> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.