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 \"composition_of_the_15th_seanad\" (\n \"administrative_panel\" real,\n \"agricultural_panel\" real,\n \"cultural_and_educational_panel\" real,\n \"industrial_and_commercial_panel\" real,\n \"labour_panel\" real,\n \"national_university_of_ireland\" real,\n \"university_of_dublin\" real,\n \"nominated_by_the_taoiseach\" real,\n \"total\" real\n);\n\nQuestion: Which Agricultural Panel has a Nominated by the Taoiseach larger than 6, and a Total larger than 60?" }, { "role": "assistant", "content": "SELECT SUM(\"agricultural_panel\") FROM \"composition_of_the_15th_seanad\" WHERE \"nominated_by_the_taoiseach\">6 AND \"total\">60;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is Team 1 when Team 2 is Jac Port-Gentil?" }, { "role": "assistant", "content": "SELECT \"team_1\" FROM \"second_round\" WHERE \"team_2\"='jac port-gentil';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What was Team 2 with a 2nd leg of 0-0?" }, { "role": "assistant", "content": "SELECT \"team_2\" FROM \"second_round\" WHERE \"2nd_leg\"='0-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the 1st leg of the Round that has a 2nd leg of 1-3 and Team 1 Es Tunis?" }, { "role": "assistant", "content": "SELECT \"1st_leg\" FROM \"second_round\" WHERE \"2nd_leg\"='1-3' AND \"team_1\"='es tunis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sunshine_tour_wins_6\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is Winning Score, when Tournament is Joburg Open 1, and when Date is 17 Jan 2010?" }, { "role": "assistant", "content": "SELECT \"winning_score\" FROM \"sunshine_tour_wins_6\" WHERE \"tournament\"='joburg open 1' AND \"date\"='17 jan 2010';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sunshine_tour_wins_6\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is Date, when Tournament is Alfred Dunhill Championship 1?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"sunshine_tour_wins_6\" WHERE \"tournament\"='alfred dunhill championship 1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sunshine_tour_wins_6\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is Tournament, when Margin is Victory of 6 Strokes?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"sunshine_tour_wins_6\" WHERE \"margin_of_victory\"='6 strokes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sunshine_tour_wins_6\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is Winning Score, when Date is 17 Jan 2010?" }, { "role": "assistant", "content": "SELECT \"winning_score\" FROM \"sunshine_tour_wins_6\" WHERE \"date\"='17 jan 2010';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sunshine_tour_wins_6\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is Tournament, when Runner(s)-Up is Garth Mulroy?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"sunshine_tour_wins_6\" WHERE \"runner_s_up\"='garth mulroy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sunshine_tour_wins_6\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is Runner(s)-Up, when Margin of Victory is 1 Stroke, and when Tournament is Joburg Open 1?" }, { "role": "assistant", "content": "SELECT \"runner_s_up\" FROM \"sunshine_tour_wins_6\" WHERE \"margin_of_victory\"='1 stroke' AND \"tournament\"='joburg open 1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" text,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"podiums\" real,\n \"points\" real,\n \"position\" text\n);\n\nQuestion: What is the points sum of the series with less than 0 poles?" }, { "role": "assistant", "content": "SELECT SUM(\"points\") FROM \"career_summary\" WHERE \"poles\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" text,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"podiums\" real,\n \"points\" real,\n \"position\" text\n);\n\nQuestion: What is the sum of the races in the 2007 season, which has more than 4 podiums?" }, { "role": "assistant", "content": "SELECT SUM(\"races\") FROM \"career_summary\" WHERE \"podiums\">4 AND \"season\"='2007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" text,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"podiums\" real,\n \"points\" real,\n \"position\" text\n);\n\nQuestion: What is the sum of the poles of Team la fili\u00e8re, which has less than 162 points?" }, { "role": "assistant", "content": "SELECT SUM(\"poles\") FROM \"career_summary\" WHERE \"team\"='la fili\u00e8re' AND \"points\"<162;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" text,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"podiums\" real,\n \"points\" real,\n \"position\" text\n);\n\nQuestion: What is the average number of points in the 2012 season, which has less than 1 wins and less than 0 podiums?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"career_summary\" WHERE \"wins\"<1 AND \"season\"='2012' AND \"podiums\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_class\" (\n \"class\" text,\n \"season\" text,\n \"race\" real,\n \"podiums\" real,\n \"pole\" real\n);\n\nQuestion: How many poles had a moto2 class?" }, { "role": "assistant", "content": "SELECT \"pole\" FROM \"by_class\" WHERE \"class\"='moto2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"composition_of_the_7th_seanad\" (\n \"administrative_panel\" real,\n \"agricultural_panel\" real,\n \"cultural_and_educational_panel\" real,\n \"industrial_and_commercial_panel\" real,\n \"labour_panel\" real,\n \"national_university_of_ireland\" real,\n \"university_of_dublin\" real,\n \"nominated_by_the_taoiseach\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of the Cultural and Educational Panels that have an Administrative Panel greater than 1, an Agricultural Panel of 11 and a University of Dublin smaller than 3?" }, { "role": "assistant", "content": "SELECT SUM(\"cultural_and_educational_panel\") FROM \"composition_of_the_7th_seanad\" WHERE \"administrative_panel\">1 AND \"agricultural_panel\"=11 AND \"university_of_dublin\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"composition_of_the_7th_seanad\" (\n \"administrative_panel\" real,\n \"agricultural_panel\" real,\n \"cultural_and_educational_panel\" real,\n \"industrial_and_commercial_panel\" real,\n \"labour_panel\" real,\n \"national_university_of_ireland\" real,\n \"university_of_dublin\" real,\n \"nominated_by_the_taoiseach\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of Agricultural panels that have an Industrial and Commercial Panel smaller than 0?" }, { "role": "assistant", "content": "SELECT SUM(\"agricultural_panel\") FROM \"composition_of_the_7th_seanad\" WHERE \"industrial_and_commercial_panel\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"composition_of_the_7th_seanad\" (\n \"administrative_panel\" real,\n \"agricultural_panel\" real,\n \"cultural_and_educational_panel\" real,\n \"industrial_and_commercial_panel\" real,\n \"labour_panel\" real,\n \"national_university_of_ireland\" real,\n \"university_of_dublin\" real,\n \"nominated_by_the_taoiseach\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest number of National University of Ireland that has a Cultural and Educational Panel of 0, and a Labour Panel smaller than 1?" }, { "role": "assistant", "content": "SELECT MIN(\"national_university_of_ireland\") FROM \"composition_of_the_7th_seanad\" WHERE \"cultural_and_educational_panel\"=0 AND \"labour_panel\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"composition_of_the_7th_seanad\" (\n \"administrative_panel\" real,\n \"agricultural_panel\" real,\n \"cultural_and_educational_panel\" real,\n \"industrial_and_commercial_panel\" real,\n \"labour_panel\" real,\n \"national_university_of_ireland\" real,\n \"university_of_dublin\" real,\n \"nominated_by_the_taoiseach\" real,\n \"total\" real\n);\n\nQuestion: What is the total of Industrial and Commercial Panels that have a Labour Panel greater than 1, a Nominated by the Taoiseach lesss than 11 and a Cultural and Educational Panel smaller than 0" }, { "role": "assistant", "content": "SELECT COUNT(\"industrial_and_commercial_panel\") FROM \"composition_of_the_7th_seanad\" WHERE \"labour_panel\">1 AND \"nominated_by_the_taoiseach\"<11 AND \"cultural_and_educational_panel\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players\" (\n \"player\" text,\n \"position\" text,\n \"gp_gs\" text,\n \"minutes\" real,\n \"goals\" real,\n \"assists\" real\n);\n\nQuestion: What was the highest number of goals when 2428 minutes were played?" }, { "role": "assistant", "content": "SELECT MAX(\"goals\") FROM \"players\" WHERE \"minutes\"=2428;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players\" (\n \"player\" text,\n \"position\" text,\n \"gp_gs\" text,\n \"minutes\" real,\n \"goals\" real,\n \"assists\" real\n);\n\nQuestion: What is the number of minutes when there are more than 4 goals and 3 assists?" }, { "role": "assistant", "content": "SELECT \"minutes\" FROM \"players\" WHERE \"goals\">4 AND \"assists\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players\" (\n \"player\" text,\n \"position\" text,\n \"gp_gs\" text,\n \"minutes\" real,\n \"goals\" real,\n \"assists\" real\n);\n\nQuestion: What is the total number of assists when Edmundo Rodriguez is playing the position of striker, less than 4 goals were scored, and the minutes were less than 473?" }, { "role": "assistant", "content": "SELECT COUNT(\"assists\") FROM \"players\" WHERE \"position\"='striker' AND \"goals\"<4 AND \"player\"='edmundo rodriguez' AND \"minutes\"<473;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" text,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"fcc_info\" text\n);\n\nQuestion: What is the least ERP W when the freguency MHz is 89.3 fm?" }, { "role": "assistant", "content": "SELECT MIN(\"erp_w\") FROM \"translators\" WHERE \"frequency_m_hz\"='89.3 fm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" text,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"fcc_info\" text\n);\n\nQuestion: Call sign k216fo has what average ERP W?" }, { "role": "assistant", "content": "SELECT AVG(\"erp_w\") FROM \"translators\" WHERE \"call_sign\"='k216fo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" text,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"fcc_info\" text\n);\n\nQuestion: What city does call sign K248am have its license in?" }, { "role": "assistant", "content": "SELECT \"city_of_license\" FROM \"translators\" WHERE \"call_sign\"='k248am';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" text,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"fcc_info\" text\n);\n\nQuestion: What call sign has ERP W greater than 197?" }, { "role": "assistant", "content": "SELECT \"call_sign\" FROM \"translators\" WHERE \"erp_w\">197;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" text,\n \"wins\" text,\n \"poles\" text,\n \"f_laps\" text,\n \"podiums\" text,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: How many points did Costa score in the Macau Grand Prix since 2011?" }, { "role": "assistant", "content": "SELECT \"points\" FROM \"career_summary\" WHERE \"season\">2011 AND \"series\"='macau grand prix';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" text,\n \"wins\" text,\n \"poles\" text,\n \"f_laps\" text,\n \"podiums\" text,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: Which teams had the 1st position and entered 1 race?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"career_summary\" WHERE \"races\"='1' AND \"position\"='1st';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" text,\n \"wins\" text,\n \"poles\" text,\n \"f_laps\" text,\n \"podiums\" text,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: How many points did Carlin have when they had 3 wins?" }, { "role": "assistant", "content": "SELECT \"points\" FROM \"career_summary\" WHERE \"wins\"='3' AND \"team\"='carlin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"laf_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 Points have an Against smaller than 43, and a Position smaller than 1?" }, { "role": "assistant", "content": "SELECT SUM(\"points\") FROM \"laf_s_campeonato_paulista\" WHERE \"against\"<43 AND \"position\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"laf_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 Drawn have a Position of 7, and Points larger than 18?" }, { "role": "assistant", "content": "SELECT COUNT(\"drawn\") FROM \"laf_s_campeonato_paulista\" WHERE \"position\"=7 AND \"points\">18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"laf_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 Against have a Team of hespanha, and Points smaller than 30?" }, { "role": "assistant", "content": "SELECT COUNT(\"against\") FROM \"laf_s_campeonato_paulista\" WHERE \"team\"='hespanha' AND \"points\"<30;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"laf_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: Which Points is the average one that has Drawn of 3, and a Played smaller than 22?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"laf_s_campeonato_paulista\" WHERE \"drawn\"=3 AND \"played\"<22;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"laf_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 much Played has an Against larger than 37, and a Lost of 15, and Points smaller than 11?" }, { "role": "assistant", "content": "SELECT SUM(\"played\") FROM \"laf_s_campeonato_paulista\" WHERE \"against\">37 AND \"lost\"=15 AND \"points\"<11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"spoofed_title\" text,\n \"actual_title\" text,\n \"writer\" text,\n \"artist\" text,\n \"issue\" real,\n \"date\" text\n);\n\nQuestion: Which artist has the Spoofed title Miscue 911?" }, { "role": "assistant", "content": "SELECT \"artist\" FROM \"1990s\" WHERE \"spoofed_title\"='miscue 911';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"spoofed_title\" text,\n \"actual_title\" text,\n \"writer\" text,\n \"artist\" text,\n \"issue\" real,\n \"date\" text\n);\n\nQuestion: Which Spoofed title is from February 1998?" }, { "role": "assistant", "content": "SELECT \"spoofed_title\" FROM \"1990s\" WHERE \"date\"='february 1998';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"spoofed_title\" text,\n \"actual_title\" text,\n \"writer\" text,\n \"artist\" text,\n \"issue\" real,\n \"date\" text\n);\n\nQuestion: Which artist has a Spoofed title in June 1992?" }, { "role": "assistant", "content": "SELECT \"artist\" FROM \"1990s\" WHERE \"date\"='june 1992';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What was the average number of laps completed by KTM riders, with times of +56.440 and grid values under 11?" }, { "role": "assistant", "content": "SELECT AVG(\"laps\") FROM \"125cc_classification\" WHERE \"manufacturer\"='ktm' AND \"time_retired\"='+56.440' AND \"grid\"<11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What was the highest grid value for riders with manufacturer of Aprilia and time of +1.660?" }, { "role": "assistant", "content": "SELECT MAX(\"grid\") FROM \"125cc_classification\" WHERE \"manufacturer\"='aprilia' AND \"time_retired\"='+1.660';" } ]
[ { "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 Round against Aleksander Emelianenko had a time of 5:00?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='5:00' AND \"opponent\"='aleksander emelianenko';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_games\" (\n \"season\" real,\n \"date\" text,\n \"venue\" text,\n \"city\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"attendance\" real\n);\n\nQuestion: In 1958, what has the IRFU All-Stars Home Venue?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"list_of_games\" WHERE \"home\"='irfu all-stars' AND \"season\"=1958;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_games\" (\n \"season\" real,\n \"date\" text,\n \"venue\" text,\n \"city\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"attendance\" real\n);\n\nQuestion: On what Date was the Venue at Exhibition Stadium?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"list_of_games\" WHERE \"venue\"='exhibition stadium';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_games\" (\n \"season\" real,\n \"date\" text,\n \"venue\" text,\n \"city\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"attendance\" real\n);\n\nQuestion: Before 1957, what was the largest in Attendance at Varsity Stadium?" }, { "role": "assistant", "content": "SELECT MAX(\"attendance\") FROM \"list_of_games\" WHERE \"season\"<1957 AND \"venue\"='varsity stadium';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"date\" text,\n \"time\" text,\n \"home\" text,\n \"away\" text,\n \"score\" text,\n \"ground\" text\n);\n\nQuestion: What is the Time with a Score that is 65-19?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"round_three\" WHERE \"score\"='65-19';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"date\" text,\n \"time\" text,\n \"home\" text,\n \"away\" text,\n \"score\" text,\n \"ground\" text\n);\n\nQuestion: What is the Time with an Away that is broadview hawks?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"round_three\" WHERE \"away\"='broadview hawks';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"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: Which Position has an Against of 32, and a Difference of 18, and a Drawn larger than 4?" }, { "role": "assistant", "content": "SELECT SUM(\"position\") FROM \"campeonato_paulista\" WHERE \"against\"=32 AND \"difference\"='18' AND \"drawn\">4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"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: Which Position has an Against smaller than 49, and a Drawn of 4?" }, { "role": "assistant", "content": "SELECT MAX(\"position\") FROM \"campeonato_paulista\" WHERE \"against\"<49 AND \"drawn\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"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: Which Played has a Drawn of 5, and a Team of palmeiras, and a Position smaller than 6?" }, { "role": "assistant", "content": "SELECT MAX(\"played\") FROM \"campeonato_paulista\" WHERE \"drawn\"=5 AND \"team\"='palmeiras' AND \"position\"<6;" } ]
[ { "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 \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What team played on November 17?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"game_log\" WHERE \"date\"='november 17';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"post_season\" (\n \"year\" text,\n \"team\" text,\n \"comp\" text,\n \"long\" text,\n \"rate\" text,\n \"r_att\" text,\n \"r_yds\" text,\n \"r_avg\" text,\n \"lost\" text\n);\n\nQuestion: What is the comp when the ryds is 2?" }, { "role": "assistant", "content": "SELECT \"comp\" FROM \"post_season\" WHERE \"r_yds\"='2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"post_season\" (\n \"year\" text,\n \"team\" text,\n \"comp\" text,\n \"long\" text,\n \"rate\" text,\n \"r_att\" text,\n \"r_yds\" text,\n \"r_avg\" text,\n \"lost\" text\n);\n\nQuestion: What is the RAtt when the comp is 48?" }, { "role": "assistant", "content": "SELECT \"r_att\" FROM \"post_season\" WHERE \"comp\"='48';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"post_season\" (\n \"year\" text,\n \"team\" text,\n \"comp\" text,\n \"long\" text,\n \"rate\" text,\n \"r_att\" text,\n \"r_yds\" text,\n \"r_avg\" text,\n \"lost\" text\n);\n\nQuestion: What is the RAtt when the long is 73?" }, { "role": "assistant", "content": "SELECT \"r_att\" FROM \"post_season\" WHERE \"long\"='73';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"post_season\" (\n \"year\" text,\n \"team\" text,\n \"comp\" text,\n \"long\" text,\n \"rate\" text,\n \"r_att\" text,\n \"r_yds\" text,\n \"r_avg\" text,\n \"lost\" text\n);\n\nQuestion: What is the RYds when the RAtt was 2, and the comp is 41?" }, { "role": "assistant", "content": "SELECT \"r_yds\" FROM \"post_season\" WHERE \"r_att\"='2' AND \"comp\"='41';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"post_season\" (\n \"year\" text,\n \"team\" text,\n \"comp\" text,\n \"long\" text,\n \"rate\" text,\n \"r_att\" text,\n \"r_yds\" text,\n \"r_avg\" text,\n \"lost\" text\n);\n\nQuestion: What is the Long when the ryds is 18?" }, { "role": "assistant", "content": "SELECT \"long\" FROM \"post_season\" WHERE \"r_yds\"='18';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"post_season\" (\n \"year\" text,\n \"team\" text,\n \"comp\" text,\n \"long\" text,\n \"rate\" text,\n \"r_att\" text,\n \"r_yds\" text,\n \"r_avg\" text,\n \"lost\" text\n);\n\nQuestion: What is the RAvg when the ratt is 3?" }, { "role": "assistant", "content": "SELECT \"r_avg\" FROM \"post_season\" WHERE \"r_att\"='3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senior_pga_tour_wins_9\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Who was the Runner-up for the merrill lynch/golf digest commemorative pro-am tournament?" }, { "role": "assistant", "content": "SELECT \"runner_s_up\" FROM \"senior_pga_tour_wins_9\" WHERE \"tournament\"='merrill lynch/golf digest commemorative pro-am';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senior_pga_tour_wins_9\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the margin of victory when the winning score was \u201314 (70-68-67=205)?" }, { "role": "assistant", "content": "SELECT \"margin_of_victory\" FROM \"senior_pga_tour_wins_9\" WHERE \"winning_score\"='\u201314 (70-68-67=205)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senior_pga_tour_wins_9\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Who were the runner(s)-up when the winning score was \u201310 (69-68-74-67=278)?" }, { "role": "assistant", "content": "SELECT \"margin_of_victory\" FROM \"senior_pga_tour_wins_9\" WHERE \"winning_score\"='\u201310 (69-68-74-67=278)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senior_pga_tour_wins_9\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Who was the runner-up for the mazda senior tournament players championship tournament when the margin of victory was 2 strokes?" }, { "role": "assistant", "content": "SELECT \"runner_s_up\" FROM \"senior_pga_tour_wins_9\" WHERE \"margin_of_victory\"='2 strokes' AND \"tournament\"='mazda senior tournament players championship';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"team_name_sponsored_name\" text,\n \"home_ground_a\" text,\n \"first_season\" text,\n \"last_title\" text,\n \"titles\" real\n);\n\nQuestion: When was the last title of the team with a home ground of Sydney cricket ground?" }, { "role": "assistant", "content": "SELECT \"last_title\" FROM \"teams\" WHERE \"home_ground_a\"='sydney cricket ground';" } ]
[ { "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: How many people were in attendance for the game week 15?" }, { "role": "assistant", "content": "SELECT COUNT(\"attendance\") FROM \"schedule\" WHERE \"week\"=15;" } ]
[ { "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 is the highest number of people in attendance in the game against the Buffalo Bills in a week later than 14?" }, { "role": "assistant", "content": "SELECT MAX(\"attendance\") FROM \"schedule\" WHERE \"opponent\"='buffalo bills' AND \"week\">14;" } ]
[ { "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 is the average Week when there were more than 63,866 people in attendance on September 7, 1981?" }, { "role": "assistant", "content": "SELECT AVG(\"week\") FROM \"schedule\" WHERE \"attendance\">'63,866' AND \"date\"='september 7, 1981';" } ]
[ { "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 is the average Attendance for the game on November 1, 1981?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"schedule\" WHERE \"date\"='november 1, 1981';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"supplemental_first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What position is played by the player from the Chicago Cubs?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"supplemental_first_round_selections\" WHERE \"team\"='chicago cubs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"supplemental_first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What is the name of the Outfielder that was picked prior to Pick 42?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"supplemental_first_round_selections\" WHERE \"position\"='outfielder' AND \"pick\"<42;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"october\" (\n \"week_of\" text,\n \"tier\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"semi_finalists\" text\n);\n\nQuestion: What is the Week when anke huber chanda rubin shows for Semi finalists, and the Runner-up is meredith mcgrath larisa savchenko?" }, { "role": "assistant", "content": "SELECT \"week_of\" FROM \"october\" WHERE \"semi_finalists\"='anke huber chanda rubin' AND \"runner_up\"='meredith mcgrath larisa savchenko';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"october\" (\n \"week_of\" text,\n \"tier\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"semi_finalists\" text\n);\n\nQuestion: What is the Semi finalists when the Runner-up was katrina adams zina garrison-jackson?" }, { "role": "assistant", "content": "SELECT \"semi_finalists\" FROM \"october\" WHERE \"runner_up\"='katrina adams zina garrison-jackson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"october\" (\n \"week_of\" text,\n \"tier\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"semi_finalists\" text\n);\n\nQuestion: What is the Winner when anke huber chanda rubin was semi finalist?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"october\" WHERE \"semi_finalists\"='anke huber chanda rubin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"october\" (\n \"week_of\" text,\n \"tier\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"semi_finalists\" text\n);\n\nQuestion: What is the Tier when the runner-up is chanda rubin caroline vis?" }, { "role": "assistant", "content": "SELECT \"tier\" FROM \"october\" WHERE \"runner_up\"='chanda rubin caroline vis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"october\" (\n \"week_of\" text,\n \"tier\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"semi_finalists\" text\n);\n\nQuestion: What is the Week when the winner was mary joe fern\u00e1ndez 6\u20134, 7\u20135?" }, { "role": "assistant", "content": "SELECT \"week_of\" FROM \"october\" WHERE \"winner\"='mary joe fern\u00e1ndez 6\u20134, 7\u20135';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"october\" (\n \"week_of\" text,\n \"tier\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"semi_finalists\" text\n);\n\nQuestion: What is the Runner-up with the tier was tier ii, and a Winner of gigi fern\u00e1ndez natalia zvereva 5\u20137, 6\u20131, 6\u20134?" }, { "role": "assistant", "content": "SELECT \"runner_up\" FROM \"october\" WHERE \"tier\"='tier ii' AND \"winner\"='gigi fern\u00e1ndez natalia zvereva 5\u20137, 6\u20131, 6\u20134';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" real,\n \"result\" text\n);\n\nQuestion: Which week had safe as the result and Dolly Parton as the theme?" }, { "role": "assistant", "content": "SELECT \"week_num\" FROM \"performances\" WHERE \"result\"='safe' AND \"theme\"='dolly parton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" real,\n \"result\" text\n);\n\nQuestion: On which week was the beatles the original artist and the order # smaller than 10?" }, { "role": "assistant", "content": "SELECT \"week_num\" FROM \"performances\" WHERE \"original_artist\"='the beatles' AND \"order_num\"<10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" real,\n \"result\" text\n);\n\nQuestion: On which week was the result safe and the song choice \" across the universe \"?" }, { "role": "assistant", "content": "SELECT \"week_num\" FROM \"performances\" WHERE \"result\"='safe' AND \"song_choice\"='\\\" across the universe \\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" real,\n \"result\" text\n);\n\nQuestion: Which original artist had 5 as their order #?" }, { "role": "assistant", "content": "SELECT \"original_artist\" FROM \"performances\" WHERE \"order_num\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1997_broadway_revival\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: Which nominee was nominated in the Outstanding Director of a Musical category?" }, { "role": "assistant", "content": "SELECT \"nominee\" FROM \"1997_broadway_revival\" WHERE \"category\"='outstanding director of a musical';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1997_broadway_revival\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: What is the result for Brent Spiner?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"1997_broadway_revival\" WHERE \"nominee\"='brent spiner';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"rebounds\" real\n);\n\nQuestion: What is the number of games for Shaun Stonerook?" }, { "role": "assistant", "content": "SELECT MIN(\"games\") FROM \"rebounds\" WHERE \"name\"='shaun stonerook';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_leaders\" (\n \"nation\" text,\n \"sport\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the highest total number of medals of the nation with less than 1 bronzes and less than 0 silver medals?" }, { "role": "assistant", "content": "SELECT MAX(\"total\") FROM \"medal_leaders\" WHERE \"bronze\"<1 AND \"silver\"<0;" } ]
[ { "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: Total weeks of 49,980 attendance?" }, { "role": "assistant", "content": "SELECT SUM(\"week\") FROM \"schedule\" WHERE \"attendance\"='49,980';" } ]
[ { "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: Mean attendance for December 22, 1980?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"schedule\" WHERE \"date\"='december 22, 1980';" } ]
[ { "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: Overall attendance for week 4?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"week\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text\n);\n\nQuestion: What was in 2007 that has a 3r of 1999?" }, { "role": "assistant", "content": "SELECT \"2007\" FROM \"singles_performance_timeline\" WHERE \"1999\"='3r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text\n);\n\nQuestion: What was in 2007 that is from 2004 0f 2r and 2010 of A?" }, { "role": "assistant", "content": "SELECT \"2007\" FROM \"singles_performance_timeline\" WHERE \"2004\"='2r' AND \"2010\"='a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text\n);\n\nQuestion: What is in 2001, that has the year 2006, 2r, and in 2010 an A?" }, { "role": "assistant", "content": "SELECT \"2001\" FROM \"singles_performance_timeline\" WHERE \"2006\"='2r' AND \"2010\"='a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"result\" text,\n \"category\" text,\n \"film\" text\n);\n\nQuestion: Who was awarded after 1947 in the category of, the best actor in a leading role?" }, { "role": "assistant", "content": "SELECT \"award\" FROM \"awards_and_nominations\" WHERE \"year\">1947 AND \"category\"='best actor in a leading role';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"date\" text,\n \"result\" text,\n \"opponent\" text,\n \"location\" text,\n \"method\" text,\n \"round\" real,\n \"record\" text\n);\n\nQuestion: Which Opponent has a Method of tko, and a Location of elgin, illinois, usa on 2001-02-11?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"kickboxing_record\" WHERE \"method\"='tko' AND \"location\"='elgin, illinois, usa' AND \"date\"='2001-02-11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"date\" text,\n \"result\" text,\n \"opponent\" text,\n \"location\" text,\n \"method\" text,\n \"round\" real,\n \"record\" text\n);\n\nQuestion: Which Round has a Location of auckland, new zealand, and a Method of tko on 1994-11-24?" }, { "role": "assistant", "content": "SELECT AVG(\"round\") FROM \"kickboxing_record\" WHERE \"location\"='auckland, new zealand' AND \"method\"='tko' AND \"date\"='1994-11-24';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"date\" text,\n \"result\" text,\n \"opponent\" text,\n \"location\" text,\n \"method\" text,\n \"round\" real,\n \"record\" text\n);\n\nQuestion: Which highest Round has a Result of loss?" }, { "role": "assistant", "content": "SELECT MAX(\"round\") FROM \"kickboxing_record\" WHERE \"result\"='loss';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"date\" text,\n \"result\" text,\n \"opponent\" text,\n \"location\" text,\n \"method\" text,\n \"round\" real,\n \"record\" text\n);\n\nQuestion: Which Location has a Method of decision?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"kickboxing_record\" WHERE \"method\"='decision';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slam_singles_performance_timeline\" (\n \"tournament\" text,\n \"2002\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What tournament has 1r as a 2004, and 1r as a 2007?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"grand_slam_singles_performance_timeline\" WHERE \"2004\"='1r' AND \"2007\"='1r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slam_singles_performance_timeline\" (\n \"tournament\" text,\n \"2002\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What 2012 has q2 as the 2010, and wimbledon as the tournament?" }, { "role": "assistant", "content": "SELECT \"2012\" FROM \"grand_slam_singles_performance_timeline\" WHERE \"2010\"='q2' AND \"tournament\"='wimbledon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slam_singles_performance_timeline\" (\n \"tournament\" text,\n \"2002\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What 2006 has grand slam tournaments of 2010?" }, { "role": "assistant", "content": "SELECT \"2006\" FROM \"grand_slam_singles_performance_timeline\" WHERE \"2010\"='grand slam tournaments';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slam_singles_performance_timeline\" (\n \"tournament\" text,\n \"2002\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What 2006 has grand slam tournaments of 2005?" }, { "role": "assistant", "content": "SELECT \"2006\" FROM \"grand_slam_singles_performance_timeline\" WHERE \"2005\"='grand slam tournaments';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slam_singles_performance_timeline\" (\n \"tournament\" text,\n \"2002\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What 2006 has q2 as the 2007?" }, { "role": "assistant", "content": "SELECT \"2006\" FROM \"grand_slam_singles_performance_timeline\" WHERE \"2007\"='q2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"seasons\" (\n \"season\" text,\n \"conference\" text,\n \"division\" text,\n \"finish\" text,\n \"wins\" text,\n \"losses\" text,\n \"winpct\" text,\n \"awards\" text\n);\n\nQuestion: What are the losses where the award is Mike Miller (Smoy)?" }, { "role": "assistant", "content": "SELECT \"losses\" FROM \"seasons\" WHERE \"awards\"='mike miller (smoy)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"seasons\" (\n \"season\" text,\n \"conference\" text,\n \"division\" text,\n \"finish\" text,\n \"wins\" text,\n \"losses\" text,\n \"winpct\" text,\n \"awards\" text\n);\n\nQuestion: Where the wins are 46, what is the win%?" }, { "role": "assistant", "content": "SELECT \"winpct\" FROM \"seasons\" WHERE \"wins\"='46';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"seasons\" (\n \"season\" text,\n \"conference\" text,\n \"division\" text,\n \"finish\" text,\n \"wins\" text,\n \"losses\" text,\n \"winpct\" text,\n \"awards\" text\n);\n\nQuestion: Where the Vancouver Grizzlies is the awards, what is the conference?" }, { "role": "assistant", "content": "SELECT \"conference\" FROM \"seasons\" WHERE \"awards\"='vancouver grizzlies';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"elections_to_the_legislative_assembly_of\" (\n \"party\" text,\n \"1985\" real,\n \"1987\" real,\n \"1990\" real,\n \"1995\" real,\n \"1999\" real,\n \"2003\" real,\n \"2007\" real,\n \"2011\" real\n);\n\nQuestion: What is the highest 1987 value with a 1995 value less than 1995 and a 1999 less than 9?" }, { "role": "assistant", "content": "SELECT MAX(\"1987\") FROM \"elections_to_the_legislative_assembly_of\" WHERE \"1995\"<1995 AND \"1999\"<9;" } ]