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 \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: When the laps are over 53, what's the average grid?" }, { "role": "assistant", "content": "SELECT AVG(\"grid\") FROM \"classification\" WHERE \"laps\">53;" } ]
[ { "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's the average laps driven by david coulthard?" }, { "role": "assistant", "content": "SELECT AVG(\"laps\") FROM \"classification\" WHERE \"driver\"='david coulthard';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_5\" (\n \"outcome\" text,\n \"year\" real,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: who is the opponent in the final when the year is before 1883?" }, { "role": "assistant", "content": "SELECT \"opponent_in_the_final\" FROM \"singles_5\" WHERE \"year\"<1883;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_5\" (\n \"outcome\" text,\n \"year\" real,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: what is the outcome for the 1887?" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"singles_5\" WHERE \"year\"=1887;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_5\" (\n \"outcome\" text,\n \"year\" real,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: what is the outcome when the opponent in the final is william renshaw after year 1882?" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"singles_5\" WHERE \"year\">1882 AND \"opponent_in_the_final\"='william renshaw';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_5\" (\n \"outcome\" text,\n \"year\" real,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: what is the score when the outcome is runner-up, the opponent in the final is herbert lawford and the year is after 1882?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"singles_5\" WHERE \"year\">1882 AND \"outcome\"='runner-up' AND \"opponent_in_the_final\"='herbert lawford';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"natural_wonders\" (\n \"year\" real,\n \"design\" text,\n \"issue\" text,\n \"artist\" text,\n \"mintage\" real,\n \"issue_price\" text\n);\n\nQuestion: What artist has a mintage of greater than 34,135?" }, { "role": "assistant", "content": "SELECT \"artist\" FROM \"natural_wonders\" WHERE \"mintage\">'34,135';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"natural_wonders\" (\n \"year\" real,\n \"design\" text,\n \"issue\" text,\n \"artist\" text,\n \"mintage\" real,\n \"issue_price\" text\n);\n\nQuestion: What artist was released in 2005?" }, { "role": "assistant", "content": "SELECT \"artist\" FROM \"natural_wonders\" WHERE \"year\"=2005;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"goal_to_draw\" (\n \"player\" text,\n \"team\" text,\n \"opponent\" text,\n \"year\" real,\n \"score\" text\n);\n\nQuestion: What's melbourne's average year?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"goal_to_draw\" WHERE \"team\"='melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"goal_to_draw\" (\n \"player\" text,\n \"team\" text,\n \"opponent\" text,\n \"year\" real,\n \"score\" text\n);\n\nQuestion: Who was ashley sampi's opponent?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"goal_to_draw\" WHERE \"player\"='ashley sampi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"goal_to_draw\" (\n \"player\" text,\n \"team\" text,\n \"opponent\" text,\n \"year\" real,\n \"score\" text\n);\n\nQuestion: Which team did daniel bradshaw play for after 1935?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"goal_to_draw\" WHERE \"year\">1935 AND \"player\"='daniel bradshaw';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"goal_to_draw\" (\n \"player\" text,\n \"team\" text,\n \"opponent\" text,\n \"year\" real,\n \"score\" text\n);\n\nQuestion: Who played in 1992?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"goal_to_draw\" WHERE \"year\"=1992;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_4\" (\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 date was fitzroy the away team?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_4\" WHERE \"away_team\"='fitzroy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_7_2_titles_5_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Name the surface when the partner is carlos berlocq" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"doubles_7_2_titles_5_runners_up\" WHERE \"partner\"='carlos berlocq';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_7_2_titles_5_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Name the date for clay surface and score of 0\u20136, 0\u20136" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"doubles_7_2_titles_5_runners_up\" WHERE \"surface\"='clay' AND \"score\"='0\u20136, 0\u20136';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_7_2_titles_5_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Name the partner with score of 6\u20133, 6\u20132" }, { "role": "assistant", "content": "SELECT \"partner\" FROM \"doubles_7_2_titles_5_runners_up\" WHERE \"score\"='6\u20133, 6\u20132';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_7_2_titles_5_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Name the tournament for clay surface and outcome is winner with score is 6\u20133, 6\u20132" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"doubles_7_2_titles_5_runners_up\" WHERE \"surface\"='clay' AND \"outcome\"='winner' AND \"score\"='6\u20133, 6\u20132';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_7_2_titles_5_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Name the outcome on 6 october 2013" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"doubles_7_2_titles_5_runners_up\" WHERE \"date\"='6 october 2013';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"national_final\" (\n \"draw\" real,\n \"song\" text,\n \"artist\" text,\n \"jury_points\" text,\n \"televotes_points\" text,\n \"total_points\" real,\n \"place\" real\n);\n\nQuestion: What is the song with more than 9 points and 44 (11) jury (points)?" }, { "role": "assistant", "content": "SELECT \"song\" FROM \"national_final\" WHERE \"total_points\">9 AND \"jury_points\"='44 (11)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"national_final\" (\n \"draw\" real,\n \"song\" text,\n \"artist\" text,\n \"jury_points\" text,\n \"televotes_points\" text,\n \"total_points\" real,\n \"place\" real\n);\n\nQuestion: Who is the artist with 2153 (5) televotes (points)?" }, { "role": "assistant", "content": "SELECT \"artist\" FROM \"national_final\" WHERE \"televotes_points\"='2153 (5)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"national_final\" (\n \"draw\" real,\n \"song\" text,\n \"artist\" text,\n \"jury_points\" text,\n \"televotes_points\" text,\n \"total_points\" real,\n \"place\" real\n);\n\nQuestion: What is the lowest total points Karine Tr\u00e9cy has with less than 4 draws?" }, { "role": "assistant", "content": "SELECT MIN(\"total_points\") FROM \"national_final\" WHERE \"draw\"<4 AND \"artist\"='karine tr\u00e9cy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"national_final\" (\n \"draw\" real,\n \"song\" text,\n \"artist\" text,\n \"jury_points\" text,\n \"televotes_points\" text,\n \"total_points\" real,\n \"place\" real\n);\n\nQuestion: What is the lowest total points Karine Tr\u00e9cy has with a less than 12 place?" }, { "role": "assistant", "content": "SELECT MIN(\"total_points\") FROM \"national_final\" WHERE \"artist\"='karine tr\u00e9cy' AND \"place\"<12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"episode\" text,\n \"air_date\" text,\n \"timeslot_est\" text,\n \"season\" real,\n \"rating\" real,\n \"share\" real,\n \"18_49\" real,\n \"viewers_m\" real,\n \"rank_num\" text\n);\n\nQuestion: What is the average rating of viewers 18 to 49 where the total viewer count is 3.93 million and share less than 4?" }, { "role": "assistant", "content": "SELECT AVG(\"18_49\") FROM \"weekly_ratings\" WHERE \"viewers_m\"=3.93 AND \"share\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"episode\" text,\n \"air_date\" text,\n \"timeslot_est\" text,\n \"season\" real,\n \"rating\" real,\n \"share\" real,\n \"18_49\" real,\n \"viewers_m\" real,\n \"rank_num\" text\n);\n\nQuestion: What is the total number of ratings among the 18 to 49 group that was aired on January 7, 2009?" }, { "role": "assistant", "content": "SELECT COUNT(\"18_49\") FROM \"weekly_ratings\" WHERE \"air_date\"='january 7, 2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"episode\" text,\n \"air_date\" text,\n \"timeslot_est\" text,\n \"season\" real,\n \"rating\" real,\n \"share\" real,\n \"18_49\" real,\n \"viewers_m\" real,\n \"rank_num\" text\n);\n\nQuestion: What is the total number of viewers for the show that was aired on December 10, 2008 with an 18 to 49 rating less than 1.2?" }, { "role": "assistant", "content": "SELECT COUNT(\"viewers_m\") FROM \"weekly_ratings\" WHERE \"air_date\"='december 10, 2008' AND \"18_49\"<1.2;" } ]
[ { "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 was Mike Hailwood's highest laps when he had a grid more than 7?" }, { "role": "assistant", "content": "SELECT MAX(\"laps\") FROM \"classification\" WHERE \"driver\"='mike hailwood' AND \"grid\">7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superfund_sites\" (\n \"cerclis_id\" text,\n \"name\" text,\n \"municipality\" text,\n \"proposed\" text,\n \"listed\" text,\n \"construction_completed\" text,\n \"partially_deleted\" text,\n \"deleted\" text\n);\n\nQuestion: What is the name of the site with a CERCLIS ID of prd980512362?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"superfund_sites\" WHERE \"cerclis_id\"='prd980512362';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superfund_sites\" (\n \"cerclis_id\" text,\n \"name\" text,\n \"municipality\" text,\n \"proposed\" text,\n \"listed\" text,\n \"construction_completed\" text,\n \"partially_deleted\" text,\n \"deleted\" text\n);\n\nQuestion: What is the site for Florida?" }, { "role": "assistant", "content": "SELECT \"listed\" FROM \"superfund_sites\" WHERE \"municipality\"='florida';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superfund_sites\" (\n \"cerclis_id\" text,\n \"name\" text,\n \"municipality\" text,\n \"proposed\" text,\n \"listed\" text,\n \"construction_completed\" text,\n \"partially_deleted\" text,\n \"deleted\" text\n);\n\nQuestion: What site in the RCA Del Caribe was deleted?" }, { "role": "assistant", "content": "SELECT \"deleted\" FROM \"superfund_sites\" WHERE \"name\"='rca del caribe';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superfund_sites\" (\n \"cerclis_id\" text,\n \"name\" text,\n \"municipality\" text,\n \"proposed\" text,\n \"listed\" text,\n \"construction_completed\" text,\n \"partially_deleted\" text,\n \"deleted\" text\n);\n\nQuestion: Where is the partially deleted site of fibers public supply wells located?" }, { "role": "assistant", "content": "SELECT \"partially_deleted\" FROM \"superfund_sites\" WHERE \"name\"='fibers public supply wells';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superfund_sites\" (\n \"cerclis_id\" text,\n \"name\" text,\n \"municipality\" text,\n \"proposed\" text,\n \"listed\" text,\n \"construction_completed\" text,\n \"partially_deleted\" text,\n \"deleted\" text\n);\n\nQuestion: The proposed 03/08/2004 site is in what municipality?" }, { "role": "assistant", "content": "SELECT \"municipality\" FROM \"superfund_sites\" WHERE \"proposed\"='03/08/2004';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"release_format\" text,\n \"country\" text,\n \"label\" text,\n \"cat_no\" text,\n \"release_date\" real\n);\n\nQuestion: What is the release format for titles after 1983?" }, { "role": "assistant", "content": "SELECT \"release_format\" FROM \"release_history\" WHERE \"release_date\">1983;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_13\" (\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 had an Away team score of 7.12 (54)?" }, { "role": "assistant", "content": "SELECT AVG(\"crowd\") FROM \"round_13\" WHERE \"away_team_score\"='7.12 (54)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_13\" (\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 venue is the home of the Carlton team?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_13\" WHERE \"home_team\"='carlton';" } ]
[ { "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\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: Which driver had a grid of 18 with 68 laps?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"race\" WHERE \"laps\"='68' AND \"grid\"='18';" } ]
[ { "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\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: Which driver had a grid of 18?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"race\" WHERE \"grid\"='18';" } ]
[ { "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\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: Which driver had a grid of 22?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"race\" WHERE \"grid\"='22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"partnership_records\" (\n \"wicket_partnership\" text,\n \"runs\" text,\n \"batsmen\" text,\n \"opponents\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: Which season is the wicket 2nd partnership in?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"partnership_records\" WHERE \"wicket_partnership\"='2nd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"partnership_records\" (\n \"wicket_partnership\" text,\n \"runs\" text,\n \"batsmen\" text,\n \"opponents\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: Where did v kent play?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"partnership_records\" WHERE \"opponents\"='v kent';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"partnership_records\" (\n \"wicket_partnership\" text,\n \"runs\" text,\n \"batsmen\" text,\n \"opponents\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: Which runs had james bryant graeme welch as Batsmen?" }, { "role": "assistant", "content": "SELECT \"runs\" FROM \"partnership_records\" WHERE \"batsmen\"='james bryant graeme welch';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"head_to_head_record\" (\n \"record\" text,\n \"hard\" text,\n \"clay\" text,\n \"grass\" text,\n \"carpet\" text\n);\n\nQuestion: Which clay has a Record of 2\u20130, and a Hard 1\u20130?" }, { "role": "assistant", "content": "SELECT \"clay\" FROM \"head_to_head_record\" WHERE \"record\"='2\u20130' AND \"hard\"='1\u20130';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"head_to_head_record\" (\n \"record\" text,\n \"hard\" text,\n \"clay\" text,\n \"grass\" text,\n \"carpet\" text\n);\n\nQuestion: Which hard has a Clay of 0\u20130, Grass of 0\u20130, Carpet of 0\u20130, and a Record of 1\u20130?" }, { "role": "assistant", "content": "SELECT \"hard\" FROM \"head_to_head_record\" WHERE \"clay\"='0\u20130' AND \"grass\"='0\u20130' AND \"carpet\"='0\u20130' AND \"record\"='1\u20130';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"head_to_head_record\" (\n \"record\" text,\n \"hard\" text,\n \"clay\" text,\n \"grass\" text,\n \"carpet\" text\n);\n\nQuestion: Which carpet has a Clay of 1\u20130 and a Hard 1\u20131?" }, { "role": "assistant", "content": "SELECT \"carpet\" FROM \"head_to_head_record\" WHERE \"clay\"='1\u20130' AND \"hard\"='1\u20131';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"rank\" real,\n \"council_area\" text,\n \"speakers\" real,\n \"population\" real,\n \"percentage_pct\" real\n);\n\nQuestion: Name the most rank for population more than 93,378" }, { "role": "assistant", "content": "SELECT MAX(\"rank\") FROM \"references\" WHERE \"population\">'93,378';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"feature_film\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"type\" text,\n \"title\" text\n);\n\nQuestion: What award is featured in 1992?" }, { "role": "assistant", "content": "SELECT \"award\" FROM \"feature_film\" WHERE \"year\"=1992;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"feature_film\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"type\" text,\n \"title\" text\n);\n\nQuestion: What award was won in the best sound category for the exorcist before 1998?" }, { "role": "assistant", "content": "SELECT \"award\" FROM \"feature_film\" WHERE \"year\"<1998 AND \"type\"='won' AND \"category\"='best sound' AND \"title\"='the exorcist';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1953\" (\n \"1953\" text,\n \"party\" text,\n \"manhattan\" text,\n \"the_bronx\" text,\n \"brooklyn\" text,\n \"queens\" text,\n \"richmond_staten_is\" text,\n \"total\" real\n);\n\nQuestion: What was the candidate that got 1,019 votes for staten island?" }, { "role": "assistant", "content": "SELECT \"1953\" FROM \"1953\" WHERE \"richmond_staten_is\"='1,019';" } ]
[ { "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 \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the opposing team for the game on August 29?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='august 29';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_tries\" (\n \"player\" text,\n \"span\" text,\n \"start\" text,\n \"tries\" text,\n \"conv\" text,\n \"pens\" text,\n \"drop\" text\n);\n\nQuestion: which spans had a drop of 0?" }, { "role": "assistant", "content": "SELECT \"span\" FROM \"most_tries\" WHERE \"drop\"='0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_tries\" (\n \"player\" text,\n \"span\" text,\n \"start\" text,\n \"tries\" text,\n \"conv\" text,\n \"pens\" text,\n \"drop\" text\n);\n\nQuestion: which player has 11 tries?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"most_tries\" WHERE \"tries\"='11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_tries\" (\n \"player\" text,\n \"span\" text,\n \"start\" text,\n \"tries\" text,\n \"conv\" text,\n \"pens\" text,\n \"drop\" text\n);\n\nQuestion: which player has a conv of 14?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"most_tries\" WHERE \"conv\"='14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_tries\" (\n \"player\" text,\n \"span\" text,\n \"start\" text,\n \"tries\" text,\n \"conv\" text,\n \"pens\" text,\n \"drop\" text\n);\n\nQuestion: on the span of 1992-2000, what was the conv ?" }, { "role": "assistant", "content": "SELECT \"conv\" FROM \"most_tries\" WHERE \"span\"='1992-2000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semi_final_3_21_february_1999\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"points\" real,\n \"place\" real\n);\n\nQuestion: What is the high point toal for martine foubert placing below 2?" }, { "role": "assistant", "content": "SELECT MAX(\"points\") FROM \"semi_final_3_21_february_1999\" WHERE \"artist\"='martine foubert' AND \"place\">2;" } ]
[ { "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 much did the away team Melbourne score?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_1\" WHERE \"away_team\"='melbourne';" } ]
[ { "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 is the highest crowd number for the home team Richmond?" }, { "role": "assistant", "content": "SELECT MAX(\"crowd\") FROM \"round_1\" WHERE \"home_team\"='richmond';" } ]
[ { "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 home team played at Glenferrie Oval?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_1\" WHERE \"venue\"='glenferrie oval';" } ]
[ { "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 much did the away team St Kilda score?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_1\" 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_12\" (\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 score of 11.9 (75)?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_12\" WHERE \"away_team_score\"='11.9 (75)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_12\" (\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 an Away team of st kilda?" }, { "role": "assistant", "content": "SELECT \"crowd\" FROM \"round_12\" 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_12\" (\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 15.13 (103)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_12\" WHERE \"away_team_score\"='15.13 (103)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2006\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: What stadium has a final score of 26\u201321?" }, { "role": "assistant", "content": "SELECT \"stadium\" FROM \"2006\" WHERE \"final_score\"='26\u201321';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2006\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: When the new orleans saints were visiting texas stadium, what was the final score?" }, { "role": "assistant", "content": "SELECT \"final_score\" FROM \"2006\" WHERE \"stadium\"='texas stadium' AND \"visiting_team\"='new orleans saints';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2006\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: What was the final score at texas stadium on September 17?" }, { "role": "assistant", "content": "SELECT \"final_score\" FROM \"2006\" WHERE \"stadium\"='texas stadium' AND \"date\"='september 17';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2006\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: What was the final score for the game at giants stadium when the indianapolis colts were the visiting team?" }, { "role": "assistant", "content": "SELECT \"final_score\" FROM \"2006\" WHERE \"visiting_team\"='indianapolis colts' AND \"stadium\"='giants stadium';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"district_122_gross_revenue_by_sources\" (\n \"year\" real,\n \"property_taxes\" text,\n \"investment_earnings\" text,\n \"other_local_sources\" text,\n \"state_federal\" text,\n \"total_revenue\" text\n);\n\nQuestion: What were the investment earnings in the year that State and Federal taxes were $8,549,565?" }, { "role": "assistant", "content": "SELECT \"investment_earnings\" FROM \"district_122_gross_revenue_by_sources\" WHERE \"state_federal\"='8,549,565';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"district_122_gross_revenue_by_sources\" (\n \"year\" real,\n \"property_taxes\" text,\n \"investment_earnings\" text,\n \"other_local_sources\" text,\n \"state_federal\" text,\n \"total_revenue\" text\n);\n\nQuestion: What were the investment earnings in the year that State and Federal taxes were $13,999,169?" }, { "role": "assistant", "content": "SELECT \"investment_earnings\" FROM \"district_122_gross_revenue_by_sources\" WHERE \"state_federal\"='13,999,169';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"district_122_gross_revenue_by_sources\" (\n \"year\" real,\n \"property_taxes\" text,\n \"investment_earnings\" text,\n \"other_local_sources\" text,\n \"state_federal\" text,\n \"total_revenue\" text\n);\n\nQuestion: What were the investment earnings in a year when other local sources were $2,670,060 after 2001?" }, { "role": "assistant", "content": "SELECT \"investment_earnings\" FROM \"district_122_gross_revenue_by_sources\" WHERE \"year\">2001 AND \"other_local_sources\"='$2,670,060';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"district_122_gross_revenue_by_sources\" (\n \"year\" real,\n \"property_taxes\" text,\n \"investment_earnings\" text,\n \"other_local_sources\" text,\n \"state_federal\" text,\n \"total_revenue\" text\n);\n\nQuestion: What were the investment earnings in a year when total revenue was $21,779,618?" }, { "role": "assistant", "content": "SELECT \"investment_earnings\" FROM \"district_122_gross_revenue_by_sources\" WHERE \"total_revenue\"='21,779,618';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"district_122_gross_revenue_by_sources\" (\n \"year\" real,\n \"property_taxes\" text,\n \"investment_earnings\" text,\n \"other_local_sources\" text,\n \"state_federal\" text,\n \"total_revenue\" text\n);\n\nQuestion: What were property taxes in a year when total revenue was $40,891,700 after 2002?" }, { "role": "assistant", "content": "SELECT \"property_taxes\" FROM \"district_122_gross_revenue_by_sources\" WHERE \"year\">2002 AND \"total_revenue\"='$40,891,700';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"season\" real,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"rank\" text,\n \"viewers_in_millions\" text\n);\n\nQuestion: What rank for season 1?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"ratings\" WHERE \"season\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What week had an attendance of 27,262?" }, { "role": "assistant", "content": "SELECT \"week\" FROM \"schedule\" WHERE \"attendance\"='27,262';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What opponent has an attendance of 20,456?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"attendance\"='20,456';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stanley_cup_finals\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the record on March 27?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"stanley_cup_finals\" WHERE \"date\"='march 27';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stanley_cup_finals\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the record on March 22?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"stanley_cup_finals\" WHERE \"date\"='march 22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stanley_cup_finals\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the record on April 1?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"stanley_cup_finals\" WHERE \"date\"='april 1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_12\" (\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 date did North Melbourne score 22.14 (146) as the home team?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_12\" WHERE \"home_team_score\"='22.14 (146)' AND \"home_team\"='north melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_12\" (\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 lowest crowd size when Carlton was the away team." }, { "role": "assistant", "content": "SELECT MIN(\"crowd\") FROM \"round_12\" WHERE \"away_team\"='carlton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_12\" (\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 as the home team when Footscray was the away team?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_12\" 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_12\" (\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 was playing as the home team when the away team scored 18.14 (122)?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_12\" WHERE \"away_team_score\"='18.14 (122)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_12\" (\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 size was the crowd when Hawthorn was the home team?" }, { "role": "assistant", "content": "SELECT COUNT(\"crowd\") FROM \"round_12\" WHERE \"home_team\"='hawthorn';" } ]
[ { "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 \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest number of Gold the Nation of Italy had when it ranked other than 1, and had more than 0 Silver?" }, { "role": "assistant", "content": "SELECT MIN(\"gold\") FROM \"medal_table\" WHERE \"rank\">1 AND \"nation\"='italy' AND \"silver\">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 \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many Golds did the country with a Rank better than 5 and more Bronze than 1 receive?" }, { "role": "assistant", "content": "SELECT SUM(\"gold\") FROM \"medal_table\" WHERE \"rank\"<5 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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: When the Total is less than 1, how many Bronze medals are won?" }, { "role": "assistant", "content": "SELECT MIN(\"bronze\") FROM \"medal_table\" WHERE \"total\"<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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: When the Total is less than 1, and Bronze is 0, how many Gold medals are there?" }, { "role": "assistant", "content": "SELECT SUM(\"gold\") FROM \"medal_table\" WHERE \"bronze\"=0 AND \"total\"<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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the Rank of the Nation of Germany when the Total is more than 2?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"medal_table\" WHERE \"nation\"='germany' AND \"total\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"super_heavyweight_75_kg\" (\n \"name\" text,\n \"bodyweight\" real,\n \"snatch\" real,\n \"clean_jerk\" real,\n \"total_kg\" real\n);\n\nQuestion: Which weightlifter with a snatch larger than 117.5 had the lowest bodyweight?" }, { "role": "assistant", "content": "SELECT MIN(\"bodyweight\") FROM \"super_heavyweight_75_kg\" WHERE \"snatch\">117.5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"super_heavyweight_75_kg\" (\n \"name\" text,\n \"bodyweight\" real,\n \"snatch\" real,\n \"clean_jerk\" real,\n \"total_kg\" real\n);\n\nQuestion: Which weightlifter, who had a bodyweight of less than 136.16 and a clean and jerk larger than 135, had the highest Total?" }, { "role": "assistant", "content": "SELECT MAX(\"total_kg\") FROM \"super_heavyweight_75_kg\" WHERE \"bodyweight\"<136.16 AND \"clean_jerk\">135;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"super_heavyweight_75_kg\" (\n \"name\" text,\n \"bodyweight\" real,\n \"snatch\" real,\n \"clean_jerk\" real,\n \"total_kg\" real\n);\n\nQuestion: Of weightlifters who weighed more than 136.16, who had the highest Total?" }, { "role": "assistant", "content": "SELECT MAX(\"total_kg\") FROM \"super_heavyweight_75_kg\" WHERE \"bodyweight\">136.16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"super_heavyweight_75_kg\" (\n \"name\" text,\n \"bodyweight\" real,\n \"snatch\" real,\n \"clean_jerk\" real,\n \"total_kg\" real\n);\n\nQuestion: What was the average clean and jerk of all weightlifters who had a bodyweight smaller than 87.5 and a snatch of less than 95?" }, { "role": "assistant", "content": "SELECT AVG(\"clean_jerk\") FROM \"super_heavyweight_75_kg\" WHERE \"bodyweight\"=87.5 AND \"snatch\"<95;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"super_heavyweight_75_kg\" (\n \"name\" text,\n \"bodyweight\" real,\n \"snatch\" real,\n \"clean_jerk\" real,\n \"total_kg\" real\n);\n\nQuestion: What is the sum of the weight that all weightlifters managed to clean and jerk, among weightlifters who had a snatch of more than 95 and a Total of more than 200?" }, { "role": "assistant", "content": "SELECT COUNT(\"clean_jerk\") FROM \"super_heavyweight_75_kg\" WHERE \"total_kg\"=200 AND \"snatch\">95;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"exits\" (\n \"kilometer_no_rizal_park_basis\" text,\n \"kilometer_no_layac_basis\" text,\n \"exit\" text,\n \"barangay\" text,\n \"municipality\" text\n);\n\nQuestion: What kilometer (Rizal Park-basis) has a kilometer of 25?" }, { "role": "assistant", "content": "SELECT \"kilometer_no_rizal_park_basis\" FROM \"exits\" WHERE \"kilometer_no_layac_basis\"='25';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"exits\" (\n \"kilometer_no_rizal_park_basis\" text,\n \"kilometer_no_layac_basis\" text,\n \"exit\" text,\n \"barangay\" text,\n \"municipality\" text\n);\n\nQuestion: Which Barangay has an exit of Sisiman toll barrier?" }, { "role": "assistant", "content": "SELECT \"barangay\" FROM \"exits\" WHERE \"exit\"='sisiman toll barrier';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"exits\" (\n \"kilometer_no_rizal_park_basis\" text,\n \"kilometer_no_layac_basis\" text,\n \"exit\" text,\n \"barangay\" text,\n \"municipality\" text\n);\n\nQuestion: What kilometer (Layac-basis) has a Barangay of general lim (capot)?" }, { "role": "assistant", "content": "SELECT \"kilometer_no_layac_basis\" FROM \"exits\" WHERE \"barangay\"='general lim (capot)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"exits\" (\n \"kilometer_no_rizal_park_basis\" text,\n \"kilometer_no_layac_basis\" text,\n \"exit\" text,\n \"barangay\" text,\n \"municipality\" text\n);\n\nQuestion: In which municipality is Barangay Poblacion?" }, { "role": "assistant", "content": "SELECT \"municipality\" FROM \"exits\" WHERE \"barangay\"='poblacion';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"exits\" (\n \"kilometer_no_rizal_park_basis\" text,\n \"kilometer_no_layac_basis\" text,\n \"exit\" text,\n \"barangay\" text,\n \"municipality\" text\n);\n\nQuestion: What is the exit at kilometer (Rizal Park-basis) 164?" }, { "role": "assistant", "content": "SELECT \"exit\" FROM \"exits\" WHERE \"kilometer_no_rizal_park_basis\"='164';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"internationals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the competition on 23 February 1929?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"internationals\" WHERE \"date\"='23 february 1929';" } ]
[ { "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: What is the club/province of Sireli Bobo, who plays wing and has less than 24 caps?" }, { "role": "assistant", "content": "SELECT \"club_province\" FROM \"2007_rugby_world_cup_squads\" WHERE \"position\"='wing' AND \"caps\"<24 AND \"player\"='sireli bobo';" } ]
[ { "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: What is the total number of Caps Aca Ratuva, a flanker, has?" }, { "role": "assistant", "content": "SELECT COUNT(\"caps\") FROM \"2007_rugby_world_cup_squads\" WHERE \"position\"='flanker' AND \"player\"='aca ratuva';" } ]
[ { "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: What is the date of birth of Kameli Ratuvou?" }, { "role": "assistant", "content": "SELECT \"date_of_birth_age\" FROM \"2007_rugby_world_cup_squads\" WHERE \"player\"='kameli ratuvou';" } ]
[ { "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: What is the date of birth of Henry Qiodravu?" }, { "role": "assistant", "content": "SELECT \"date_of_birth_age\" FROM \"2007_rugby_world_cup_squads\" WHERE \"player\"='henry qiodravu';" } ]