text
stringlengths 310
1.28k
|
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: How many bronze medals for West Germany having a total more than 2?
<|assistant|>
SELECT COUNT("bronze") FROM "medals_table" WHERE "total">2 AND "nation"='west germany';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the amount of silver for rank 11 having less than 0 gold?
<|assistant|>
SELECT MIN("silver") FROM "medals_table" WHERE "rank"='11' AND "gold"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What rank is Bulgaria with less than 3 silver and more than 1 bronze?
<|assistant|>
SELECT "rank" FROM "medals_table" WHERE "silver"<3 AND "bronze">1 AND "nation"='bulgaria';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "classification_leadership_by_stage" (
"stage" text,
"winner" text,
"general_classification" text,
"points_classification" text,
"mountains_classification" text,
"intergiro_classification" text,
"trofeo_fast_team" text,
"trofeo_super_team" text
);
Question: What is the mountains classification when stage is 17?
<|assistant|>
SELECT "mountains_classification" FROM "classification_leadership_by_stage" WHERE "stage"='17';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "classification_leadership_by_stage" (
"stage" text,
"winner" text,
"general_classification" text,
"points_classification" text,
"mountains_classification" text,
"intergiro_classification" text,
"trofeo_fast_team" text,
"trofeo_super_team" text
);
Question: Who was the winner when points classification is Robbie Mcewen, and a Mountains classification is José Rujano?
<|assistant|>
SELECT "winner" FROM "classification_leadership_by_stage" WHERE "points_classification"='robbie mcewen' AND "mountains_classification"='josé rujano';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "classification_leadership_by_stage" (
"stage" text,
"winner" text,
"general_classification" text,
"points_classification" text,
"mountains_classification" text,
"intergiro_classification" text,
"trofeo_fast_team" text,
"trofeo_super_team" text
);
Question: What is the Trofeo Fast Team when stage is 19?
<|assistant|>
SELECT "trofeo_fast_team" FROM "classification_leadership_by_stage" WHERE "stage"='19';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "classification_leadership_by_stage" (
"stage" text,
"winner" text,
"general_classification" text,
"points_classification" text,
"mountains_classification" text,
"intergiro_classification" text,
"trofeo_fast_team" text,
"trofeo_super_team" text
);
Question: What is the points classification when the Intergiro classification is Sven Krauß, and the mountains classification is koldo gil, Trofeo Super Team is Liquigas-Bianchi, and stage is 9?
<|assistant|>
SELECT "points_classification" FROM "classification_leadership_by_stage" WHERE "intergiro_classification"='sven krauß' AND "mountains_classification"='koldo gil' AND "trofeo_super_team"='liquigas-bianchi' AND "stage"='9';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "classification_leadership_by_stage" (
"stage" text,
"winner" text,
"general_classification" text,
"points_classification" text,
"mountains_classification" text,
"intergiro_classification" text,
"trofeo_fast_team" text,
"trofeo_super_team" text
);
Question: What is the Intergiro classification when the points classification is Paolo Bettini, Trofeo Super Team is Davitamon-Lotto, and the Mountains classification is José Rujano?
<|assistant|>
SELECT "intergiro_classification" FROM "classification_leadership_by_stage" WHERE "points_classification"='paolo bettini' AND "trofeo_super_team"='davitamon-lotto' AND "mountains_classification"='josé rujano';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "classification_leadership_by_stage" (
"stage" text,
"winner" text,
"general_classification" text,
"points_classification" text,
"mountains_classification" text,
"intergiro_classification" text,
"trofeo_fast_team" text,
"trofeo_super_team" text
);
Question: What is the Stage when the points classification is Danilo Di Luca, Mountains classification is José Rujano, and general classification is Danilo Di Luca?
<|assistant|>
SELECT "stage" FROM "classification_leadership_by_stage" WHERE "points_classification"='danilo di luca' AND "mountains_classification"='josé rujano' AND "general_classification"='danilo di luca';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "c" (
"township" text,
"county" text,
"pop_2010" real,
"land_sqmi" real,
"water_sqmi" real,
"latitude" real,
"longitude" real,
"geo_id" real,
"ansi_code" real
);
Question: What is the average GEO ID with a latitude less than 46.57958, a latitude of -102.109898 and more than 35.99 square miles of land?
<|assistant|>
SELECT AVG("geo_id") FROM "c" WHERE "latitude"<46.57958 AND "longitude"=-102.109898 AND "land_sqmi">35.99;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "c" (
"township" text,
"county" text,
"pop_2010" real,
"land_sqmi" real,
"water_sqmi" real,
"latitude" real,
"longitude" real,
"geo_id" real,
"ansi_code" real
);
Question: What GEO ID has a longitude of -102.693028?
<|assistant|>
SELECT "geo_id" FROM "c" WHERE "longitude"=-102.693028;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "c" (
"township" text,
"county" text,
"pop_2010" real,
"land_sqmi" real,
"water_sqmi" real,
"latitude" real,
"longitude" real,
"geo_id" real,
"ansi_code" real
);
Question: What is the highest latitude when there are more than 0.518 square miles of water, a longitude less than -99.830606, and a population of 18?
<|assistant|>
SELECT MAX("latitude") FROM "c" WHERE "water_sqmi">0.518 AND "longitude"<-99.830606 AND "pop_2010"=18;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_1" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" real
);
Question: What is the average lane for Australia?
<|assistant|>
SELECT AVG("lane") FROM "semifinal_1" WHERE "nationality"='australia';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_1" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" real
);
Question: What is the highest rank for Josefin Lillhage?
<|assistant|>
SELECT MAX("rank") FROM "semifinal_1" WHERE "name"='josefin lillhage';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fixtures" (
"final" text,
"date" text,
"home_team" text,
"score" text,
"away_team" text,
"attendance" real,
"stadium" text
);
Question: What was the attendance for the final quarter (1)?
<|assistant|>
SELECT "attendance" FROM "fixtures" WHERE "final"='quarter (1)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fixtures" (
"final" text,
"date" text,
"home_team" text,
"score" text,
"away_team" text,
"attendance" real,
"stadium" text
);
Question: What stadium had the score 1 - 1 dodd 38'?
<|assistant|>
SELECT "stadium" FROM "fixtures" WHERE "score"='1 - 1 dodd 38''';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
Question: What method was used in the Pride 17 event?
<|assistant|>
SELECT "method" FROM "mixed_martial_arts_record" WHERE "event"='pride 17';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_tallest_buildings" (
"rank" real,
"name" text,
"height" text,
"highest_floor" real,
"city" text,
"primary_use" text
);
Question: What is the Rank of the building that has a Highest floor larger than 50?
<|assistant|>
SELECT "rank" FROM "list_of_tallest_buildings" WHERE "highest_floor">50;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "preliminary" (
"rank" real,
"country" text,
"athlete" text,
"technical" real,
"free" real,
"total" real
);
Question: what is the most free when the total is 81.167 and the rank is higher than 23?
<|assistant|>
SELECT MAX("free") FROM "preliminary" WHERE "total"=81.167 AND "rank">23;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "floppy_disk_physical_characteristics_cap" (
"size" text,
"density" text,
"tracks" real,
"coercivity" text,
"unformatted_capacity_per_side" text
);
Question: How many tracks have an unformatted capacity per side of 2000kb?
<|assistant|>
SELECT COUNT("tracks") FROM "floppy_disk_physical_characteristics_cap" WHERE "unformatted_capacity_per_side"='2000kb';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "floppy_disk_physical_characteristics_cap" (
"size" text,
"density" text,
"tracks" real,
"coercivity" text,
"unformatted_capacity_per_side" text
);
Question: What is the unformatted capacity per side if the size is 8in?
<|assistant|>
SELECT "unformatted_capacity_per_side" FROM "floppy_disk_physical_characteristics_cap" WHERE "size"='8in';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "floppy_disk_physical_characteristics_cap" (
"size" text,
"density" text,
"tracks" real,
"coercivity" text,
"unformatted_capacity_per_side" text
);
Question: How many tracks have a single density?
<|assistant|>
SELECT COUNT("tracks") FROM "floppy_disk_physical_characteristics_cap" WHERE "density"='single';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "absentee_cardinals" (
"elector" text,
"place_of_birth" text,
"cardinalatial_title" text,
"elevated" text,
"elevator" text
);
Question: What's listed for Elevatated that has Cardinalatial title of Priest of SS. XII Apostoli?
<|assistant|>
SELECT "elevated" FROM "absentee_cardinals" WHERE "cardinalatial_title"='priest of ss. xii apostoli';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "absentee_cardinals" (
"elector" text,
"place_of_birth" text,
"cardinalatial_title" text,
"elevated" text,
"elevator" text
);
Question: What Elector has the Place of birth of San Severino?
<|assistant|>
SELECT "elector" FROM "absentee_cardinals" WHERE "place_of_birth"='san severino';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "absentee_cardinals" (
"elector" text,
"place_of_birth" text,
"cardinalatial_title" text,
"elevated" text,
"elevator" text
);
Question: What's the Cardinalatial Title has the Elevated of December 18, 1182, the Place of birth of Lucca, and the Electo rof Pandolfo?
<|assistant|>
SELECT "cardinalatial_title" FROM "absentee_cardinals" WHERE "elevated"='december 18, 1182' AND "place_of_birth"='lucca' AND "elector"='pandolfo';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "absentee_cardinals" (
"elector" text,
"place_of_birth" text,
"cardinalatial_title" text,
"elevated" text,
"elevator" text
);
Question: What's listed for the Elevated with a Cardinalatial title of Priest of S. Eusebio and Archbishop of Benevento?
<|assistant|>
SELECT "elevated" FROM "absentee_cardinals" WHERE "cardinalatial_title"='priest of s. eusebio and archbishop of benevento';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "absentee_cardinals" (
"elector" text,
"place_of_birth" text,
"cardinalatial_title" text,
"elevated" text,
"elevator" text
);
Question: What Elector has the Place of Birth listed as Bavaria?
<|assistant|>
SELECT "elector" FROM "absentee_cardinals" WHERE "place_of_birth"='bavaria';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "appearances_and_goals" (
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" real,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"total_apps" text,
"total_goals" real
);
Question: What are the total apps that have 41 as the League apps, with total goals greater than 1?
<|assistant|>
SELECT "total_apps" FROM "appearances_and_goals" WHERE "league_apps"='41' AND "total_goals">1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "appearances_and_goals" (
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" real,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"total_apps" text,
"total_goals" real
);
Question: What are the average league goals that have 2 (1) as the total apps?
<|assistant|>
SELECT AVG("league_goals") FROM "appearances_and_goals" WHERE "total_apps"='2 (1)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "appearances_and_goals" (
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" real,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"total_apps" text,
"total_goals" real
);
Question: What is the highest league goals that have barry endean as the name, wirh FA cup apps greater than 0?
<|assistant|>
SELECT MAX("league_goals") FROM "appearances_and_goals" WHERE "name"='barry endean' AND "fa_cup_apps">0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "former_members" (
"school" text,
"city" text,
"team_name" text,
"county" text,
"year_joined" text,
"year_left" text
);
Question: Which school left in 1968 and has the team name of Panthers?
<|assistant|>
SELECT "school" FROM "former_members" WHERE "team_name"='panthers' AND "year_left"='1968';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "former_members" (
"school" text,
"city" text,
"team_name" text,
"county" text,
"year_joined" text,
"year_left" text
);
Question: What year did a team from North Dearborn leave?
<|assistant|>
SELECT "year_left" FROM "former_members" WHERE "school"='north dearborn';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "former_members" (
"school" text,
"city" text,
"team_name" text,
"county" text,
"year_joined" text,
"year_left" text
);
Question: Which city has a school of North Vernon and a county of 40 Jennings?
<|assistant|>
SELECT "city" FROM "former_members" WHERE "county"='40 jennings' AND "school"='north vernon';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "former_members" (
"school" text,
"city" text,
"team_name" text,
"county" text,
"year_joined" text,
"year_left" text
);
Question: What year did a school from Jennings County join?
<|assistant|>
SELECT "year_joined" FROM "former_members" WHERE "school"='jennings county';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "former_members" (
"school" text,
"city" text,
"team_name" text,
"county" text,
"year_joined" text,
"year_left" text
);
Question: Which school are the Red Devils from?
<|assistant|>
SELECT "school" FROM "former_members" WHERE "team_name"='red devils';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "former_members" (
"school" text,
"city" text,
"team_name" text,
"county" text,
"year_joined" text,
"year_left" text
);
Question: Which school comes from Brookville?
<|assistant|>
SELECT "school" FROM "former_members" WHERE "city"='brookville';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_1" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" real
);
Question: What's the lowest rank of Lane 3?
<|assistant|>
SELECT MIN("rank") FROM "semifinal_1" WHERE "lane"=3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_1" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" real
);
Question: What's the highest lane of rank 4 with a time less than 24.72?
<|assistant|>
SELECT MAX("lane") FROM "semifinal_1" WHERE "time"<24.72 AND "rank"=4;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_1" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" real
);
Question: What's the time of Britta Steffen in a lane less than 4?
<|assistant|>
SELECT SUM("time") FROM "semifinal_1" WHERE "lane"<4 AND "name"='britta steffen';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_1" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" real
);
Question: What's the lowest rank of the United States with a time less than 24.63?
<|assistant|>
SELECT MIN("rank") FROM "semifinal_1" WHERE "nationality"='united states' AND "time"<24.63;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "radio" (
"actor" text,
"character" text,
"soap_opera" text,
"years" text,
"duration" text
);
Question: What's the duration of the Archers with Norman Painting as an actor?
<|assistant|>
SELECT "duration" FROM "radio" WHERE "soap_opera"='the archers' AND "actor"='norman painting';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "radio" (
"actor" text,
"character" text,
"soap_opera" text,
"years" text,
"duration" text
);
Question: What's the duration of the Archers with Pauline Seville acting?
<|assistant|>
SELECT "duration" FROM "radio" WHERE "soap_opera"='the archers' AND "actor"='pauline seville';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "radio" (
"actor" text,
"character" text,
"soap_opera" text,
"years" text,
"duration" text
);
Question: Who's the actor for the Archers having a character of Martha Woodford?
<|assistant|>
SELECT "actor" FROM "radio" WHERE "soap_opera"='the archers' AND "character"='martha woodford';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "radio" (
"actor" text,
"character" text,
"soap_opera" text,
"years" text,
"duration" text
);
Question: Who's the character when Margot Boyd was acting?
<|assistant|>
SELECT "character" FROM "radio" WHERE "actor"='margot boyd';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_4" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: What were the notes for the time of 6:34.51?
<|assistant|>
SELECT "notes" FROM "heat_4" WHERE "time"='6:34.51';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_4" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: What is the rank for the rowers with the time of 6:24.35?
<|assistant|>
SELECT "rank" FROM "heat_4" WHERE "time"='6:24.35';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_4" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: Which rowers represented portugal and had notes of r?
<|assistant|>
SELECT "rowers" FROM "heat_4" WHERE "notes"='r' AND "country"='portugal';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_4" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: Which rowers represented the country of portugal?
<|assistant|>
SELECT "rowers" FROM "heat_4" WHERE "country"='portugal';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "career_statistics" (
"season" real,
"series" text,
"team" text,
"races" real,
"wins" real,
"poles" real,
"podiums" real,
"points" text,
"position" text
);
Question: what is the average races when points is 9 and poles is less than 0?
<|assistant|>
SELECT AVG("races") FROM "career_statistics" WHERE "points"='9' AND "poles"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "career_statistics" (
"season" real,
"series" text,
"team" text,
"races" real,
"wins" real,
"poles" real,
"podiums" real,
"points" text,
"position" text
);
Question: what is the series when wins is less than 3, points is 9 and podiums is 1?
<|assistant|>
SELECT "series" FROM "career_statistics" WHERE "wins"<3 AND "points"='9' AND "podiums"=1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "career_statistics" (
"season" real,
"series" text,
"team" text,
"races" real,
"wins" real,
"poles" real,
"podiums" real,
"points" text,
"position" text
);
Question: how many times is races more than 14, position is 9th and wins less than 0?
<|assistant|>
SELECT COUNT("season") FROM "career_statistics" WHERE "races">14 AND "position"='9th' AND "wins"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "winners" (
"event" text,
"date" text,
"location" text,
"winning_skip" text,
"runner_up_skip" text
);
Question: Who was the runner-up during the Mac Ice Classic?
<|assistant|>
SELECT "runner_up_skip" FROM "winners" WHERE "event"='mac ice classic';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "winners" (
"event" text,
"date" text,
"location" text,
"winning_skip" text,
"runner_up_skip" text
);
Question: What's the date when Stu Harris was the Runner-up?
<|assistant|>
SELECT "date" FROM "winners" WHERE "runner_up_skip"='stu harris';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "winners" (
"event" text,
"date" text,
"location" text,
"winning_skip" text,
"runner_up_skip" text
);
Question: What's the location of the Ramada Perth Masters event?
<|assistant|>
SELECT "location" FROM "winners" WHERE "event"='ramada perth masters';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "winners" (
"event" text,
"date" text,
"location" text,
"winning_skip" text,
"runner_up_skip" text
);
Question: What's the location of the National event with Kevin Martin winning?
<|assistant|>
SELECT "location" FROM "winners" WHERE "winning_skip"='kevin martin' AND "event"='the national';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "winners" (
"event" text,
"date" text,
"location" text,
"winning_skip" text,
"runner_up_skip" text
);
Question: What's the event that happened in Gander, Newfoundland and Labrador with Randy Ferbey runner-up?
<|assistant|>
SELECT "event" FROM "winners" WHERE "runner_up_skip"='randy ferbey' AND "location"='gander, newfoundland and labrador';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "winners" (
"event" text,
"date" text,
"location" text,
"winning_skip" text,
"runner_up_skip" text
);
Question: What's the location of the National event?
<|assistant|>
SELECT "location" FROM "winners" WHERE "event"='the national';<|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,
"attendance" real,
"record" text,
"arena" text,
"points" real
);
Question: Which Arena has a Date of october 10?
<|assistant|>
SELECT "arena" FROM "regular_season" WHERE "date"='october 10';<|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,
"attendance" real,
"record" text,
"arena" text,
"points" real
);
Question: Which Attendance has a Score of 4–3, and Points smaller than 5?
<|assistant|>
SELECT MAX("attendance") FROM "regular_season" WHERE "score"='4–3' AND "points"<5;<|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,
"attendance" real,
"record" text,
"arena" text,
"points" real
);
Question: Which Attendance has an Arena of arrowhead pond of anaheim, and Points smaller than 5?
<|assistant|>
SELECT "attendance" FROM "regular_season" WHERE "arena"='arrowhead pond of anaheim' AND "points"<5;<|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,
"attendance" real,
"record" text,
"arena" text,
"points" real
);
Question: How much Attendance has an Arena of arrowhead pond of anaheim, and Points of 5?
<|assistant|>
SELECT SUM("attendance") FROM "regular_season" WHERE "arena"='arrowhead pond of anaheim' AND "points"=5;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1960s" (
"country" text,
"1960" real,
"1961" real,
"1962" real,
"1963" real,
"1964" real,
"1965" real,
"1966" real,
"1967" real,
"1968" real,
"1969" real
);
Question: How much 1969 has a 1967 smaller than 0.73, and a 1964 larger than 0.07?
<|assistant|>
SELECT COUNT("1969") FROM "1960s" WHERE "1967"<0.73 AND "1964">0.07;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1960s" (
"country" text,
"1960" real,
"1961" real,
"1962" real,
"1963" real,
"1964" real,
"1965" real,
"1966" real,
"1967" real,
"1968" real,
"1969" real
);
Question: Which 1964 has a Country of united states, and a 1969 smaller than 7.3?
<|assistant|>
SELECT MIN("1964") FROM "1960s" WHERE "country"='united states' AND "1969"<7.3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1960s" (
"country" text,
"1960" real,
"1961" real,
"1962" real,
"1963" real,
"1964" real,
"1965" real,
"1966" real,
"1967" real,
"1968" real,
"1969" real
);
Question: Which 1965 has a 1962 of 0.35000000000000003, and a 1967 smaller than 0.53?
<|assistant|>
SELECT MIN("1965") FROM "1960s" WHERE "1962"=0.35000000000000003 AND "1967"<0.53;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "england" (
"player" text,
"int_l_debut" text,
"year" text,
"cross_code_debut" text,
"date" text
);
Question: What is Bev Risman's Cross Code Debut?
<|assistant|>
SELECT "cross_code_debut" FROM "england" WHERE "player"='bev risman';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "england" (
"player" text,
"int_l_debut" text,
"year" text,
"cross_code_debut" text,
"date" text
);
Question: What is the Date of RL Test v Wales Int'l Debut?
<|assistant|>
SELECT "date" FROM "england" WHERE "int_l_debut"='rl test v wales';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "england" (
"player" text,
"int_l_debut" text,
"year" text,
"cross_code_debut" text,
"date" text
);
Question: What is the Player with a Cross Code Debut of RL Test GB v France?
<|assistant|>
SELECT "player" FROM "england" WHERE "cross_code_debut"='rl test gb v france';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "england" (
"player" text,
"int_l_debut" text,
"year" text,
"cross_code_debut" text,
"date" text
);
Question: In what Year is Keith Smith's Cross Code Debut RL Test v Wales?
<|assistant|>
SELECT "year" FROM "england" WHERE "cross_code_debut"='rl test v wales' AND "player"='keith smith';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "england" (
"player" text,
"int_l_debut" text,
"year" text,
"cross_code_debut" text,
"date" text
);
Question: What is the Date of the Int'l Debut of 1967?
<|assistant|>
SELECT "date" FROM "england" WHERE "year"='1967';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "england" (
"player" text,
"int_l_debut" text,
"year" text,
"cross_code_debut" text,
"date" text
);
Question: What is the Player in the Int'l Debut of 1974?
<|assistant|>
SELECT "player" FROM "england" WHERE "year"='1974';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: What lane has a time of 24.83 and a heat less than 11?
<|assistant|>
SELECT SUM("lane") FROM "heats" WHERE "time"='24.83' AND "heat"<11;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: What is the total number of heat for Chinyere Pigot?
<|assistant|>
SELECT COUNT("heat") FROM "heats" WHERE "name"='chinyere pigot';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: What is the name for lane 1, from Mauritius?
<|assistant|>
SELECT "name" FROM "heats" WHERE "lane"=1 AND "nationality"='mauritius';<|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" text,
"finish" text
);
Question: Who won in 1988 with a total less than 287?
<|assistant|>
SELECT "player" FROM "made_the_cut" WHERE "total"<287 AND "year_s_won"='1988';<|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" text,
"finish" text
);
Question: What country is Larry Mize from?
<|assistant|>
SELECT "country" FROM "made_the_cut" WHERE "player"='larry mize';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the lowest number of bronze medals for a nation with fewer than 1 total medal?
<|assistant|>
SELECT MIN("bronze") FROM "medal_table" WHERE "total"<1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "single_cylinder_race" (
"rank" text,
"rider" text,
"team" text,
"speed" text,
"time" text
);
Question: What team is Frank Hulbert on?
<|assistant|>
SELECT "team" FROM "single_cylinder_race" WHERE "rider"='frank hulbert';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "single_cylinder_race" (
"rank" text,
"rider" text,
"team" text,
"speed" text,
"time" text
);
Question: What was Martin Geiger's rank?
<|assistant|>
SELECT "rank" FROM "single_cylinder_race" WHERE "rider"='martin geiger';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "single_cylinder_race" (
"rank" text,
"rider" text,
"team" text,
"speed" text,
"time" text
);
Question: What was Tom Silver's rank?
<|assistant|>
SELECT "rank" FROM "single_cylinder_race" WHERE "rider"='tom silver';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "academy_graduates_2000_present" (
"player" text,
"current_club" text,
"born" text,
"debut" text,
"manager" text
);
Question: Who was the player with a debut of age 18 v plymouth , 14 august 2012, and born in Portsmouth?
<|assistant|>
SELECT "player" FROM "academy_graduates_2000_present" WHERE "debut"='age 18 v plymouth , 14 august 2012' AND "born"='portsmouth';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "academy_graduates_2000_present" (
"player" text,
"current_club" text,
"born" text,
"debut" text,
"manager" text
);
Question: Where was the player whose Current Club Elfsborg born?
<|assistant|>
SELECT "born" FROM "academy_graduates_2000_present" WHERE "current_club"='elfsborg';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "academy_graduates_2000_present" (
"player" text,
"current_club" text,
"born" text,
"debut" text,
"manager" text
);
Question: What is the debut for the person born in Poole?
<|assistant|>
SELECT "debut" FROM "academy_graduates_2000_present" WHERE "born"='poole';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "academy_graduates_2000_present" (
"player" text,
"current_club" text,
"born" text,
"debut" text,
"manager" text
);
Question: What is the club for Sam Magri?
<|assistant|>
SELECT "current_club" FROM "academy_graduates_2000_present" WHERE "player"='sam magri';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "academy_graduates_2000_present" (
"player" text,
"current_club" text,
"born" text,
"debut" text,
"manager" text
);
Question: What is the name of the manager of the Atlético Baleares?
<|assistant|>
SELECT "manager" FROM "academy_graduates_2000_present" WHERE "current_club"='atlético baleares';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league_champions_and_major_awards" (
"year" real,
"league_champion" text,
"best_blocker" text,
"rookie_of_the_year" text,
"c_a_n_t_s_l_e_e_p_award" text
);
Question: Who was the best blocker for the year that has a League Champion of queens of pain, and a C.A.N.T.S.L.E.E.P. Award of chassis crass (brooklyn)?
<|assistant|>
SELECT "best_blocker" FROM "league_champions_and_major_awards" WHERE "league_champion"='queens of pain' AND "c_a_n_t_s_l_e_e_p_award"='chassis crass (brooklyn)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league_champions_and_major_awards" (
"year" real,
"league_champion" text,
"best_blocker" text,
"rookie_of_the_year" text,
"c_a_n_t_s_l_e_e_p_award" text
);
Question: Who was the rookie of the year for the year that had the Brooklyn Bombshells as the league champion?
<|assistant|>
SELECT "rookie_of_the_year" FROM "league_champions_and_major_awards" WHERE "league_champion"='brooklyn bombshells';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league_champions_and_major_awards" (
"year" real,
"league_champion" text,
"best_blocker" text,
"rookie_of_the_year" text,
"c_a_n_t_s_l_e_e_p_award" text
);
Question: What was the latest year that has a Rookie of the Year of omg wtf (brooklyn) and League Champion of bronx gridlock?
<|assistant|>
SELECT MAX("year") FROM "league_champions_and_major_awards" WHERE "league_champion"='bronx gridlock' AND "rookie_of_the_year"='omg wtf (brooklyn)';<|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,
"attendance" real,
"record" text,
"arena" text,
"points" real
);
Question: Which Arena has Points larger than 28, and a Date of december 14?
<|assistant|>
SELECT "arena" FROM "regular_season" WHERE "points">28 AND "date"='december 14';<|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,
"attendance" real,
"record" text,
"arena" text,
"points" real
);
Question: How many Points have an Arena of bell centre?
<|assistant|>
SELECT COUNT("points") FROM "regular_season" WHERE "arena"='bell centre';<|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,
"attendance" real,
"record" text,
"arena" text,
"points" real
);
Question: How much Attendance has a Loss of divis (0–3–0), and Points smaller than 38?
<|assistant|>
SELECT SUM("attendance") FROM "regular_season" WHERE "loss"='divis (0–3–0)' AND "points"<38;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_1" (
"rank" real,
"name" text,
"1st_run" text,
"2nd_run" text,
"3rd_run" text,
"total" real
);
Question: With a 1st run of 53.300 (7), and greater than 21 total, what is the average rank?
<|assistant|>
SELECT AVG("rank") FROM "heat_1" WHERE "1st_run"='53.300 (7)' AND "total">21;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_1" (
"rank" real,
"name" text,
"1st_run" text,
"2nd_run" text,
"3rd_run" text,
"total" real
);
Question: What 2nd run has a less than 6 rank, and 3 as the total?
<|assistant|>
SELECT "2nd_run" FROM "heat_1" WHERE "rank"<6 AND "total"=3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_1" (
"rank" real,
"name" text,
"1st_run" text,
"2nd_run" text,
"3rd_run" text,
"total" real
);
Question: When the 3rd run is 36.490 (3) what is the 2nd run?
<|assistant|>
SELECT "2nd_run" FROM "heat_1" WHERE "3rd_run"='36.490 (3)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_game_of_the_year_awards" (
"year" real,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
Question: What is the sum number of year when Call of Duty 4: Modern Warfare was the game?
<|assistant|>
SELECT COUNT("year") FROM "list_of_game_of_the_year_awards" WHERE "game"='call of duty 4: modern warfare';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_game_of_the_year_awards" (
"year" real,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
Question: What is the earliest year when action was the genre?
<|assistant|>
SELECT MIN("year") FROM "list_of_game_of_the_year_awards" WHERE "genre"='action';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_game_of_the_year_awards" (
"year" real,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
Question: What is the smallest year when Ubisoft Montreal was the developer (s)?
<|assistant|>
SELECT MIN("year") FROM "list_of_game_of_the_year_awards" WHERE "developer_s"='ubisoft montreal';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_game_of_the_year_awards" (
"year" real,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
Question: What is the latest year when Call of Duty 4: Modern Warfare was the game?
<|assistant|>
SELECT MAX("year") FROM "list_of_game_of_the_year_awards" WHERE "game"='call of duty 4: modern warfare';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "governors_of_missouri" (
"governor" text,
"took_office" text,
"left_office" text,
"party" text,
"lieutenant_governor" text,
"terms" text
);
Question: Who was Lieutenant Governor to the governor that left office on January 14, 1929?
<|assistant|>
SELECT "lieutenant_governor" FROM "governors_of_missouri" WHERE "left_office"='january 14, 1929';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "governors_of_missouri" (
"governor" text,
"took_office" text,
"left_office" text,
"party" text,
"lieutenant_governor" text,
"terms" text
);
Question: Which governor took office on January 8, 1877?
<|assistant|>
SELECT "governor" FROM "governors_of_missouri" WHERE "took_office"='january 8, 1877';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "governors_of_missouri" (
"governor" text,
"took_office" text,
"left_office" text,
"party" text,
"lieutenant_governor" text,
"terms" text
);
Question: Who was lieutenant governor to the governor that left office on October 16, 2000?
<|assistant|>
SELECT "lieutenant_governor" FROM "governors_of_missouri" WHERE "left_office"='october 16, 2000';<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.