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 \"pga_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 was the margin of victory at the Texas International Open?" }, { "role": "assistant", "content": "SELECT \"margin_of_victory\" FROM \"pga_tour_wins_6\" WHERE \"tournament\"='texas international open';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pga_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 was the margin of victory in the tournament with a winning score of \u22123 (74-68-72-71=285)?" }, { "role": "assistant", "content": "SELECT \"margin_of_victory\" FROM \"pga_tour_wins_6\" WHERE \"winning_score\"='\u22123 (74-68-72-71=285)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"passing\" (\n \"name\" text,\n \"gp_gs\" text,\n \"effic\" real,\n \"cmp_att_int\" text,\n \"avg_g\" real\n);\n\nQuestion: Which Avg/G has an Effic larger than 129.73, and a Cmp-Att-Int of 333-500-13?" }, { "role": "assistant", "content": "SELECT SUM(\"avg_g\") FROM \"passing\" WHERE \"effic\">129.73 AND \"cmp_att_int\"='333-500-13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"passing\" (\n \"name\" text,\n \"gp_gs\" text,\n \"effic\" real,\n \"cmp_att_int\" text,\n \"avg_g\" real\n);\n\nQuestion: Which Effic is the highest one that has an Avg/G smaller than 305.6, and a GP-GS of 13-13?" }, { "role": "assistant", "content": "SELECT MAX(\"effic\") FROM \"passing\" WHERE \"avg_g\"<305.6 AND \"gp_gs\"='13-13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"passing\" (\n \"name\" text,\n \"gp_gs\" text,\n \"effic\" real,\n \"cmp_att_int\" text,\n \"avg_g\" real\n);\n\nQuestion: Which Avg/G that has a Name of opponents, and an Effic smaller than 129.73?" }, { "role": "assistant", "content": "SELECT SUM(\"avg_g\") FROM \"passing\" WHERE \"name\"='opponents' AND \"effic\"<129.73;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"passing\" (\n \"name\" text,\n \"gp_gs\" text,\n \"effic\" real,\n \"cmp_att_int\" text,\n \"avg_g\" real\n);\n\nQuestion: Which Cmp-Att-Int has a GP-GS of 3-0?" }, { "role": "assistant", "content": "SELECT \"cmp_att_int\" FROM \"passing\" WHERE \"gp_gs\"='3-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"passing\" (\n \"name\" text,\n \"gp_gs\" text,\n \"effic\" real,\n \"cmp_att_int\" text,\n \"avg_g\" real\n);\n\nQuestion: Which Effic is the average one that has an Avg/G larger than 3.7, and a GP-GS of 13, and a Cmp-Att-Int of 318-521-15?" }, { "role": "assistant", "content": "SELECT AVG(\"effic\") FROM \"passing\" WHERE \"avg_g\">3.7 AND \"gp_gs\"='13' AND \"cmp_att_int\"='318-521-15';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which home team was playing on January 13?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"january\" WHERE \"date\"='january 13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_against_each_opponent\" (\n \"matches\" real,\n \"innings\" real,\n \"not_out\" real,\n \"runs\" real,\n \"high_score\" real,\n \"average\" real\n);\n\nQuestion: How many runs were there when the high score was 55 and there were more than 12 innings?" }, { "role": "assistant", "content": "SELECT SUM(\"runs\") FROM \"performance_against_each_opponent\" WHERE \"high_score\"=55 AND \"innings\">12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_against_each_opponent\" (\n \"matches\" real,\n \"innings\" real,\n \"not_out\" real,\n \"runs\" real,\n \"high_score\" real,\n \"average\" real\n);\n\nQuestion: How many runs were there when there was 1 match and les than 86 average?" }, { "role": "assistant", "content": "SELECT SUM(\"runs\") FROM \"performance_against_each_opponent\" WHERE \"matches\"=1 AND \"average\"<86;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"digital_channels\" (\n \"channel\" real,\n \"station\" text,\n \"video\" text,\n \"aspect\" text,\n \"psip_short_name\" text,\n \"programming\" text\n);\n\nQuestion: Which station has programming of Me-TV?" }, { "role": "assistant", "content": "SELECT \"station\" FROM \"digital_channels\" WHERE \"programming\"='me-tv';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"digital_channels\" (\n \"channel\" real,\n \"station\" text,\n \"video\" text,\n \"aspect\" text,\n \"psip_short_name\" text,\n \"programming\" text\n);\n\nQuestion: Which station has programming of Me-TV?" }, { "role": "assistant", "content": "SELECT \"station\" FROM \"digital_channels\" WHERE \"programming\"='me-tv';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"digital_channels\" (\n \"channel\" real,\n \"station\" text,\n \"video\" text,\n \"aspect\" text,\n \"psip_short_name\" text,\n \"programming\" text\n);\n\nQuestion: What is the short name having video of 720p and programming of Main KSTC-TV programming?" }, { "role": "assistant", "content": "SELECT \"psip_short_name\" FROM \"digital_channels\" WHERE \"video\"='720p' AND \"programming\"='main kstc-tv programming';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"digital_channels\" (\n \"channel\" real,\n \"station\" text,\n \"video\" text,\n \"aspect\" text,\n \"psip_short_name\" text,\n \"programming\" text\n);\n\nQuestion: What is the video associated with a short name of KSTCDT2?" }, { "role": "assistant", "content": "SELECT \"video\" FROM \"digital_channels\" WHERE \"psip_short_name\"='kstcdt2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"digital_channels\" (\n \"channel\" real,\n \"station\" text,\n \"video\" text,\n \"aspect\" text,\n \"psip_short_name\" text,\n \"programming\" text\n);\n\nQuestion: What is the short name of channel 5.5, KSTC-TV?" }, { "role": "assistant", "content": "SELECT \"psip_short_name\" FROM \"digital_channels\" WHERE \"station\"='kstc-tv' AND \"channel\"=5.5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"digital_channels\" (\n \"channel\" real,\n \"station\" text,\n \"video\" text,\n \"aspect\" text,\n \"psip_short_name\" text,\n \"programming\" text\n);\n\nQuestion: What is the short name of the channel under 5.2?" }, { "role": "assistant", "content": "SELECT \"psip_short_name\" FROM \"digital_channels\" WHERE \"channel\"<5.2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Which Men's doubles has a Women's doubles of pam brady rosine lemon?" }, { "role": "assistant", "content": "SELECT \"men_s_doubles\" FROM \"past_winners\" WHERE \"women_s_doubles\"='pam brady rosine lemon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"province\" text,\n \"prefecture\" text,\n \"county\" text,\n \"tujia_population\" real,\n \"pct_of_china_s_tujia_population\" text\n);\n\nQuestion: Which province has a prefecture of Xiangxi with 0.81% of China's Tujia population?" }, { "role": "assistant", "content": "SELECT \"province\" FROM \"by_county\" WHERE \"prefecture\"='xiangxi' AND \"pct_of_china_s_tujia_population\"='0.81%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"province\" text,\n \"prefecture\" text,\n \"county\" text,\n \"tujia_population\" real,\n \"pct_of_china_s_tujia_population\" text\n);\n\nQuestion: Which prefecture is in Hubei province and Enshi county?" }, { "role": "assistant", "content": "SELECT \"prefecture\" FROM \"by_county\" WHERE \"province\"='hubei' AND \"county\"='enshi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"province\" text,\n \"prefecture\" text,\n \"county\" text,\n \"tujia_population\" real,\n \"pct_of_china_s_tujia_population\" text\n);\n\nQuestion: What is the sum of Tujia population with the Zhangjiajie prefecture in Sangzhi county?" }, { "role": "assistant", "content": "SELECT SUM(\"tujia_population\") FROM \"by_county\" WHERE \"prefecture\"='zhangjiajie' AND \"county\"='sangzhi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the total number of attendence has points greater than 40, and detroit as the home?" }, { "role": "assistant", "content": "SELECT COUNT(\"attendance\") FROM \"game_log\" WHERE \"points\">40 AND \"home\"='detroit';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"season\" text,\n \"tropical_lows\" real,\n \"tropical_cyclones\" real,\n \"severe_tropical_cyclones\" real,\n \"strongest_storm\" text\n);\n\nQuestion: What is the total number of Tropical Lows for more than 11 tropical cyclones in 1998\u201399, and a Severe Tropical Cyclones larger than 9?" }, { "role": "assistant", "content": "SELECT COUNT(\"tropical_lows\") FROM \"1990s\" WHERE \"tropical_cyclones\">11 AND \"season\"='1998\u201399' AND \"severe_tropical_cyclones\">9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"season\" text,\n \"tropical_lows\" real,\n \"tropical_cyclones\" real,\n \"severe_tropical_cyclones\" real,\n \"strongest_storm\" text\n);\n\nQuestion: What is the largest number for tropical Lows for the 1990\u201391 season with more than 10 tropical cyclones?" }, { "role": "assistant", "content": "SELECT MAX(\"tropical_lows\") FROM \"1990s\" WHERE \"season\"='1990\u201391' AND \"tropical_cyclones\">10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"season\" text,\n \"tropical_lows\" real,\n \"tropical_cyclones\" real,\n \"severe_tropical_cyclones\" real,\n \"strongest_storm\" text\n);\n\nQuestion: What is the least number of tropical cyclones when the strongest storm was Tiffany and less than 10 tropical lows." }, { "role": "assistant", "content": "SELECT MIN(\"severe_tropical_cyclones\") FROM \"1990s\" WHERE \"strongest_storm\"='tiffany' AND \"tropical_lows\">10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"season\" text,\n \"tropical_lows\" real,\n \"tropical_cyclones\" real,\n \"severe_tropical_cyclones\" real,\n \"strongest_storm\" text\n);\n\nQuestion: What is the least amount of severe tropical cyclones for the 1992\u201393 season and the tropical Lows smaller than 6?" }, { "role": "assistant", "content": "SELECT MIN(\"severe_tropical_cyclones\") FROM \"1990s\" WHERE \"season\"='1992\u201393' AND \"tropical_lows\"<6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"season\" text,\n \"tropical_lows\" real,\n \"tropical_cyclones\" real,\n \"severe_tropical_cyclones\" real,\n \"strongest_storm\" text\n);\n\nQuestion: What is the least amount of tropical lows for the 1993\u201394 season with less than 11 tropical cyclones" }, { "role": "assistant", "content": "SELECT MIN(\"tropical_lows\") FROM \"1990s\" WHERE \"season\"='1993\u201394' AND \"tropical_cyclones\"<11;" } ]
[ { "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 Weeks are on september 8, 1980 and Attendances larger than 55,045? Question 4" }, { "role": "assistant", "content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"date\"='september 8, 1980' AND \"attendance\">'55,045';" } ]
[ { "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 \"college\" text\n);\n\nQuestion: Which Round has a College of stanford?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"nfl_draft\" WHERE \"college\"='stanford';" } ]
[ { "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 \"college\" text\n);\n\nQuestion: Which Round has a Pick of 174?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"nfl_draft\" WHERE \"pick\"=174;" } ]
[ { "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 \"college\" text\n);\n\nQuestion: Which Position has a Pick of 174?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"nfl_draft\" WHERE \"pick\"=174;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: that was held in 1964?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"achievements\" WHERE \"year\"=1964;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What is the name of the Event with a venue that was in toronto, canada?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"achievements\" WHERE \"venue\"='toronto, canada';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What is the Year the competition the british empire and commonwealth games were held?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"achievements\" WHERE \"competition\"='british empire and commonwealth games';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What is the position of the commonwealth games?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"achievements\" WHERE \"competition\"='commonwealth games';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What is the venue with a competition in 1964?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"achievements\" WHERE \"year\"=1964;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_finals_19_8_11\" (\n \"outcome\" text,\n \"date\" text,\n \"location\" text,\n \"surface\" text,\n \"opponent_in_final\" text,\n \"score\" text\n);\n\nQuestion: Name the date for clay surface and location of santos, brazil" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"singles_finals_19_8_11\" WHERE \"surface\"='clay' AND \"location\"='santos, brazil';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_finals_19_8_11\" (\n \"outcome\" text,\n \"date\" text,\n \"location\" text,\n \"surface\" text,\n \"opponent_in_final\" text,\n \"score\" text\n);\n\nQuestion: Name the date with outcome of winner and score of 4\u20136 6\u20132 7\u20136 (7\u20134)" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"singles_finals_19_8_11\" WHERE \"outcome\"='winner' AND \"score\"='4\u20136 6\u20132 7\u20136 (7\u20134)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_venues\" (\n \"team\" text,\n \"location\" text,\n \"venue\" text,\n \"capacity\" real,\n \"position_in_2004\" text\n);\n\nQuestion: What's the highest capacity for a position of 5 in 2004?" }, { "role": "assistant", "content": "SELECT MAX(\"capacity\") FROM \"teams_and_venues\" WHERE \"position_in_2004\"='5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_venues\" (\n \"team\" text,\n \"location\" text,\n \"venue\" text,\n \"capacity\" real,\n \"position_in_2004\" text\n);\n\nQuestion: Which venue has a capacity over 41,040 for Darida?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"teams_and_venues\" WHERE \"capacity\">'41,040' AND \"team\"='darida';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_venues\" (\n \"team\" text,\n \"location\" text,\n \"venue\" text,\n \"capacity\" real,\n \"position_in_2004\" text\n);\n\nQuestion: Which venue was number 9 for 2004?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"teams_and_venues\" WHERE \"position_in_2004\"='9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"institutions\" (\n \"school\" text,\n \"city\" text,\n \"state\" text,\n \"enrollment\" real,\n \"founded\" real\n);\n\nQuestion: What city was founded in 1857?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"institutions\" WHERE \"founded\"=1857;" } ]
[ { "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);\n\nQuestion: Which Opponent has a Time of 2:31?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='2:31';" } ]
[ { "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);\n\nQuestion: Which Method has a Round of 1, and a Time of 0:28?" }, { "role": "assistant", "content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"round\"=1 AND \"time\"='0:28';" } ]
[ { "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);\n\nQuestion: Which Time has an Event of call to arms i?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='call to arms i';" } ]
[ { "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 \"opponent\" text,\n \"score\" text,\n \"series\" text\n);\n\nQuestion: what team played on april 9" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"playoffs\" WHERE \"date\"='april 9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"am_stations\" (\n \"frequency_k_hz\" real,\n \"call_letters\" text,\n \"licensed_location\" text,\n \"type\" text,\n \"format\" text\n);\n\nQuestion: What is the smallest frequency (kHz) that is in the location of Longview?" }, { "role": "assistant", "content": "SELECT MIN(\"frequency_k_hz\") FROM \"am_stations\" WHERE \"licensed_location\"='longview';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"am_stations\" (\n \"frequency_k_hz\" real,\n \"call_letters\" text,\n \"licensed_location\" text,\n \"type\" text,\n \"format\" text\n);\n\nQuestion: What is the location with a frequency (kHz) greater than 1370?" }, { "role": "assistant", "content": "SELECT \"licensed_location\" FROM \"am_stations\" WHERE \"frequency_k_hz\">1370;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_venues\" (\n \"team\" text,\n \"location\" text,\n \"venue\" text,\n \"capacity\" real,\n \"position_in_2002\" text\n);\n\nQuestion: What is the capacity number for Yunost?" }, { "role": "assistant", "content": "SELECT COUNT(\"capacity\") FROM \"teams_and_venues\" WHERE \"venue\"='yunost';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" real\n);\n\nQuestion: What is the total number of first prizes in USD for the Canadian Open?" }, { "role": "assistant", "content": "SELECT SUM(\"1st_prize\") FROM \"tournament_results\" WHERE \"tournament\"='canadian open';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_2012_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: Which Drawn has a Lost of 19?" }, { "role": "assistant", "content": "SELECT \"drawn\" FROM \"2011_2012_table\" WHERE \"lost\"='19';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_2012_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: Which Played has a Club of club?" }, { "role": "assistant", "content": "SELECT \"played\" FROM \"2011_2012_table\" WHERE \"club\"='club';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_2012_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: Which Club has 1 Losing bonus?" }, { "role": "assistant", "content": "SELECT \"club\" FROM \"2011_2012_table\" WHERE \"losing_bonus\"='1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_2012_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What is the Losing bonus of 571 Points ?" }, { "role": "assistant", "content": "SELECT \"losing_bonus\" FROM \"2011_2012_table\" WHERE \"points_for\"='571';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_2012_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: Which Lost has a Tries for of 75?" }, { "role": "assistant", "content": "SELECT \"lost\" FROM \"2011_2012_table\" WHERE \"tries_for\"='75';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_12_3_9\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Who is the opponent in the final of the match on 19 February 2006?" }, { "role": "assistant", "content": "SELECT \"opponent_in_the_final\" FROM \"singles_12_3_9\" WHERE \"date\"='19 february 2006';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_12_3_9\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Who is the opponent in the final of the match on 26 March 2006?" }, { "role": "assistant", "content": "SELECT \"opponent_in_the_final\" FROM \"singles_12_3_9\" WHERE \"date\"='26 march 2006';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the overall number of the player from Utah with a pick # higher than 7?" }, { "role": "assistant", "content": "SELECT SUM(\"overall\") FROM \"atlanta_falcons_draft_history\" WHERE \"college\"='utah' AND \"pick_num\"<7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the highest round of the player with a pick number lower than 34?" }, { "role": "assistant", "content": "SELECT MAX(\"round\") FROM \"atlanta_falcons_draft_history\" WHERE \"pick_num\">34;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What round did Mitch Davis, with an overall higher than 118, have?" }, { "role": "assistant", "content": "SELECT SUM(\"round\") FROM \"atlanta_falcons_draft_history\" WHERE \"name\"='mitch davis' AND \"overall\"<118;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the highest overall of the player from Georgia?" }, { "role": "assistant", "content": "SELECT MAX(\"overall\") FROM \"atlanta_falcons_draft_history\" WHERE \"college\"='georgia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the position of the player with an overall of 45?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"atlanta_falcons_draft_history\" WHERE \"overall\"=45;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: How many wins for team nsu and over 2 points?" }, { "role": "assistant", "content": "SELECT AVG(\"wins\") FROM \"motorcycle_grand_prix_results\" WHERE \"team\"='nsu' AND \"points\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: What is the earliest year associated with under 0 wins?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"motorcycle_grand_prix_results\" WHERE \"wins\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: How many wins for team mv agusta, over 10 points, and after 1957?" }, { "role": "assistant", "content": "SELECT SUM(\"wins\") FROM \"motorcycle_grand_prix_results\" WHERE \"team\"='mv agusta' AND \"points\">10 AND \"year\">1957;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What College/Junior/Club Team (League) has a round of 3?" }, { "role": "assistant", "content": "SELECT \"college_junior_club_team_league\" FROM \"draft_picks\" WHERE \"round\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What player has a round larger than 1 in Austria?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"draft_picks\" WHERE \"round\">1 AND \"nationality\"='austria';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: Which player's nationality is from Sweden?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"draft_picks\" WHERE \"nationality\"='sweden';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What College/Junior/Club Team (League) from Canada has a round smaller than 3?" }, { "role": "assistant", "content": "SELECT \"college_junior_club_team_league\" FROM \"draft_picks\" WHERE \"nationality\"='canada' AND \"round\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men_kayak\" (\n \"distance\" text,\n \"event\" text,\n \"record\" text,\n \"nationality\" text,\n \"year\" real,\n \"location\" text\n);\n\nQuestion: What was the distance in 1997?" }, { "role": "assistant", "content": "SELECT \"distance\" FROM \"men_kayak\" WHERE \"year\"=1997;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_19_12_titles_7_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Who was the opponents in the final on January 5, 2003, on a hard surface?" }, { "role": "assistant", "content": "SELECT \"opponents_in_the_final\" FROM \"doubles_19_12_titles_7_runners_up\" WHERE \"surface\"='hard' AND \"date\"='january 5, 2003';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_19_12_titles_7_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What was the final score on the February 19, 2012 final?" }, { "role": "assistant", "content": "SELECT \"score_in_the_final\" FROM \"doubles_19_12_titles_7_runners_up\" WHERE \"date\"='february 19, 2012';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"conference_national\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance_away\" real\n);\n\nQuestion: Name the least attendance with venue of away on 24 august 2007" }, { "role": "assistant", "content": "SELECT MIN(\"attendance_away\") FROM \"conference_national\" WHERE \"venue\"='away' AND \"date\"='24 august 2007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"conference_national\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance_away\" real\n);\n\nQuestion: Name the average attendance with result of won 2-0 on 2 november 2007" }, { "role": "assistant", "content": "SELECT AVG(\"attendance_away\") FROM \"conference_national\" WHERE \"result\"='won 2-0' AND \"date\"='2 november 2007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player_roster\" (\n \"surname\" text,\n \"first\" text,\n \"d_o_b\" text,\n \"uninum\" real,\n \"bats\" text,\n \"throws\" text,\n \"position\" text\n);\n\nQuestion: What is the uniform number of the player whose last name is Wiltshire?" }, { "role": "assistant", "content": "SELECT MIN(\"uninum\") FROM \"player_roster\" WHERE \"surname\"='wiltshire';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"rank\" real,\n \"first_quarter\" text,\n \"second_quarter\" text,\n \"third_quarter\" text,\n \"fourth_quarter\" text\n);\n\nQuestion: When the rank is larger than 3 with a second quarter of johnson & johnson 156,515.9, what is the fourth quarter?" }, { "role": "assistant", "content": "SELECT \"fourth_quarter\" FROM \"2009\" WHERE \"rank\">3 AND \"second_quarter\"='johnson & johnson 156,515.9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"rank\" real,\n \"first_quarter\" text,\n \"second_quarter\" text,\n \"third_quarter\" text,\n \"fourth_quarter\" text\n);\n\nQuestion: With a rank of 2 what is the second quarter?" }, { "role": "assistant", "content": "SELECT \"second_quarter\" FROM \"2009\" WHERE \"rank\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"rank\" real,\n \"first_quarter\" text,\n \"second_quarter\" text,\n \"third_quarter\" text,\n \"fourth_quarter\" text\n);\n\nQuestion: When the third quarter is China Mobile 195,680.4, what is the rank?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"2009\" WHERE \"third_quarter\"='china mobile 195,680.4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"rank\" real,\n \"first_quarter\" text,\n \"second_quarter\" text,\n \"third_quarter\" text,\n \"fourth_quarter\" text\n);\n\nQuestion: When the first quarter is procter & gamble 138,013, what is the rank?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"2009\" WHERE \"first_quarter\"='procter & gamble 138,013';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"rank\" real,\n \"first_quarter\" text,\n \"second_quarter\" text,\n \"third_quarter\" text,\n \"fourth_quarter\" text\n);\n\nQuestion: When the rank is less than 4, and has a second quarter of exxon mobil 341,140.3, what is the fourth quarter?" }, { "role": "assistant", "content": "SELECT \"fourth_quarter\" FROM \"2009\" WHERE \"rank\"<4 AND \"second_quarter\"='exxon mobil 341,140.3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_ministers_for_the_interior\" (\n \"order\" text,\n \"minister\" text,\n \"party\" text,\n \"prime_minister\" text,\n \"title\" text,\n \"term_start\" text,\n \"term_end\" text,\n \"term_in_office\" text\n);\n\nQuestion: What is the Term end that has a Party of united australia and 184 days in office?" }, { "role": "assistant", "content": "SELECT \"term_end\" FROM \"list_of_ministers_for_the_interior\" WHERE \"party\"='united australia' AND \"term_in_office\"='184 days';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"defensive\" (\n \"player\" text,\n \"sacks\" real,\n \"int_s\" real,\n \"yards\" real,\n \"average\" real,\n \"long\" text\n);\n\nQuestion: How many values for INT's occur with more than 0 yards, over 6 sacks, and average above 17.5?" }, { "role": "assistant", "content": "SELECT COUNT(\"int_s\") FROM \"defensive\" WHERE \"yards\">0 AND \"sacks\">6 AND \"average\">17.5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"defensive\" (\n \"player\" text,\n \"sacks\" real,\n \"int_s\" real,\n \"yards\" real,\n \"average\" real,\n \"long\" text\n);\n\nQuestion: What is the sum of average values for 23 yards?" }, { "role": "assistant", "content": "SELECT SUM(\"average\") FROM \"defensive\" WHERE \"yards\"=23;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"defensive\" (\n \"player\" text,\n \"sacks\" real,\n \"int_s\" real,\n \"yards\" real,\n \"average\" real,\n \"long\" text\n);\n\nQuestion: What is the lowest value of INT's with an average more than 25?" }, { "role": "assistant", "content": "SELECT MIN(\"int_s\") FROM \"defensive\" WHERE \"average\">25;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"defensive\" (\n \"player\" text,\n \"sacks\" real,\n \"int_s\" real,\n \"yards\" real,\n \"average\" real,\n \"long\" text\n);\n\nQuestion: What are the most yards for 2 sacks and an average greater than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"yards\") FROM \"defensive\" WHERE \"sacks\"=2 AND \"average\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"defensive\" (\n \"player\" text,\n \"sacks\" real,\n \"int_s\" real,\n \"yards\" real,\n \"average\" real,\n \"long\" text\n);\n\nQuestion: What is the sum of values for INT'S with Mossy Cade for 0 yards and less than 3 sacks?" }, { "role": "assistant", "content": "SELECT SUM(\"int_s\") FROM \"defensive\" WHERE \"yards\"=0 AND \"sacks\"<3 AND \"player\"='mossy cade';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual\" (\n \"year\" real,\n \"location\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: What is listed for the Bronze, with the Location of Bangkok, and the Year of 1978?" }, { "role": "assistant", "content": "SELECT \"bronze\" FROM \"individual\" WHERE \"location\"='bangkok' AND \"year\"=1978;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual\" (\n \"year\" real,\n \"location\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: What's listed for the lowest Year that a Silver of Kim Kyung-Ho?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"individual\" WHERE \"silver\"='kim kyung-ho';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual\" (\n \"year\" real,\n \"location\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: What's the Gold that also has Bronze of Kim Sun-Bin?" }, { "role": "assistant", "content": "SELECT \"gold\" FROM \"individual\" WHERE \"bronze\"='kim sun-bin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual\" (\n \"year\" real,\n \"location\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: What's the Bronze that's also got a Godl of Kim Woo-Jin?" }, { "role": "assistant", "content": "SELECT \"bronze\" FROM \"individual\" WHERE \"gold\"='kim woo-jin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual\" (\n \"year\" real,\n \"location\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: What is listed as the highest Year that's also got a Bronze of Wataru Haraguchi?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"individual\" WHERE \"bronze\"='wataru haraguchi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the score when their record was 35\u201323\u201315?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"march\" WHERE \"record\"='35\u201323\u201315';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Which home team has a score of 5 \u2013 6?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"march\" WHERE \"score\"='5 \u2013 6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"county\" text,\n \"enrollment_08_09\" real,\n \"ihsaa_class\" text,\n \"ihsaa_class_football\" text,\n \"year_joined\" real,\n \"previous_conference\" text\n);\n\nQuestion: In what county is the school of Merrillville?" }, { "role": "assistant", "content": "SELECT \"county\" FROM \"current_members\" WHERE \"school\"='merrillville';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"county\" text,\n \"enrollment_08_09\" real,\n \"ihsaa_class\" text,\n \"ihsaa_class_football\" text,\n \"year_joined\" real,\n \"previous_conference\" text\n);\n\nQuestion: The school of Portage was in what conference previous?" }, { "role": "assistant", "content": "SELECT \"previous_conference\" FROM \"current_members\" WHERE \"school\"='portage';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"county\" text,\n \"enrollment_08_09\" real,\n \"ihsaa_class\" text,\n \"ihsaa_class_football\" text,\n \"year_joined\" real,\n \"previous_conference\" text\n);\n\nQuestion: What is the name of the school that is in Valparaiso?" }, { "role": "assistant", "content": "SELECT \"school\" FROM \"current_members\" WHERE \"location\"='valparaiso';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scorers\" (\n \"player\" text,\n \"league\" real,\n \"malaysia_cup\" real,\n \"fa_cup\" real,\n \"total\" real\n);\n\nQuestion: Which FA Cup is the highest one that has a Malaysia Cup of 0, and a Player of ahmad fouzee masuri, and a Total larger than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"fa_cup\") FROM \"scorers\" WHERE \"malaysia_cup\"=0 AND \"player\"='ahmad fouzee masuri' AND \"total\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scorers\" (\n \"player\" text,\n \"league\" real,\n \"malaysia_cup\" real,\n \"fa_cup\" real,\n \"total\" real\n);\n\nQuestion: How many totals have a Player of ahmad fouzee masuri, and an FA Cup larger than 0?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"scorers\" WHERE \"player\"='ahmad fouzee masuri' AND \"fa_cup\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scorers\" (\n \"player\" text,\n \"league\" real,\n \"malaysia_cup\" real,\n \"fa_cup\" real,\n \"total\" real\n);\n\nQuestion: Which FA Cup has a Player of khairan ezuan razali, and a Total smaller than 0?" }, { "role": "assistant", "content": "SELECT AVG(\"fa_cup\") FROM \"scorers\" WHERE \"player\"='khairan ezuan razali' AND \"total\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scorers\" (\n \"player\" text,\n \"league\" real,\n \"malaysia_cup\" real,\n \"fa_cup\" real,\n \"total\" real\n);\n\nQuestion: How many Malaysia Cups have a Total larger than 3, and a Player of ivan yusoff, and a League smaller than 2?" }, { "role": "assistant", "content": "SELECT COUNT(\"malaysia_cup\") FROM \"scorers\" WHERE \"total\">3 AND \"player\"='ivan yusoff' AND \"league\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scorers\" (\n \"player\" text,\n \"league\" real,\n \"malaysia_cup\" real,\n \"fa_cup\" real,\n \"total\" real\n);\n\nQuestion: Which FA Cup has a Malaysia Cup larger than 0, and a Total of 8?" }, { "role": "assistant", "content": "SELECT SUM(\"fa_cup\") FROM \"scorers\" WHERE \"malaysia_cup\">0 AND \"total\"=8;" } ]