chat_prompt stringlengths 438 1.53k |
|---|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: Name the home for 16 april 2008"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"april\" WHERE \"date\"='16 april 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: Name the score for bucks with timberwolves"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"april\" WHERE \"visitor\"='bucks' AND \"home\"='timberwolves';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"competing_yachts\" (\n \"sail\" text,\n \"yacht\" text,\n \"syndicate\" text,\n \"yacht_club\" text,\n \"nation\" text\n);\n\nQuestion: Which sail is in the America 3 Foundation syndicate on the America 3 yacht?"
},
{
"role": "assistant",
"content": "SELECT \"sail\" FROM \"competing_yachts\" WHERE \"syndicate\"='america 3 foundation' AND \"yacht\"='america 3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"competing_yachts\" (\n \"sail\" text,\n \"yacht\" text,\n \"syndicate\" text,\n \"yacht_club\" text,\n \"nation\" text\n);\n\nQuestion: Which syndicate is associated with the stars & stripes yacht?"
},
{
"role": "assistant",
"content": "SELECT \"syndicate\" FROM \"competing_yachts\" WHERE \"yacht\"='stars & stripes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"competing_yachts\" (\n \"sail\" text,\n \"yacht\" text,\n \"syndicate\" text,\n \"yacht_club\" text,\n \"nation\" text\n);\n\nQuestion: Which Yacht Club is part of the America 3 Foundation syndicate on the America 3 yacht?"
},
{
"role": "assistant",
"content": "SELECT \"yacht_club\" FROM \"competing_yachts\" WHERE \"syndicate\"='america 3 foundation' AND \"yacht\"='america 3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"competing_yachts\" (\n \"sail\" text,\n \"yacht\" text,\n \"syndicate\" text,\n \"yacht_club\" text,\n \"nation\" text\n);\n\nQuestion: Which nation has the America 3 Foundation syndicate and the jayhawk yacht?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"competing_yachts\" WHERE \"syndicate\"='america 3 foundation' AND \"yacht\"='jayhawk';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"competing_yachts\" (\n \"sail\" text,\n \"yacht\" text,\n \"syndicate\" text,\n \"yacht_club\" text,\n \"nation\" text\n);\n\nQuestion: Which Nation has the USA-18 sail?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"competing_yachts\" WHERE \"sail\"='usa-18';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When did a home team score 4.12 (36)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_1\" WHERE \"home_team_score\"='4.12 (36)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How big was the crowd when collingwood visited?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_1\" WHERE \"away_team\"='collingwood';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What away team is based in moorabbin oval?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_1\" WHERE \"venue\"='moorabbin oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_catches_in_a_match\" (\n \"catches\" text,\n \"player\" text,\n \"versus\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What date did af giles play?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"most_catches_in_a_match\" WHERE \"player\"='af giles';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_catches_in_a_match\" (\n \"catches\" text,\n \"player\" text,\n \"versus\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: How many catches does hh dippenaar have?"
},
{
"role": "assistant",
"content": "SELECT \"catches\" FROM \"most_catches_in_a_match\" WHERE \"player\"='hh dippenaar';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_catches_in_a_match\" (\n \"catches\" text,\n \"player\" text,\n \"versus\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What player has a date of 12-02-2003?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"most_catches_in_a_match\" WHERE \"date\"='12-02-2003';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_catches_in_a_match\" (\n \"catches\" text,\n \"player\" text,\n \"versus\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: Who had a versus of sri lanka?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"most_catches_in_a_match\" WHERE \"versus\"='sri lanka';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_catches_in_a_match\" (\n \"catches\" text,\n \"player\" text,\n \"versus\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: Who had a date of 19-02-2003?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"most_catches_in_a_match\" WHERE \"date\"='19-02-2003';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_catches_in_a_match\" (\n \"catches\" text,\n \"player\" text,\n \"versus\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What date had a versus of source: cricinfo.com?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"most_catches_in_a_match\" WHERE \"versus\"='source: cricinfo.com';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When south Melbourne was the home team, what was the away team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_5\" WHERE \"home_team\"='south melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the smallest crowd size for away team st kilda?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"crowd\") FROM \"round_5\" WHERE \"away_team\"='st kilda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score of the game against Milwaukee?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"march\" WHERE \"visitor\"='milwaukee';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2003\" (\n \"tournament\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text,\n \"third_place\" text\n);\n\nQuestion: Was the third place winner Yannick Noah?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"2003\" WHERE \"third_place\"='yannick noah';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the away team score when the home team essendon was playing?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_5\" WHERE \"home_team\"='essendon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: The home team scored 15.15 (105) at what venue?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_5\" WHERE \"home_team_score\"='15.15 (105)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which away team scored 16.12 (108)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_5\" WHERE \"away_team_score\"='16.12 (108)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When the home team scored 16.26 (122) what was the opposing score?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_5\" WHERE \"home_team_score\"='16.26 (122)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which home team scored 13.20 (98)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_5\" WHERE \"home_team_score\"='13.20 (98)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_superlative_academy_award_winner\" (\n \"superlative\" text,\n \"actress\" text,\n \"record_set\" text,\n \"year\" real,\n \"notes\" text\n);\n\nQuestion: Who set the record for youngest nominee?"
},
{
"role": "assistant",
"content": "SELECT \"record_set\" FROM \"list_of_superlative_academy_award_winner\" WHERE \"superlative\"='youngest nominee';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_superlative_academy_award_winner\" (\n \"superlative\" text,\n \"actress\" text,\n \"record_set\" text,\n \"year\" real,\n \"notes\" text\n);\n\nQuestion: After the year 2011, who was the youngest nominee?"
},
{
"role": "assistant",
"content": "SELECT \"record_set\" FROM \"list_of_superlative_academy_award_winner\" WHERE \"year\">2011 AND \"superlative\"='youngest nominee';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_superlative_academy_award_winner\" (\n \"superlative\" text,\n \"actress\" text,\n \"record_set\" text,\n \"year\" real,\n \"notes\" text\n);\n\nQuestion: When did Quvenzhan\u00e9 Wallis first win?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"list_of_superlative_academy_award_winner\" WHERE \"actress\"='quvenzhan\u00e9 wallis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_superlative_academy_award_winner\" (\n \"superlative\" text,\n \"actress\" text,\n \"record_set\" text,\n \"year\" real,\n \"notes\" text\n);\n\nQuestion: When was the last year when Katharine Hepburn won?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"list_of_superlative_academy_award_winner\" WHERE \"actress\"='katharine hepburn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"venue\" text,\n \"winner\" text,\n \"country\" text,\n \"score\" text\n);\n\nQuestion: who was the winner in 2003?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"winners\" WHERE \"year\"='2003';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"venue\" text,\n \"winner\" text,\n \"country\" text,\n \"score\" text\n);\n\nQuestion: where did marie-laure taya win?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"winners\" WHERE \"winner\"='marie-laure taya';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"venue\" text,\n \"winner\" text,\n \"country\" text,\n \"score\" text\n);\n\nQuestion: what venue saw a score of 285?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"winners\" WHERE \"score\"='285';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the largest laps for Time/Retired of + 2 laps, and a Grid of 13?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"race\" WHERE \"time_retired\"='+ 2 laps' AND \"grid\"=13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What company constructed the car with more than 0 laps and shows 5 for grid?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"race\" WHERE \"laps\">0 AND \"grid\"=5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the sum of laps for Derek Warwick?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"laps\") FROM \"race\" WHERE \"driver\"='derek warwick';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_by_club\" (\n \"club\" text,\n \"wins\" real,\n \"runners_up\" real,\n \"years_won\" text,\n \"years_runner_up\" text\n);\n\nQuestion: What years runner-up is Birmingham city, with over 1 runners-up?"
},
{
"role": "assistant",
"content": "SELECT \"years_runner_up\" FROM \"results_by_club\" WHERE \"runners_up\">1 AND \"club\"='birmingham city';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Home team score has an Away team of st kilda?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_8\" WHERE \"away_team\"='st kilda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Home team has a Venue of victoria park?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_8\" WHERE \"venue\"='victoria park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Away team has an Away team score of 12.19 (91)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_8\" WHERE \"away_team_score\"='12.19 (91)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Home team has an Away team score of 12.19 (91)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_8\" WHERE \"away_team_score\"='12.19 (91)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"d\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: Who was the center from Washington State?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"d\" WHERE \"position\"='center' AND \"school_club_team\"='washington state';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"d\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What school did Paul Dawkins play for?"
},
{
"role": "assistant",
"content": "SELECT \"school_club_team\" FROM \"d\" WHERE \"player\"='paul dawkins';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_organs\" (\n \"date\" real,\n \"country\" text,\n \"place\" text,\n \"building\" text,\n \"size\" text\n);\n\nQuestion: Name the place with building of victoria hall"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"notable_organs\" WHERE \"building\"='victoria hall';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_organs\" (\n \"date\" real,\n \"country\" text,\n \"place\" text,\n \"building\" text,\n \"size\" text\n);\n\nQuestion: Name the least date for the place which has a building of victoria hall"
},
{
"role": "assistant",
"content": "SELECT MIN(\"date\") FROM \"notable_organs\" WHERE \"building\"='victoria hall';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_organs\" (\n \"date\" real,\n \"country\" text,\n \"place\" text,\n \"building\" text,\n \"size\" text\n);\n\nQuestion: Name the size which is past 2000"
},
{
"role": "assistant",
"content": "SELECT \"size\" FROM \"notable_organs\" WHERE \"date\">2000;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_organs\" (\n \"date\" real,\n \"country\" text,\n \"place\" text,\n \"building\" text,\n \"size\" text\n);\n\nQuestion: Name the country that has m\u00e4ntt\u00e4"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"notable_organs\" WHERE \"place\"='m\u00e4ntt\u00e4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1997_draft_picks\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"nationality\" text,\n \"club_team\" text\n);\n\nQuestion: What round was Nick Gillis?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"1997_draft_picks\" WHERE \"player\"='nick gillis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"station_list\" (\n \"station\" text,\n \"japanese\" text,\n \"distance_km\" real,\n \"rapid\" text,\n \"location\" text\n);\n\nQuestion: What is the distance to funao?"
},
{
"role": "assistant",
"content": "SELECT \"distance_km\" FROM \"station_list\" WHERE \"station\"='funao';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"station_list\" (\n \"station\" text,\n \"japanese\" text,\n \"distance_km\" real,\n \"rapid\" text,\n \"location\" text\n);\n\nQuestion: What station has a Rapid of \u2191, is 3.4 km away, and has a Japanese title of \u4e0b\u9d28\u751f?"
},
{
"role": "assistant",
"content": "SELECT \"station\" FROM \"station_list\" WHERE \"rapid\"='\u2191' AND \"distance_km\">3.4 AND \"japanese\"='\u4e0b\u9d28\u751f';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"station_list\" (\n \"station\" text,\n \"japanese\" text,\n \"distance_km\" real,\n \"rapid\" text,\n \"location\" text\n);\n\nQuestion: What location is less than 7.1 km away, and has a Rapid of \u25cf?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"station_list\" WHERE \"distance_km\"<7.1 AND \"rapid\"='\u25cf';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"queens_of_bohemia\" (\n \"father\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_queen\" text,\n \"ceased_to_be_queen\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: What is the name of the father who was born in 1204 and married ottokar ii?"
},
{
"role": "assistant",
"content": "SELECT \"father\" FROM \"queens_of_bohemia\" WHERE \"spouse\"='ottokar ii' AND \"birth\"='1204';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"queens_of_bohemia\" (\n \"father\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_queen\" text,\n \"ceased_to_be_queen\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: What is the birth date of the woman who ceased to be Queen on 18 Jun 1297?"
},
{
"role": "assistant",
"content": "SELECT \"birth\" FROM \"queens_of_bohemia\" WHERE \"ceased_to_be_queen\"='18 jun 1297';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"queens_of_bohemia\" (\n \"father\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_queen\" text,\n \"ceased_to_be_queen\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: Leopold VI, Duke of Austria is the father-in-law of which person?"
},
{
"role": "assistant",
"content": "SELECT \"spouse\" FROM \"queens_of_bohemia\" WHERE \"father\"='leopold vi, duke of austria';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"queens_of_bohemia\" (\n \"father\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_queen\" text,\n \"ceased_to_be_queen\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: What is the birth date of the person who died on 18 October 1335?"
},
{
"role": "assistant",
"content": "SELECT \"birth\" FROM \"queens_of_bohemia\" WHERE \"death\"='18 october 1335';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"queens_of_bohemia\" (\n \"father\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_queen\" text,\n \"ceased_to_be_queen\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: When did the person who died on 6 Dec 1240 get married?"
},
{
"role": "assistant",
"content": "SELECT \"marriage\" FROM \"queens_of_bohemia\" WHERE \"death\"='6 dec 1240';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"250cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What time/retired for a grid less than 19, under 21 laps, and made by aprilia?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"250cc_classification\" WHERE \"grid\"<19 AND \"manufacturer\"='aprilia' AND \"laps\"<21;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"250cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the grid for dirk heidolf?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"grid\") FROM \"250cc_classification\" WHERE \"rider\"='dirk heidolf';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What away team plays at Victoria Park?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_11\" WHERE \"venue\"='victoria park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_rugby_world_cup_squads\" (\n \"player\" text,\n \"position\" text,\n \"date_of_birth_age\" text,\n \"caps\" real,\n \"club_province\" text\n);\n\nQuestion: How many caps does stephen hoiles have?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"caps\") FROM \"2007_rugby_world_cup_squads\" WHERE \"player\"='stephen hoiles';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_20\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Date has a Home team of st kilda?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_20\" WHERE \"home_team\"='st kilda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_20\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Away team has an Away team score of 13.22 (100)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_20\" WHERE \"away_team_score\"='13.22 (100)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_20\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Venue has an Away team of footscray?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_20\" WHERE \"away_team\"='footscray';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_20\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Crowd has a Home team of geelong?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"round_20\" WHERE \"home_team\"='geelong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the most silver medals a team with 3 total medals and less than 1 bronze has?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"silver\") FROM \"medal_table\" WHERE \"total\"=3 AND \"bronze\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the least amount of silver medals a team with less than 0 gold medals has?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"silver\") FROM \"medal_table\" WHERE \"gold\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the most bronze a team with more than 2 silvers has?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"bronze\") FROM \"medal_table\" WHERE \"silver\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total amount of bronze medals a team with 1 gold and more than 3 silver medals has?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"bronze\") FROM \"medal_table\" WHERE \"gold\"=1 AND \"silver\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"melodifestivalen_1999\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"points\" real,\n \"place\" text\n);\n\nQuestion: What is the draw number that has 59 points?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"draw\") FROM \"melodifestivalen_1999\" WHERE \"points\"=59;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"melodifestivalen_1999\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"points\" real,\n \"place\" text\n);\n\nQuestion: What place for roger pontare?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"melodifestivalen_1999\" WHERE \"artist\"='roger pontare';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"melodifestivalen_1999\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"points\" real,\n \"place\" text\n);\n\nQuestion: What song has draw number less than 2?"
},
{
"role": "assistant",
"content": "SELECT \"song\" FROM \"melodifestivalen_1999\" WHERE \"draw\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the attendance when Essendon played as the home team?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_14\" WHERE \"home_team\"='essendon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who played the home team at Windy Hill?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_14\" WHERE \"venue\"='windy hill';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"record\" text\n);\n\nQuestion: What was the date of the game that had a decision of wall?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"decision\"='wall';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: What is the name of the circuit when Jack Brabham is in the pole position and Graham Hill has the fastest lap?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"season_review\" WHERE \"pole_position\"='jack brabham' AND \"fastest_lap\"='graham hill';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: What race contains the Monaco circuit?"
},
{
"role": "assistant",
"content": "SELECT \"race\" FROM \"season_review\" WHERE \"circuit\"='monaco';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: What is the date of the race when Jack Brabham is in the pole position and the circuit is Spa-Francorchamps?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"season_review\" WHERE \"pole_position\"='jack brabham' AND \"circuit\"='spa-francorchamps';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: What is the name of the circuit when Phil Hill has the fastest lap?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"season_review\" WHERE \"fastest_lap\"='phil hill';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_vancouver_canucks_draft_picks\" (\n \"rd_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"team_league\" text,\n \"reg_gp\" real,\n \"pl_gp\" real\n);\n\nQuestion: What is the sum of every REG GP that Peter Andersson played as a pick# less than 143?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"reg_gp\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"player\"='peter andersson' AND \"pick_num\"<143;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_vancouver_canucks_draft_picks\" (\n \"rd_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"team_league\" text,\n \"reg_gp\" real,\n \"pl_gp\" real\n);\n\nQuestion: What is the total of PI GP played by Anton Rodin with a Reg GP less than 0?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pl_gp\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"player\"='anton rodin' AND \"reg_gp\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_vancouver_canucks_draft_picks\" (\n \"rd_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"team_league\" text,\n \"reg_gp\" real,\n \"pl_gp\" real\n);\n\nQuestion: What is the total pick# played by Anton Rodin with a Reg GP over 0?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick_num\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"player\"='anton rodin' AND \"reg_gp\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the lowest grid that has over 67 laps with stefan bellof driving?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"grid\") FROM \"classification\" WHERE \"laps\">67 AND \"driver\"='stefan bellof';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many laps have a grid under 14 and a time/retired of out of fuel?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"laps\") FROM \"classification\" WHERE \"grid\"<14 AND \"time_retired\"='out of fuel';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Who drove the renault that went over 23 laps and had a grid under 11?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"classification\" WHERE \"grid\"<11 AND \"constructor\"='renault' AND \"laps\">23;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"5901_6000\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text,\n \"apparent_magnitude\" real\n);\n\nQuestion: What is the average NGC number that has a Apparent magnitude greater than 14.2?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"ngc_number\") FROM \"5901_6000\" WHERE \"apparent_magnitude\">14.2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"5901_6000\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text,\n \"apparent_magnitude\" real\n);\n\nQuestion: What is the highest NGC number that has a Declination ( J2000 ) of \u00b004\u203258\u2033 and a Apparent magnitude larger than 7.3?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"ngc_number\") FROM \"5901_6000\" WHERE \"declination_j2000\"='\u00b004\u203258\u2033' AND \"apparent_magnitude\">7.3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"5901_6000\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text,\n \"apparent_magnitude\" real\n);\n\nQuestion: What Constellation has a Object type of globular cluster and a NGC number of 5986?"
},
{
"role": "assistant",
"content": "SELECT \"constellation\" FROM \"5901_6000\" WHERE \"object_type\"='globular cluster' AND \"ngc_number\"=5986;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"club\" text,\n \"gold\" real,\n \"big_silver\" real,\n \"small_silver\" real,\n \"bronze\" real,\n \"points\" real\n);\n\nQuestion: For clubs that have 0 gold and less than 5 points, what is the average amount of bronze medals?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"bronze\") FROM \"medal_table\" WHERE \"points\"<5 AND \"gold\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"club\" text,\n \"gold\" real,\n \"big_silver\" real,\n \"small_silver\" real,\n \"bronze\" real,\n \"points\" real\n);\n\nQuestion: Club aik had over 9 small silver medals and more than 8 bronze medals, how many total points did they have?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"medal_table\" WHERE \"small_silver\">9 AND \"club\"='aik' AND \"bronze\">8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"club\" text,\n \"gold\" real,\n \"big_silver\" real,\n \"small_silver\" real,\n \"bronze\" real,\n \"points\" real\n);\n\nQuestion: How many points did landskrona bois get when they were ranked below 18?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"medal_table\" WHERE \"club\"='landskrona bois' AND \"rank\"<18;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" real,\n \"record\" text\n);\n\nQuestion: Who was the opponent for game 5?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"game\"=5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"team\" text,\n \"college\" text\n);\n\nQuestion: Name the team for pick more than 30 and position of c with round more than 4"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"other_picks\" WHERE \"pick\">30 AND \"position\"='c' AND \"round\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"internal_representation\" (\n \"type\" text,\n \"sign\" real,\n \"exponent\" real,\n \"significand\" real,\n \"total_bits\" real,\n \"exponent_bias\" real,\n \"bits_precision\" real,\n \"number_of_decimal_digits\" text\n);\n\nQuestion: What's the number of decimal digits when the total bits is more than 32 and the exponent is less than 15?"
},
{
"role": "assistant",
"content": "SELECT \"number_of_decimal_digits\" FROM \"internal_representation\" WHERE \"total_bits\">32 AND \"exponent\"<15;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"internal_representation\" (\n \"type\" text,\n \"sign\" real,\n \"exponent\" real,\n \"significand\" real,\n \"total_bits\" real,\n \"exponent_bias\" real,\n \"bits_precision\" real,\n \"number_of_decimal_digits\" text\n);\n\nQuestion: What's the total number of signicand with ~34.0 decimal digits and more than 128 total bits?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"significand\") FROM \"internal_representation\" WHERE \"number_of_decimal_digits\"='~34.0' AND \"total_bits\">128;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"internal_representation\" (\n \"type\" text,\n \"sign\" real,\n \"exponent\" real,\n \"significand\" real,\n \"total_bits\" real,\n \"exponent_bias\" real,\n \"bits_precision\" real,\n \"number_of_decimal_digits\" text\n);\n\nQuestion: What's the sum of significand with ~34.0 decimal digits and an exponent bias larger than 16383?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"significand\") FROM \"internal_representation\" WHERE \"number_of_decimal_digits\"='~34.0' AND \"exponent_bias\">16383;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"internal_representation\" (\n \"type\" text,\n \"sign\" real,\n \"exponent\" real,\n \"significand\" real,\n \"total_bits\" real,\n \"exponent_bias\" real,\n \"bits_precision\" real,\n \"number_of_decimal_digits\" text\n);\n\nQuestion: What's the sum of sign with an exponent bias less than 1023, ~3.3 decimal digits, and less than 11 bits precision?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"sign\") FROM \"internal_representation\" WHERE \"exponent_bias\"<1023 AND \"number_of_decimal_digits\"='~3.3' AND \"bits_precision\"<11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"internal_representation\" (\n \"type\" text,\n \"sign\" real,\n \"exponent\" real,\n \"significand\" real,\n \"total_bits\" real,\n \"exponent_bias\" real,\n \"bits_precision\" real,\n \"number_of_decimal_digits\" text\n);\n\nQuestion: What's the sum of sign with more than 53 bits precision, double extended (80-bit) type, and more than 80 total bits?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"sign\") FROM \"internal_representation\" WHERE \"bits_precision\">53 AND \"type\"='double extended (80-bit)' AND \"total_bits\">80;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"internal_representation\" (\n \"type\" text,\n \"sign\" real,\n \"exponent\" real,\n \"significand\" real,\n \"total_bits\" real,\n \"exponent_bias\" real,\n \"bits_precision\" real,\n \"number_of_decimal_digits\" text\n);\n\nQuestion: What's the lowest bits precision when the total bits are less than 16?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"bits_precision\") FROM \"internal_representation\" WHERE \"total_bits\"<16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_win_loss_record\" (\n \"player\" text,\n \"total_win_loss\" text,\n \"singles_win_loss\" text,\n \"doubles_win_loss\" text,\n \"no_of_ties\" real,\n \"first_year_played\" real,\n \"years_played\" real\n);\n\nQuestion: How many years did the team that has a Singles win-Loss of 4-9 and first played before 1999?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"years_played\") FROM \"player_win_loss_record\" WHERE \"singles_win_loss\"='4-9' AND \"first_year_played\"<1999;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"november\" real,\n \"opponent\" text,\n \"score\" text,\n \"decision\" text,\n \"record\" text\n);\n\nQuestion: What is the highest game number with a record of 12-8-1?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"game\") FROM \"schedule_and_results\" WHERE \"record\"='12-8-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"november\" real,\n \"opponent\" text,\n \"score\" text,\n \"decision\" text,\n \"record\" text\n);\n\nQuestion: What is the record when the decision was valiquette on November 23?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"schedule_and_results\" WHERE \"decision\"='valiquette' AND \"november\"=23;"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.