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 \"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 sum of the gold medals of the total nation, which has more than 19 silver medals?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"gold\") FROM \"medal_table\" WHERE \"nation\"='total' AND \"silver\">19;"
}
] |
[
{
"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 average number of silver medals of the nation with 3 bronzes and more than 4 total medals?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"silver\") FROM \"medal_table\" WHERE \"bronze\"=3 AND \"total\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grammy_awards\" (\n \"year\" text,\n \"title\" text,\n \"genre\" text,\n \"label\" text,\n \"result\" text\n);\n\nQuestion: Which label's year was 1990?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"grammy_awards\" WHERE \"year\"='1990';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grammy_awards\" (\n \"year\" text,\n \"title\" text,\n \"genre\" text,\n \"label\" text,\n \"result\" text\n);\n\nQuestion: Which result's genre was jazz when its label was columbia and its title was requiem?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"grammy_awards\" WHERE \"genre\"='jazz' AND \"label\"='columbia' AND \"title\"='requiem';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grammy_awards\" (\n \"year\" text,\n \"title\" text,\n \"genre\" text,\n \"label\" text,\n \"result\" text\n);\n\nQuestion: Which year's label was label?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"grammy_awards\" WHERE \"label\"='label';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grammy_awards\" (\n \"year\" text,\n \"title\" text,\n \"genre\" text,\n \"label\" text,\n \"result\" text\n);\n\nQuestion: Which title's genre was jazz when it was nominated in 1996?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"grammy_awards\" WHERE \"genre\"='jazz' AND \"result\"='nominated' AND \"year\"='1996';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grammy_awards\" (\n \"year\" text,\n \"title\" text,\n \"genre\" text,\n \"label\" text,\n \"result\" text\n);\n\nQuestion: Which year's genre was jazz under the columbia label when it was nominated for the title Trio jeepy?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"grammy_awards\" WHERE \"genre\"='jazz' AND \"label\"='columbia' AND \"result\"='nominated' AND \"title\"='trio jeepy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grammy_awards\" (\n \"year\" text,\n \"title\" text,\n \"genre\" text,\n \"label\" text,\n \"result\" text\n);\n\nQuestion: Which label's year is 1993?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"grammy_awards\" WHERE \"year\"='1993';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"subsidiaries\" (\n \"company\" text,\n \"type\" text,\n \"principal_activities\" text,\n \"incorporated_in\" text,\n \"group_s_equity_shareholding\" text\n);\n\nQuestion: What company focuses on Engine Overhaul for their principal activity?"
},
{
"role": "assistant",
"content": "SELECT \"company\" FROM \"subsidiaries\" WHERE \"principal_activities\"='engine overhaul';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"subsidiaries\" (\n \"company\" text,\n \"type\" text,\n \"principal_activities\" text,\n \"incorporated_in\" text,\n \"group_s_equity_shareholding\" text\n);\n\nQuestion: What is the group equity shareholding for abacus distribution systems (malaysia) sdn bhd?"
},
{
"role": "assistant",
"content": "SELECT \"group_s_equity_shareholding\" FROM \"subsidiaries\" WHERE \"company\"='abacus distribution systems (malaysia) sdn bhd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"subsidiaries\" (\n \"company\" text,\n \"type\" text,\n \"principal_activities\" text,\n \"incorporated_in\" text,\n \"group_s_equity_shareholding\" text\n);\n\nQuestion: What company has a Group Equity Shareholding value of 60%?"
},
{
"role": "assistant",
"content": "SELECT \"company\" FROM \"subsidiaries\" WHERE \"group_s_equity_shareholding\"='60%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"subsidiaries\" (\n \"company\" text,\n \"type\" text,\n \"principal_activities\" text,\n \"incorporated_in\" text,\n \"group_s_equity_shareholding\" text\n);\n\nQuestion: What is the Group Equity shareholding of the company that has their principal activities as catering, and is of the Associate type?"
},
{
"role": "assistant",
"content": "SELECT \"group_s_equity_shareholding\" FROM \"subsidiaries\" WHERE \"principal_activities\"='catering' AND \"type\"='associate';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singapore_airlines_operating_highlights_\" (\n \"year_ended\" text,\n \"passengers_thousand\" real,\n \"rpk_million\" real,\n \"ask_million\" real,\n \"load_factor_pct\" real,\n \"yield_s_km\" real\n);\n\nQuestion: What is the highest yield when the ASK is greater than 88,252.7, an RPK of 74,183.2, and a load factor less than 74.5?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"yield_s_km\") FROM \"singapore_airlines_operating_highlights_\" WHERE \"ask_million\">'88,252.7' AND \"rpk_million\"='74,183.2' AND \"load_factor_pct\"<74.5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: When Date has a Game larger than 4 and a Team of san antonio, and a Record of 4-3?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"playoffs\" WHERE \"game\">4 AND \"team\"='san antonio' AND \"record\"='4-3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Which Team has a Score of 108-105 (ot)?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"playoffs\" WHERE \"score\"='108-105 (ot)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Which Game has a Team of at san antonio, and a Record of 3-3?"
},
{
"role": "assistant",
"content": "SELECT \"game\" FROM \"playoffs\" WHERE \"team\"='at san antonio' AND \"record\"='3-3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Which Record has a Score of 105-115?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"playoffs\" WHERE \"score\"='105-115';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_records\" (\n \"season\" real,\n \"division\" text,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"final_position\" text,\n \"notes\" text\n);\n\nQuestion: What's the average amount of ties had when a team wins 6 and it's past the 2004 season?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"ties\") FROM \"season_records\" WHERE \"wins\"=6 AND \"season\">2004;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_09_season_as_a_four_year_old\" (\n \"result\" text,\n \"date\" text,\n \"race\" text,\n \"venue\" text,\n \"group\" text,\n \"distance\" text,\n \"weight_kg\" real,\n \"time\" text,\n \"jockey\" text,\n \"winner_2nd\" text\n);\n\nQuestion: What was the result of the race that had a group of G1 at Moonee Valley?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"2008_09_season_as_a_four_year_old\" WHERE \"group\"='g1' AND \"venue\"='moonee valley';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_09_season_as_a_four_year_old\" (\n \"result\" text,\n \"date\" text,\n \"race\" text,\n \"venue\" text,\n \"group\" text,\n \"distance\" text,\n \"weight_kg\" real,\n \"time\" text,\n \"jockey\" text,\n \"winner_2nd\" text\n);\n\nQuestion: What was the result of the race that was a 2000m distance?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"2008_09_season_as_a_four_year_old\" WHERE \"distance\"='2000m';"
}
] |
[
{
"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: Which Opponent has a Date of november 21, 1999?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='november 21, 1999';"
}
] |
[
{
"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: Which Attendance has a Week smaller than 8, and an Opponent of philadelphia eagles?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"week\"<8 AND \"opponent\"='philadelphia eagles';"
}
] |
[
{
"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: Which Attendance has a Result of l 26\u201316?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"result\"='l 26\u201316';"
}
] |
[
{
"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\" real\n);\n\nQuestion: What was the highest attendance on week 13?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"schedule\" WHERE \"week\"=13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"professional_record\" (\n \"result\" text,\n \"opponent\" text,\n \"type\" text,\n \"round\" text,\n \"date\" text\n);\n\nQuestion: Which Result has a Round of 6?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"professional_record\" WHERE \"round\"='6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"professional_record\" (\n \"result\" text,\n \"opponent\" text,\n \"type\" text,\n \"round\" text,\n \"date\" text\n);\n\nQuestion: When is a Type of tko, and an Opponent of jesse brinkley"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"professional_record\" WHERE \"type\"='tko' AND \"opponent\"='jesse brinkley';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"professional_record\" (\n \"result\" text,\n \"opponent\" text,\n \"type\" text,\n \"round\" text,\n \"date\" text\n);\n\nQuestion: Which Result has an Opponent of steve walker?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"professional_record\" WHERE \"opponent\"='steve walker';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"professional_record\" (\n \"result\" text,\n \"opponent\" text,\n \"type\" text,\n \"round\" text,\n \"date\" text\n);\n\nQuestion: Which Opponent has a Type of ud and a Round of 10 on 2008-06-11?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"professional_record\" WHERE \"type\"='ud' AND \"round\"='10' AND \"date\"='2008-06-11';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"professional_record\" (\n \"result\" text,\n \"opponent\" text,\n \"type\" text,\n \"round\" text,\n \"date\" text\n);\n\nQuestion: Which Opponent has a Type of tko, and a Round of 2 (6) on 2006-09-20?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"professional_record\" WHERE \"type\"='tko' AND \"round\"='2 (6)' AND \"date\"='2006-09-20';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"professional_record\" (\n \"result\" text,\n \"opponent\" text,\n \"type\" text,\n \"round\" text,\n \"date\" text\n);\n\nQuestion: When has a Type of tko, and a Round of 1 (6)"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"professional_record\" WHERE \"type\"='tko' AND \"round\"='1 (6)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lpf_s_campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: How many positions have a played greater than 12?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"position\") FROM \"lpf_s_campeonato_paulista\" WHERE \"played\">12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lpf_s_campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the lowest played that has points greater than 11, 1 as the position, and a loss less than 1?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"played\") FROM \"lpf_s_campeonato_paulista\" WHERE \"points\">11 AND \"position\"=1 AND \"lost\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_4_1\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What is the Date that has a Outcome of winner, and \u00e7a\u011fla b\u00fcy\u00fckak\u00e7ay was the opponent in the final?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"singles_5_4_1\" WHERE \"outcome\"='winner' AND \"opponent_in_the_final\"='\u00e7a\u011fla b\u00fcy\u00fckak\u00e7ay';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_4_1\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What is the Outcome when \u00e7a\u011fla b\u00fcy\u00fckak\u00e7ay was the opponent in the final?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"singles_5_4_1\" WHERE \"opponent_in_the_final\"='\u00e7a\u011fla b\u00fcy\u00fckak\u00e7ay';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_4_1\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What is the Score when the opponent in the final is alicia pillay on a hard surface?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles_5_4_1\" WHERE \"surface\"='hard' AND \"opponent_in_the_final\"='alicia pillay';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_4_1\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What is the Opponent in the final when the outcome was runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"opponent_in_the_final\" FROM \"singles_5_4_1\" WHERE \"outcome\"='runner-up';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_4_1\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What is the Opponent in the final with an outcome of winner on 14-may-2007?"
},
{
"role": "assistant",
"content": "SELECT \"opponent_in_the_final\" FROM \"singles_5_4_1\" WHERE \"outcome\"='winner' AND \"date\"='14-may-2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_4_1\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What is the Score for 09-oct-2006?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles_5_4_1\" WHERE \"date\"='09-oct-2006';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"night\" (\n \"time\" text,\n \"06_00_pm\" text,\n \"07_00_pm\" text,\n \"08_00_pm\" text,\n \"09_00_pm\" text,\n \"10_00_pm\" text,\n \"10_30_pm\" text,\n \"11_00_pm\" text\n);\n\nQuestion: What shows for 10:00 PM when the 11:00 PM is to ma dauy kan (vj ja)?"
},
{
"role": "assistant",
"content": "SELECT \"10_00_pm\" FROM \"night\" WHERE \"11_00_pm\"='to ma dauy kan (vj ja)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"night\" (\n \"time\" text,\n \"06_00_pm\" text,\n \"07_00_pm\" text,\n \"08_00_pm\" text,\n \"09_00_pm\" text,\n \"10_00_pm\" text,\n \"10_30_pm\" text,\n \"11_00_pm\" text\n);\n\nQuestion: What is the 08:00 PM when the 07:00 PM is I am siam (rerun)?"
},
{
"role": "assistant",
"content": "SELECT \"08_00_pm\" FROM \"night\" WHERE \"07_00_pm\"='i am siam (rerun)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"night\" (\n \"time\" text,\n \"06_00_pm\" text,\n \"07_00_pm\" text,\n \"08_00_pm\" text,\n \"09_00_pm\" text,\n \"10_00_pm\" text,\n \"10_30_pm\" text,\n \"11_00_pm\" text\n);\n\nQuestion: What is the 10:30 PM when the 08:00 PM is [v] play & learn, and a Time of Sunday?"
},
{
"role": "assistant",
"content": "SELECT \"10_30_pm\" FROM \"night\" WHERE \"08_00_pm\"='[v] play & learn' AND \"time\"='sunday';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What was the time of the bout against Dave Menne?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='dave menne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What was the time of the bout that ended in a TKO (strikes)?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"method\"='tko (strikes)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_top_association_football_goal_sc\" (\n \"rank\" real,\n \"name\" text,\n \"years\" text,\n \"matches\" real,\n \"goals\" real\n);\n\nQuestion: What is the number of matches for the player in rank 8?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"matches\") FROM \"list_of_top_association_football_goal_sc\" WHERE \"rank\"=8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_pool_c\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"total\" text\n);\n\nQuestion: Which set 3 has a Set 1 of 19-25, and a Set 2 of 19-25?"
},
{
"role": "assistant",
"content": "SELECT \"set_3\" FROM \"results_pool_c\" WHERE \"set_1\"='19-25' AND \"set_2\"='19-25';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_pool_c\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"total\" text\n);\n\nQuestion: What is the set 5 if the Date is jun 7, and a Set 4 is 21-25?"
},
{
"role": "assistant",
"content": "SELECT \"set_5\" FROM \"results_pool_c\" WHERE \"date\"='jun 7' AND \"set_4\"='21-25';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_pool_c\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"total\" text\n);\n\nQuestion: What is the Set 5 if Set 2 is 25-20?"
},
{
"role": "assistant",
"content": "SELECT \"set_5\" FROM \"results_pool_c\" WHERE \"set_2\"='25-20';"
}
] |
[
{
"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 \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which driver's grid was 24?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"race\" WHERE \"grid\"=24;"
}
] |
[
{
"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 \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the mean number of laps when the grid is less than 19 and time/retired is +21.3 secs?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"laps\") FROM \"race\" WHERE \"grid\"<19 AND \"time_retired\"='+21.3 secs';"
}
] |
[
{
"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 \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the smallest number of laps for Team Green when the grid is 1?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"race\" WHERE \"team\"='team green' AND \"grid\"=1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"population\" (\n \"1861\" real,\n \"1866\" real,\n \"1872\" real,\n \"1876\" real,\n \"1881\" real,\n \"1886\" real,\n \"1891\" real\n);\n\nQuestion: What is the total number of 1876(s), when 1872 is less than 1921, and when 1891 is less than 354?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"1876\") FROM \"population\" WHERE \"1872\"<1921 AND \"1891\"<354;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"population\" (\n \"1861\" real,\n \"1866\" real,\n \"1872\" real,\n \"1876\" real,\n \"1881\" real,\n \"1886\" real,\n \"1891\" real\n);\n\nQuestion: What is the sum of 1886(s), when 1886 is greater than 1070, and when 1891 is less than 1946?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"1886\") FROM \"population\" WHERE \"1866\">1070 AND \"1891\"<1946;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"population\" (\n \"1861\" real,\n \"1866\" real,\n \"1872\" real,\n \"1876\" real,\n \"1881\" real,\n \"1886\" real,\n \"1891\" real\n);\n\nQuestion: What is the sum of 1891(s), when 1872 is less than 685, and when 1881 is less than 348?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"1891\") FROM \"population\" WHERE \"1872\"<685 AND \"1881\"<348;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"population\" (\n \"1861\" real,\n \"1866\" real,\n \"1872\" real,\n \"1876\" real,\n \"1881\" real,\n \"1886\" real,\n \"1891\" real\n);\n\nQuestion: What is the sum of 1872(s), when 1866 is greater than 856, when 1861 is greater than 1906, and when 1876 is greater than 1990?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"1872\") FROM \"population\" WHERE \"1866\">856 AND \"1861\">1906 AND \"1876\">1990;"
}
] |
[
{
"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 \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the Record with a Date that is december 20?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='december 20';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: In what round was the first outside linebacker picked?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"nfl_draft\" WHERE \"position\"='outside linebacker';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"england_in_australia_1901_2\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: Which Venue resulted in AUS by 229 runs?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"england_in_australia_1901_2\" WHERE \"result\"='aus by 229 runs';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"england_in_australia_1901_2\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: Who was the Away Captain when the Home Captain was Joe Darling at Melbourne Cricket Ground?"
},
{
"role": "assistant",
"content": "SELECT \"away_captain\" FROM \"england_in_australia_1901_2\" WHERE \"venue\"='melbourne cricket ground' AND \"home_captain\"='joe darling';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"england_in_australia_1901_2\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: Who was the Home Captain and the Result for AUS by 4 wkts?"
},
{
"role": "assistant",
"content": "SELECT \"home_captain\" FROM \"england_in_australia_1901_2\" WHERE \"result\"='aus by 4 wkts';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_league\" (\n \"match\" real,\n \"date\" text,\n \"home_away\" text,\n \"opponent_team\" text,\n \"score\" text\n);\n\nQuestion: What was the highest match when the away opponent was Dalian Shide Siwu?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"match\") FROM \"s_league\" WHERE \"opponent_team\"='dalian shide siwu' AND \"home_away\"='away';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_league\" (\n \"match\" real,\n \"date\" text,\n \"home_away\" text,\n \"opponent_team\" text,\n \"score\" text\n);\n\nQuestion: Which Home/Away was on April 27, 2008?"
},
{
"role": "assistant",
"content": "SELECT \"home_away\" FROM \"s_league\" WHERE \"date\"='april 27, 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_league\" (\n \"match\" real,\n \"date\" text,\n \"home_away\" text,\n \"opponent_team\" text,\n \"score\" text\n);\n\nQuestion: What was the score on March 3, 2008?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"s_league\" WHERE \"date\"='march 3, 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list\" (\n \"hangul\" text,\n \"hanja\" text,\n \"revised\" text,\n \"mc_cune_reischauer\" text,\n \"2000_n_south_korea_population\" real\n);\n\nQuestion: What is the McCune-Reischauer when the 2000 n South Korea population * is more than 6,796,227 people, and a Hangul of \uc1a1?"
},
{
"role": "assistant",
"content": "SELECT \"mc_cune_reischauer\" FROM \"list\" WHERE \"2000_n_south_korea_population\">'6,796,227' AND \"hangul\"='\uc1a1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list\" (\n \"hangul\" text,\n \"hanja\" text,\n \"revised\" text,\n \"mc_cune_reischauer\" text,\n \"2000_n_south_korea_population\" real\n);\n\nQuestion: What is the Hanja for McCune-Reischauer of ch\u014fn?"
},
{
"role": "assistant",
"content": "SELECT \"hanja\" FROM \"list\" WHERE \"mc_cune_reischauer\"='ch\u014fn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list\" (\n \"hangul\" text,\n \"hanja\" text,\n \"revised\" text,\n \"mc_cune_reischauer\" text,\n \"2000_n_south_korea_population\" real\n);\n\nQuestion: What is the Hangul when the Hanja is \u897f, \u5f90?"
},
{
"role": "assistant",
"content": "SELECT \"hangul\" FROM \"list\" WHERE \"hanja\"='\u897f, \u5f90';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the Venue with a Result that is win, and a Score that is 5-0?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"result\"='win' AND \"score\"='5-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the Competition with a Result of win with a Score that is 1-0?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"result\"='win' AND \"score\"='1-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: How many total Gold medals did the nation ranked #3 receive?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"gold\") FROM \"medal_table\" WHERE \"rank\"='3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"recent_markets\" (\n \"ship_size\" text,\n \"cargo\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text\n);\n\nQuestion: What ship size had a cargo value of $46,000 in 2006?"
},
{
"role": "assistant",
"content": "SELECT \"ship_size\" FROM \"recent_markets\" WHERE \"2006\"='$46,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"recent_markets\" (\n \"ship_size\" text,\n \"cargo\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text\n);\n\nQuestion: What ship size had a cargo value of $31,750 in 2006?"
},
{
"role": "assistant",
"content": "SELECT \"ship_size\" FROM \"recent_markets\" WHERE \"2006\"='$31,750';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"recent_markets\" (\n \"ship_size\" text,\n \"cargo\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text\n);\n\nQuestion: What was the cargo value in 2005 with a ship size of all product carriers?"
},
{
"role": "assistant",
"content": "SELECT \"2005\" FROM \"recent_markets\" WHERE \"ship_size\"='all product carriers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"recent_markets\" (\n \"ship_size\" text,\n \"cargo\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text\n);\n\nQuestion: What was the cargo value in 2004 for ship size?"
},
{
"role": "assistant",
"content": "SELECT \"2004\" FROM \"recent_markets\" WHERE \"ship_size\"='ship size';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"recent_markets\" (\n \"ship_size\" text,\n \"cargo\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text\n);\n\nQuestion: What cargo was contained in a ship size of aframax?"
},
{
"role": "assistant",
"content": "SELECT \"cargo\" FROM \"recent_markets\" WHERE \"ship_size\"='aframax';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"recent_markets\" (\n \"ship_size\" text,\n \"cargo\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text\n);\n\nQuestion: What was the cargo value in 2005 for all product carriers?"
},
{
"role": "assistant",
"content": "SELECT \"2005\" FROM \"recent_markets\" WHERE \"cargo\"='all product carriers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"vital_statistics\" (\n \"average_population_x_1_000\" text,\n \"live_births\" text,\n \"deaths\" text,\n \"natural_change\" text,\n \"migration\" text,\n \"crude_birth_rate_per_1_000\" real,\n \"crude_death_rate_per_1_000\" real,\n \"natural_change_per_1_000\" real,\n \"migration_per_1_000\" real\n);\n\nQuestion: How many Crude death rate (per 1,000) has a Migration (per 1,000) larger than -5.06, and a Natural change (per 1,000) larger than 7.06? Question 1"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crude_death_rate_per_1_000\") FROM \"vital_statistics\" WHERE \"migration_per_1_000\">-5.06 AND \"natural_change_per_1_000\">7.06;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"vital_statistics\" (\n \"average_population_x_1_000\" text,\n \"live_births\" text,\n \"deaths\" text,\n \"natural_change\" text,\n \"migration\" text,\n \"crude_birth_rate_per_1_000\" real,\n \"crude_death_rate_per_1_000\" real,\n \"natural_change_per_1_000\" real,\n \"migration_per_1_000\" real\n);\n\nQuestion: Which Natural change (per 1,000) has Deaths of 17 413, and a Migration (per 1,000) larger than -7.35?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"natural_change_per_1_000\") FROM \"vital_statistics\" WHERE \"deaths\"='17 413' AND \"migration_per_1_000\">-7.35;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"vital_statistics\" (\n \"average_population_x_1_000\" text,\n \"live_births\" text,\n \"deaths\" text,\n \"natural_change\" text,\n \"migration\" text,\n \"crude_birth_rate_per_1_000\" real,\n \"crude_death_rate_per_1_000\" real,\n \"natural_change_per_1_000\" real,\n \"migration_per_1_000\" real\n);\n\nQuestion: How many Migration (per 1,000) has a Crude birth rate (per 1,000) of 17.54 and a Natural change (per 1,000) larger than 10.95?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"migration_per_1_000\") FROM \"vital_statistics\" WHERE \"crude_birth_rate_per_1_000\"=17.54 AND \"natural_change_per_1_000\">10.95;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"vital_statistics\" (\n \"average_population_x_1_000\" text,\n \"live_births\" text,\n \"deaths\" text,\n \"natural_change\" text,\n \"migration\" text,\n \"crude_birth_rate_per_1_000\" real,\n \"crude_death_rate_per_1_000\" real,\n \"natural_change_per_1_000\" real,\n \"migration_per_1_000\" real\n);\n\nQuestion: What kind of Live births has a Migration of -14 873?"
},
{
"role": "assistant",
"content": "SELECT \"live_births\" FROM \"vital_statistics\" WHERE \"migration\"='-14 873';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_top_association_football_goal_sc\" (\n \"rank\" real,\n \"name\" text,\n \"years\" text,\n \"games\" real,\n \"goals\" real,\n \"goals_games\" real\n);\n\nQuestion: What is the average Goals/Games for Rummenigge, Karl-Heinz, with Goals less than 162?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"goals_games\") FROM \"list_of_top_association_football_goal_sc\" WHERE \"name\"='rummenigge, karl-heinz' AND \"goals\"<162;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_top_association_football_goal_sc\" (\n \"rank\" real,\n \"name\" text,\n \"years\" text,\n \"games\" real,\n \"goals\" real,\n \"goals_games\" real\n);\n\nQuestion: What is the sum of Games for Allofs, Klaus, with Goals less than 177?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"games\") FROM \"list_of_top_association_football_goal_sc\" WHERE \"name\"='allofs, klaus' AND \"goals\"<177;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_top_association_football_goal_sc\" (\n \"rank\" real,\n \"name\" text,\n \"years\" text,\n \"games\" real,\n \"goals\" real,\n \"goals_games\" real\n);\n\nQuestion: What is the highest Rank for more than 220 goals in 1965\u20131978-78?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"list_of_top_association_football_goal_sc\" WHERE \"goals\">220 AND \"years\"='1965\u20131978-78';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"title\" text,\n \"length\" text,\n \"writer\" text,\n \"composer\" text,\n \"arranger\" text\n);\n\nQuestion: Who is the composer of El Hanone?"
},
{
"role": "assistant",
"content": "SELECT \"composer\" FROM \"track_listing\" WHERE \"title\"='el hanone';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"title\" text,\n \"length\" text,\n \"writer\" text,\n \"composer\" text,\n \"arranger\" text\n);\n\nQuestion: Which arranger worked with composer Imad Shams Eldeen at 4:03?"
},
{
"role": "assistant",
"content": "SELECT \"arranger\" FROM \"track_listing\" WHERE \"composer\"='imad shams eldeen' AND \"length\"='4:03';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"title\" text,\n \"length\" text,\n \"writer\" text,\n \"composer\" text,\n \"arranger\" text\n);\n\nQuestion: What is the title track that is 3:50 and arranged by Tarek Akef?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"track_listing\" WHERE \"arranger\"='tarek akef' AND \"length\"='3:50';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"title\" text,\n \"length\" text,\n \"writer\" text,\n \"composer\" text,\n \"arranger\" text\n);\n\nQuestion: Who is the arranger for Ana Rouh?"
},
{
"role": "assistant",
"content": "SELECT \"arranger\" FROM \"track_listing\" WHERE \"title\"='ana rouh';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"title\" text,\n \"length\" text,\n \"writer\" text,\n \"composer\" text,\n \"arranger\" text\n);\n\nQuestion: Who was the writer that worked with arranger Tarek Akef on a 4:58 song?"
},
{
"role": "assistant",
"content": "SELECT \"writer\" FROM \"track_listing\" WHERE \"arranger\"='tarek akef' AND \"length\"='4:58';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director_s\" text,\n \"result\" text\n);\n\nQuestion: What is the year of the ceremony with a not nominated result and ni\u010diji sin as the original title?"
},
{
"role": "assistant",
"content": "SELECT \"year_ceremony\" FROM \"submissions\" WHERE \"result\"='not nominated' AND \"original_title\"='ni\u010diji sin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director_s\" text,\n \"result\" text\n);\n\nQuestion: What is the year of the ceremony with the original title ni\u010diji sin?"
},
{
"role": "assistant",
"content": "SELECT \"year_ceremony\" FROM \"submissions\" WHERE \"original_title\"='ni\u010diji sin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director_s\" text,\n \"result\" text\n);\n\nQuestion: What is the result of the ceremony in 2006 (79th)?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"submissions\" WHERE \"year_ceremony\"='2006 (79th)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director_s\" text,\n \"result\" text\n);\n\nQuestion: What is the film title used for nomination with the original title sedamdeset i dva dana?"
},
{
"role": "assistant",
"content": "SELECT \"film_title_used_in_nomination\" FROM \"submissions\" WHERE \"original_title\"='sedamdeset i dva dana';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director_s\" text,\n \"result\" text\n);\n\nQuestion: Who is the director of Cannibal vegetarian, which is the film title used in nomination?"
},
{
"role": "assistant",
"content": "SELECT \"director_s\" FROM \"submissions\" WHERE \"film_title_used_in_nomination\"='cannibal vegetarian';"
}
] |
[
{
"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 \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"points_for\" real,\n \"points_against\" real,\n \"first_downs\" real,\n \"attendance\" real\n);\n\nQuestion: What is the average First Downs for december 4?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"first_downs\") FROM \"schedule\" WHERE \"date\"='december 4';"
}
] |
[
{
"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 \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"points_for\" real,\n \"points_against\" real,\n \"first_downs\" real,\n \"attendance\" real\n);\n\nQuestion: What is the lowest Attendance against the tampa bay buccaneers, with Points Against of less than 7?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"attendance\") FROM \"schedule\" WHERE \"opponent\"='tampa bay buccaneers' AND \"points_against\"<7;"
}
] |
[
{
"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 \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"points_for\" real,\n \"points_against\" real,\n \"first_downs\" real,\n \"attendance\" real\n);\n\nQuestion: What is the highest Points when the record was 12\u20132, and the Points Against are larger than 6?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points_for\") FROM \"schedule\" WHERE \"record\"='12\u20132' AND \"points_against\">6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"laboratory_findings_in_various_platelet_\" (\n \"condition\" text,\n \"prothrombin_time\" text,\n \"partial_thromboplastin_time\" text,\n \"bleeding_time\" text,\n \"platelet_count\" text\n);\n\nQuestion: Which Partial thromboplastin time has a Prothrombin time of prolonged and a Condition of factor v deficiency?"
},
{
"role": "assistant",
"content": "SELECT \"partial_thromboplastin_time\" FROM \"laboratory_findings_in_various_platelet_\" WHERE \"prothrombin_time\"='prolonged' AND \"condition\"='factor v deficiency';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"laboratory_findings_in_various_platelet_\" (\n \"condition\" text,\n \"prothrombin_time\" text,\n \"partial_thromboplastin_time\" text,\n \"bleeding_time\" text,\n \"platelet_count\" text\n);\n\nQuestion: Which Condition has a Bleeding time of prolonged, a Platelet count of decreased, and Prothrombin time of prolonged?"
},
{
"role": "assistant",
"content": "SELECT \"condition\" FROM \"laboratory_findings_in_various_platelet_\" WHERE \"bleeding_time\"='prolonged' AND \"platelet_count\"='decreased' AND \"prothrombin_time\"='prolonged';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"laboratory_findings_in_various_platelet_\" (\n \"condition\" text,\n \"prothrombin_time\" text,\n \"partial_thromboplastin_time\" text,\n \"bleeding_time\" text,\n \"platelet_count\" text\n);\n\nQuestion: Which Platelet count has a Partial thromboplastin time of prolonged or unaffected?"
},
{
"role": "assistant",
"content": "SELECT \"platelet_count\" FROM \"laboratory_findings_in_various_platelet_\" WHERE \"partial_thromboplastin_time\"='prolonged or unaffected';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"laboratory_findings_in_various_platelet_\" (\n \"condition\" text,\n \"prothrombin_time\" text,\n \"partial_thromboplastin_time\" text,\n \"bleeding_time\" text,\n \"platelet_count\" text\n);\n\nQuestion: Which Prothrombin time that has a Partial thromboplastin time of unaffected, and a Condition of thrombocytopenia?"
},
{
"role": "assistant",
"content": "SELECT \"prothrombin_time\" FROM \"laboratory_findings_in_various_platelet_\" WHERE \"partial_thromboplastin_time\"='unaffected' AND \"condition\"='thrombocytopenia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"laboratory_findings_in_various_platelet_\" (\n \"condition\" text,\n \"prothrombin_time\" text,\n \"partial_thromboplastin_time\" text,\n \"bleeding_time\" text,\n \"platelet_count\" text\n);\n\nQuestion: Which Condition has a Bleeding time of unaffected and a Prothrombin time of prolonged?"
},
{
"role": "assistant",
"content": "SELECT \"condition\" FROM \"laboratory_findings_in_various_platelet_\" WHERE \"bleeding_time\"='unaffected' AND \"prothrombin_time\"='prolonged';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"laboratory_findings_in_various_platelet_\" (\n \"condition\" text,\n \"prothrombin_time\" text,\n \"partial_thromboplastin_time\" text,\n \"bleeding_time\" text,\n \"platelet_count\" text\n);\n\nQuestion: Which Partial thromboplastin time has a Prothrombin time of prolonged, and a Bleeding time of unaffected, and a Condition of vitamin k deficiency or warfarin? Question 6"
},
{
"role": "assistant",
"content": "SELECT \"partial_thromboplastin_time\" FROM \"laboratory_findings_in_various_platelet_\" WHERE \"prothrombin_time\"='prolonged' AND \"bleeding_time\"='unaffected' AND \"condition\"='vitamin k deficiency or warfarin';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.