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 \"heats\" (\n \"heat_rank\" real,\n \"lane\" real,\n \"swimmer\" text,\n \"country\" text,\n \"time\" real,\n \"overall_rank\" text\n);\n\nQuestion: Tell me the least time for apostolos tsagkarakis for lane less than 6" }, { "role": "assistant", "content": "SELECT MIN(\"time\") FROM \"heats\" WHERE \"swimmer\"='apostolos tsagkarakis' AND \"lane\"<6;" } ]
[ { "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: Tell me the method for pride 33" }, { "role": "assistant", "content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='pride 33';" } ]
[ { "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: Tell me the lowest round for total combat 15" }, { "role": "assistant", "content": "SELECT MIN(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"event\"='total combat 15';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"preseason\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"time\" text,\n \"game_site\" text,\n \"result_score\" text,\n \"record\" text\n);\n\nQuestion: Tell me the week for pittsburgh steelers opponent" }, { "role": "assistant", "content": "SELECT \"week\" FROM \"preseason\" WHERE \"opponent\"='pittsburgh steelers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"preseason\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"time\" text,\n \"game_site\" text,\n \"result_score\" text,\n \"record\" text\n);\n\nQuestion: Tell me the week for record of 0-1" }, { "role": "assistant", "content": "SELECT \"week\" FROM \"preseason\" WHERE \"record\"='0-1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"preseason\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"time\" text,\n \"game_site\" text,\n \"result_score\" text,\n \"record\" text\n);\n\nQuestion: Tell me the time for buffalo bills" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"preseason\" WHERE \"opponent\"='buffalo bills';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"preseason\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"time\" text,\n \"game_site\" text,\n \"result_score\" text,\n \"record\" text\n);\n\nQuestion: Tell me thee record for week of hf" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"preseason\" WHERE \"week\"='hf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"preseason\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"time\" text,\n \"game_site\" text,\n \"result_score\" text,\n \"record\" text\n);\n\nQuestion: Tell me the game site for week of 1" }, { "role": "assistant", "content": "SELECT \"game_site\" FROM \"preseason\" WHERE \"week\"='1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the result of the 1990 world cup qualifying competition?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"international_goals\" WHERE \"competition\"='1990 world cup qualifying';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the Score of the match in Torrance, California?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"international_goals\" WHERE \"venue\"='torrance, california';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_and_fixtures\" (\n \"date\" text,\n \"result\" text,\n \"score\" text,\n \"type\" text,\n \"venue\" text\n);\n\nQuestion: Tell me the score for international friendly 17 august 2013" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"results_and_fixtures\" WHERE \"type\"='international friendly' AND \"date\"='17 august 2013';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"pick_num\" real,\n \"mls_team\" text,\n \"player\" text,\n \"position\" text,\n \"affiliation\" text\n);\n\nQuestion: What position did the MLS team metrostars pick?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"round_four\" WHERE \"mls_team\"='metrostars';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"pick_num\" real,\n \"mls_team\" text,\n \"player\" text,\n \"position\" text,\n \"affiliation\" text\n);\n\nQuestion: What MLS team is affiliated with yale university?" }, { "role": "assistant", "content": "SELECT \"mls_team\" FROM \"round_four\" WHERE \"affiliation\"='yale university';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"pick_num\" real,\n \"mls_team\" text,\n \"player\" text,\n \"position\" text,\n \"affiliation\" text\n);\n\nQuestion: What affiliations have Pick #s under 32?" }, { "role": "assistant", "content": "SELECT \"affiliation\" FROM \"round_four\" WHERE \"pick_num\"<32;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"pick_num\" real,\n \"mls_team\" text,\n \"player\" text,\n \"position\" text,\n \"affiliation\" text\n);\n\nQuestion: What players have a position of F?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"round_four\" WHERE \"position\"='f';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player_statistics\" (\n \"name\" text,\n \"national_team_career\" text,\n \"goals\" text,\n \"caps\" text,\n \"average\" text\n);\n\nQuestion: How many goals were scored when there were 73 caps?" }, { "role": "assistant", "content": "SELECT \"goals\" FROM \"player_statistics\" WHERE \"caps\"='73';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"imported\" (\n \"model\" text,\n \"build_year\" text,\n \"top_speed_in_operation_km_h\" real,\n \"power_output_k_w\" text,\n \"total_production\" real\n);\n\nQuestion: Tell me the build year for total production of 150" }, { "role": "assistant", "content": "SELECT \"build_year\" FROM \"imported\" WHERE \"total_production\"=150;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"imported\" (\n \"model\" text,\n \"build_year\" text,\n \"top_speed_in_operation_km_h\" real,\n \"power_output_k_w\" text,\n \"total_production\" real\n);\n\nQuestion: Tell me the power output for total production of 100" }, { "role": "assistant", "content": "SELECT \"power_output_k_w\" FROM \"imported\" WHERE \"total_production\"=100;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"imported\" (\n \"model\" text,\n \"build_year\" text,\n \"transmission\" text,\n \"top_speed_in_operation_km_h\" real,\n \"power_output_k_w\" real,\n \"builder_family\" text,\n \"total_production\" real\n);\n\nQuestion: Name the total production for model nd5" }, { "role": "assistant", "content": "SELECT \"total_production\" FROM \"imported\" WHERE \"model\"='nd5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_minnesota_timberwolves_players_s\" (\n \"name\" text,\n \"nationality\" text,\n \"school_club\" text,\n \"season_s\" text,\n \"position_s\" text\n);\n\nQuestion: What is the nationality of the player who played guard in 2006?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"list_of_minnesota_timberwolves_players_s\" WHERE \"position_s\"='guard' AND \"season_s\"='2006';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ternary_azeotropes\" (\n \"2nd_component\" text,\n \"b_p_2nd_comp_c\" real,\n \"3rd_component\" text,\n \"b_p_3rd_comp_c\" real,\n \"b_p_azeo_c\" real\n);\n\nQuestion: Tell me the sum of bp 2nd comp with bp azeo of 57.5" }, { "role": "assistant", "content": "SELECT SUM(\"b_p_2nd_comp_c\") FROM \"ternary_azeotropes\" WHERE \"b_p_azeo_c\"=57.5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superbike_race_1_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Which rider went 18 laps ending +25.165 behind the leader?" }, { "role": "assistant", "content": "SELECT \"rider\" FROM \"superbike_race_1_classification\" WHERE \"laps\"=18 AND \"time\"='+25.165';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final\" (\n \"place\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"50m_split\" real,\n \"100m_split\" text,\n \"150m_split\" text,\n \"time\" text\n);\n\nQuestion: Which nationality has a split in the 50m of 29.51?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"final\" WHERE \"50m_split\"=29.51;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final\" (\n \"place\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"50m_split\" real,\n \"100m_split\" text,\n \"150m_split\" text,\n \"time\" text\n);\n\nQuestion: Which average 50m split had a 150m split of 1:40.00, with a placing of less than 2?" }, { "role": "assistant", "content": "SELECT AVG(\"50m_split\") FROM \"final\" WHERE \"150m_split\"='1:40.00' AND \"place\"<2;" } ]
[ { "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 \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: What is the result for a year later than 2002?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"achievements\" WHERE \"year\">2002;" } ]
[ { "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 \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: What is the result for the year 1999?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"achievements\" WHERE \"year\"=1999;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"team\" text,\n \"driver\" text,\n \"chassis\" text,\n \"engine\" text,\n \"rounds\" text\n);\n\nQuestion: Tell me the engine for dhg tom's racing" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"teams_and_drivers\" WHERE \"team\"='dhg tom''s racing';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"team\" text,\n \"driver\" text,\n \"chassis\" text,\n \"engine\" text,\n \"rounds\" text\n);\n\nQuestion: Name the team for toshihiro kaneishi" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"teams_and_drivers\" WHERE \"driver\"='toshihiro kaneishi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"television_series\" (\n \"year\" real,\n \"chinese_title\" text,\n \"english_title\" text,\n \"role\" text,\n \"character\" text\n);\n\nQuestion: I want the average year of \u6557\u72ac\u5973\u738b" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"television_series\" WHERE \"chinese_title\"='\u6557\u72ac\u5973\u738b';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"television_series\" (\n \"year\" real,\n \"chinese_title\" text,\n \"english_title\" text,\n \"role\" text,\n \"character\" text\n);\n\nQuestion: Tell me the role for 2005" }, { "role": "assistant", "content": "SELECT \"role\" FROM \"television_series\" WHERE \"year\"=2005;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"television_series\" (\n \"year\" real,\n \"chinese_title\" text,\n \"english_title\" text,\n \"role\" text,\n \"character\" text\n);\n\nQuestion: Tell me the average year for my queen" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"television_series\" WHERE \"english_title\"='my queen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_players\" (\n \"player\" text,\n \"highest_singles_ranking\" text,\n \"highest_doubles_ranking\" text,\n \"first_year_played\" real,\n \"years_played\" real,\n \"ties_played\" real,\n \"total_w_l\" text,\n \"singles_w_l\" text,\n \"doubles_w_l\" text\n);\n\nQuestion: Tell me singles W-L that has years larger than 1 and highest singles ranking of 1346" }, { "role": "assistant", "content": "SELECT \"singles_w_l\" FROM \"all_players\" WHERE \"years_played\">1 AND \"highest_singles_ranking\"='1346';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_career_summary\" (\n \"year\" real,\n \"tournaments_played\" real,\n \"cuts_made\" real,\n \"wins\" real,\n \"top_10s\" real,\n \"best_finish\" text,\n \"earnings\" real,\n \"money_list_rank\" text,\n \"scoring_average\" real,\n \"scoring_rank\" text\n);\n\nQuestion: When the Top 10s is larger than 0 and the scoring average 73.04, what is the best finish?" }, { "role": "assistant", "content": "SELECT \"best_finish\" FROM \"lpga_tour_career_summary\" WHERE \"top_10s\">0 AND \"scoring_average\"=73.04;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_career_summary\" (\n \"year\" real,\n \"tournaments_played\" real,\n \"cuts_made\" real,\n \"wins\" real,\n \"top_10s\" real,\n \"best_finish\" text,\n \"earnings\" real,\n \"money_list_rank\" text,\n \"scoring_average\" real,\n \"scoring_rank\" text\n);\n\nQuestion: What is the total of scoring averages with an earnings larger than $117,682 and a best finish of T24?" }, { "role": "assistant", "content": "SELECT COUNT(\"scoring_average\") FROM \"lpga_tour_career_summary\" WHERE \"earnings\">'117,682' AND \"best_finish\"='t24';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_career_summary\" (\n \"year\" real,\n \"tournaments_played\" real,\n \"cuts_made\" real,\n \"wins\" real,\n \"top_10s\" real,\n \"best_finish\" text,\n \"earnings\" real,\n \"money_list_rank\" text,\n \"scoring_average\" real,\n \"scoring_rank\" text\n);\n\nQuestion: When the earnings are less than $507,292, the money list rank 183, and more than 3 tournaments are played, what is the sum of wins?" }, { "role": "assistant", "content": "SELECT SUM(\"wins\") FROM \"lpga_tour_career_summary\" WHERE \"earnings\"<'507,292' AND \"money_list_rank\"='183' AND \"tournaments_played\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Tell me the score of praterstadion, vienna, and competition of euro 1980 qualifier" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"international_goals\" WHERE \"venue\"='praterstadion, vienna' AND \"competition\"='euro 1980 qualifier';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: I want the score for 28 march 1979" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"international_goals\" WHERE \"date\"='28 march 1979';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: I want the score for 30 april 1977" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"international_goals\" WHERE \"date\"='30 april 1977';" } ]
[ { "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 competition was the World Championships before 2011?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"achievements\" WHERE \"competition\"='world championships' AND \"year\"<2011;" } ]
[ { "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 event took place in Erfurt, Germany?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"achievements\" WHERE \"venue\"='erfurt, germany';" } ]
[ { "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 \"founded\" real,\n \"affiliation\" text,\n \"enrollment\" real,\n \"team_nickname\" text,\n \"primary_conference\" text\n);\n\nQuestion: Name the team nickname for enrollment more than 42,326" }, { "role": "assistant", "content": "SELECT \"team_nickname\" FROM \"current_members\" WHERE \"enrollment\">'42,326';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"overall\" (\n \"played_in\" text,\n \"matches\" text,\n \"lost\" text,\n \"drawn\" text,\n \"points_for\" text,\n \"points_against\" text\n);\n\nQuestion: With the lost of 3, how many points?" }, { "role": "assistant", "content": "SELECT \"points_against\" FROM \"overall\" WHERE \"lost\"='3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"overall\" (\n \"played_in\" text,\n \"matches\" text,\n \"lost\" text,\n \"drawn\" text,\n \"points_for\" text,\n \"points_against\" text\n);\n\nQuestion: How many against points for 16 matches?" }, { "role": "assistant", "content": "SELECT \"points_against\" FROM \"overall\" WHERE \"matches\"='16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"overall\" (\n \"played_in\" text,\n \"matches\" text,\n \"lost\" text,\n \"drawn\" text,\n \"points_for\" text,\n \"points_against\" text\n);\n\nQuestion: The 51 points against, how many are for?" }, { "role": "assistant", "content": "SELECT \"points_for\" FROM \"overall\" WHERE \"points_against\"='51';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"overall\" (\n \"played_in\" text,\n \"matches\" text,\n \"lost\" text,\n \"drawn\" text,\n \"points_for\" text,\n \"points_against\" text\n);\n\nQuestion: For the played in, what are the total points?" }, { "role": "assistant", "content": "SELECT \"points_for\" FROM \"overall\" WHERE \"played_in\"='total';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"club_career_stats\" (\n \"season\" text,\n \"team\" text,\n \"country\" text,\n \"league\" text,\n \"level\" real,\n \"apps\" real\n);\n\nQuestion: What country is the Eurasia Astana team from?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"club_career_stats\" WHERE \"team\"='eurasia astana';" } ]
[ { "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 \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: Tell me the 2008 for 2012 of 4r and 2009 of a" }, { "role": "assistant", "content": "SELECT \"2008\" FROM \"singles_performance_timeline\" WHERE \"2012\"='4r' AND \"2009\"='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 \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: Tell me the 2008 of 2001 olympic games" }, { "role": "assistant", "content": "SELECT \"2008\" FROM \"singles_performance_timeline\" WHERE \"2011\"='olympic games';" } ]
[ { "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 \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: Tell me the tournament of 2009 of atp masters series" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles_performance_timeline\" WHERE \"2009\"='atp masters series';" } ]
[ { "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 \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: Tell me the 2011 tournament of monte carlo masters" }, { "role": "assistant", "content": "SELECT \"2011\" FROM \"singles_performance_timeline\" WHERE \"tournament\"='monte carlo masters';" } ]
[ { "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 \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: Tell me the 2011 with 2012 of 2r" }, { "role": "assistant", "content": "SELECT \"2011\" FROM \"singles_performance_timeline\" WHERE \"2012\"='2r' AND \"2010\"='2r' AND \"2009\"='2r';" } ]
[ { "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_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What was the latest round with a running back from a California college?" }, { "role": "assistant", "content": "SELECT MAX(\"round\") FROM \"nfl_draft\" WHERE \"position\"='running back' AND \"college\"='california';" } ]
[ { "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 \"venue\" text,\n \"attendance\" real\n);\n\nQuestion: What were the results for november 25, 1973?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"date\"='november 25, 1973';" } ]
[ { "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 \"venue\" text,\n \"attendance\" real\n);\n\nQuestion: Which Opponent had a week of 14?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"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\" text\n);\n\nQuestion: Tell me the date for new orleans saints" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"opponent\"='new orleans saints';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Tell me the result for week of 4" }, { "role": "assistant", "content": "SELECT \"result\" 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 \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Tell me the lowest week for w 10-3" }, { "role": "assistant", "content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"result\"='w 10-3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat_rank\" real,\n \"lane\" real,\n \"swimmer\" text,\n \"country\" text,\n \"time\" real,\n \"overall_rank\" real\n);\n\nQuestion: Tell me the average heat rank with a lane of 2 and time less than 27.66" }, { "role": "assistant", "content": "SELECT AVG(\"heat_rank\") FROM \"heats\" WHERE \"lane\"=2 AND \"time\"<27.66;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat_rank\" real,\n \"lane\" real,\n \"swimmer\" text,\n \"country\" text,\n \"time\" real,\n \"overall_rank\" real\n);\n\nQuestion: Tell me the highest overall rank for lane less than 8 and time less than 27.16" }, { "role": "assistant", "content": "SELECT MAX(\"overall_rank\") FROM \"heats\" WHERE \"lane\"<8 AND \"time\"<27.16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat_rank\" real,\n \"lane\" real,\n \"swimmer\" text,\n \"country\" text,\n \"time\" real,\n \"overall_rank\" real\n);\n\nQuestion: Tell me the total number of time for luke hall overall rank being larger than 105" }, { "role": "assistant", "content": "SELECT COUNT(\"time\") FROM \"heats\" WHERE \"swimmer\"='luke hall' AND \"overall_rank\">105;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"name\" text,\n \"nationality\" text,\n \"pos\" text,\n \"college\" text,\n \"season_entered\" text,\n \"manner_of_entry\" text,\n \"left_team\" text\n);\n\nQuestion: Tell me the left team for josh vanlandingham" }, { "role": "assistant", "content": "SELECT \"left_team\" FROM \"references\" WHERE \"name\"='josh vanlandingham';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_goalscorers\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"goals\" real,\n \"appearances\" real\n);\n\nQuestion: Who had less than 7 goals, was ranked under 7, and had more than 8 appearances?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"top_goalscorers\" WHERE \"goals\"<7 AND \"rank\"<7 AND \"appearances\">8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_goalscorers\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"goals\" real,\n \"appearances\" real\n);\n\nQuestion: What was the sum of ranks of those called Fernando Cavenaghi who appeared less than 7." }, { "role": "assistant", "content": "SELECT SUM(\"rank\") FROM \"top_goalscorers\" WHERE \"name\"='fernando cavenaghi' AND \"appearances\"<7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_goalscorers\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"goals\" real,\n \"appearances\" real\n);\n\nQuestion: How many appearances were made by people that had 5 goals and less than 7 rank?" }, { "role": "assistant", "content": "SELECT COUNT(\"appearances\") FROM \"top_goalscorers\" WHERE \"goals\"=5 AND \"rank\"<7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_11_5_titles_6_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What was the surface for the game that had a partner of vania king?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"doubles_11_5_titles_6_runners_up\" WHERE \"partner\"='vania king';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_11_5_titles_6_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Who was the partner for the game on October 20, 2013?" }, { "role": "assistant", "content": "SELECT \"partner\" FROM \"doubles_11_5_titles_6_runners_up\" WHERE \"date\"='october 20, 2013';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_mc_intyre_final_six_system\" (\n \"round\" text,\n \"match\" text,\n \"name\" text,\n \"team_1\" text,\n \"team_2\" text\n);\n\nQuestion: Tell me the name for round of e" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"first_mc_intyre_final_six_system\" WHERE \"round\"='e';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_mc_intyre_final_six_system\" (\n \"round\" text,\n \"match\" text,\n \"name\" text,\n \"team_1\" text,\n \"team_2\" text\n);\n\nQuestion: Name the team one for preliminary final" }, { "role": "assistant", "content": "SELECT \"team_1\" FROM \"first_mc_intyre_final_six_system\" WHERE \"name\"='preliminary final';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_mc_intyre_final_six_system\" (\n \"round\" text,\n \"match\" text,\n \"name\" text,\n \"team_1\" text,\n \"team_2\" text\n);\n\nQuestion: Name the team 1 for round 3" }, { "role": "assistant", "content": "SELECT \"team_1\" FROM \"first_mc_intyre_final_six_system\" WHERE \"round\"='3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_mc_intyre_final_six_system\" (\n \"round\" text,\n \"match\" text,\n \"name\" text,\n \"team_1\" text,\n \"team_2\" text\n);\n\nQuestion: Name the round for 2nd elimination final" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"first_mc_intyre_final_six_system\" WHERE \"match\"='2nd elimination final';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: In less than 58 laps, what is the highest grid for Alexander Wurz?" }, { "role": "assistant", "content": "SELECT MAX(\"grid\") FROM \"race\" WHERE \"driver\"='alexander wurz' AND \"laps\"<58;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the total laps for grid 19?" }, { "role": "assistant", "content": "SELECT COUNT(\"laps\") FROM \"race\" WHERE \"grid\"=19;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar_and_results\" (\n \"round\" real,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: Name the winning driver for mobilecast impul and twin ring motegi" }, { "role": "assistant", "content": "SELECT \"winning_driver\" FROM \"race_calendar_and_results\" WHERE \"winning_team\"='mobilecast impul' AND \"circuit\"='twin ring motegi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar_and_results\" (\n \"round\" real,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: Name the winning driver for round 7" }, { "role": "assistant", "content": "SELECT \"winning_driver\" FROM \"race_calendar_and_results\" WHERE \"round\"=7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Name the number of total for 3 gold and rank less than 3" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"medal_table\" WHERE \"gold\"=3 AND \"rank\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indium_111\" (\n \"name\" text,\n \"investigation\" text,\n \"route_of_administration\" text,\n \"in_vitro_in_vivo\" text,\n \"imaging_non_imaging\" text\n);\n\nQuestion: Tell me the naame of Investigation of thrombus imaging" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"indium_111\" WHERE \"investigation\"='thrombus imaging';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indium_111\" (\n \"name\" text,\n \"investigation\" text,\n \"route_of_administration\" text,\n \"in_vitro_in_vivo\" text,\n \"imaging_non_imaging\" text\n);\n\nQuestion: Tell me the name for Investigation of thrombus imaging and Route of administration of iv" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"indium_111\" WHERE \"route_of_administration\"='iv' AND \"investigation\"='thrombus imaging';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indium_111\" (\n \"name\" text,\n \"investigation\" text,\n \"route_of_administration\" text,\n \"in_vitro_in_vivo\" text,\n \"imaging_non_imaging\" text\n);\n\nQuestion: Tell me the in-vitro for Route of administration of iv and Investigation of somatostatin receptor imaging" }, { "role": "assistant", "content": "SELECT \"in_vitro_in_vivo\" FROM \"indium_111\" WHERE \"route_of_administration\"='iv' AND \"investigation\"='somatostatin receptor imaging';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"mls_team\" text,\n \"player\" text,\n \"position\" text,\n \"affiliation\" text\n);\n\nQuestion: The player is Tim Regan and the pick # is position of d, what's the sum?" }, { "role": "assistant", "content": "SELECT SUM(\"pick_num\") FROM \"round_two\" WHERE \"position\"='d' AND \"player\"='tim regan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"mls_team\" text,\n \"player\" text,\n \"position\" text,\n \"affiliation\" text\n);\n\nQuestion: The position that has a pick # of 16 is what?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"round_two\" WHERE \"pick_num\"=16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"mls_team\" text,\n \"player\" text,\n \"position\" text,\n \"affiliation\" text\n);\n\nQuestion: Damani Ralph is associated with which lowest pick #?" }, { "role": "assistant", "content": "SELECT MIN(\"pick_num\") FROM \"round_two\" WHERE \"player\"='damani ralph';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"mls_team\" text,\n \"player\" text,\n \"position\" text,\n \"affiliation\" text\n);\n\nQuestion: Chicago fire has a total of a total of how many #s?" }, { "role": "assistant", "content": "SELECT COUNT(\"pick_num\") FROM \"round_two\" WHERE \"mls_team\"='chicago fire';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pdc_premier_event_finals_5_1_title_4_run\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"opponent_in_the_final\" text,\n \"score_l_score_in_legs_s_score_in_sets\" text\n);\n\nQuestion: Tell me the score for score in legs and year less than 2012" }, { "role": "assistant", "content": "SELECT \"score_l_score_in_legs_s_score_in_sets\" FROM \"pdc_premier_event_finals_5_1_title_4_run\" WHERE \"year\"<2012;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pdc_premier_event_finals_5_1_title_4_run\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"opponent_in_the_final\" text,\n \"score_l_score_in_legs_s_score_in_sets\" text\n);\n\nQuestion: Tell me the championship for runner-up outcome of 2010" }, { "role": "assistant", "content": "SELECT \"championship\" FROM \"pdc_premier_event_finals_5_1_title_4_run\" WHERE \"outcome\"='runner-up' AND \"year\"=2010;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pdc_premier_event_finals_5_1_title_4_run\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"opponent_in_the_final\" text,\n \"score_l_score_in_legs_s_score_in_sets\" text\n);\n\nQuestion: Tell me the outcome for premier league darts" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"pdc_premier_event_finals_5_1_title_4_run\" WHERE \"championship\"='premier league darts';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pdc_premier_event_finals_5_1_title_4_run\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"opponent_in_the_final\" text,\n \"score_l_score_in_legs_s_score_in_sets\" text\n);\n\nQuestion: Tell me the sum of Year for outcome of runner-up for world darts championship" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"pdc_premier_event_finals_5_1_title_4_run\" WHERE \"outcome\"='runner-up' AND \"championship\"='world darts championship';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"solheim_cup_record\" (\n \"year\" text,\n \"total_matches\" real,\n \"total_w_l_h\" text,\n \"singles_w_l_h\" text,\n \"points_won\" real,\n \"points_pct\" real\n);\n\nQuestion: In 2007, how many points were won when more than 5 matches were played?" }, { "role": "assistant", "content": "SELECT COUNT(\"points_won\") FROM \"solheim_cup_record\" WHERE \"year\"='2007' AND \"total_matches\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"solheim_cup_record\" (\n \"year\" text,\n \"total_matches\" real,\n \"total_w_l_h\" text,\n \"singles_w_l_h\" text,\n \"points_won\" real,\n \"points_pct\" real\n);\n\nQuestion: In 2007, what is the average total matches with points % larger than 33.3?" }, { "role": "assistant", "content": "SELECT AVG(\"total_matches\") FROM \"solheim_cup_record\" WHERE \"points_pct\">33.3 AND \"year\"='2007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_toronto\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which player attended school at Georgia Tech?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"s\" WHERE \"school_club_team\"='georgia tech';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_toronto\" text,\n \"school_club_team\" text\n);\n\nQuestion: What position does Ed Stokes hold?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"s\" WHERE \"player\"='ed stokes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_toronto\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is Michael Stewart's school or club team?" }, { "role": "assistant", "content": "SELECT \"school_club_team\" FROM \"s\" WHERE \"player\"='michael stewart';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_8_10\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What tournament was played on May 29, 2010?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"doubles_8_10\" WHERE \"date\"='may 29, 2010';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_8_10\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the surface made of in the contest where Paula Ormaechea was the partner?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"doubles_8_10\" WHERE \"partner\"='paula ormaechea';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: Tell me the total number of year for class pos of 3rd and laps larger than 353" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"24_hours_of_le_mans_results\" WHERE \"class_pos\"='3rd' AND \"laps\">353;" } ]
[ { "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 \"location\" text\n);\n\nQuestion: Tell me the method with a record of 4-2" }, { "role": "assistant", "content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='4-2';" } ]
[ { "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 \"location\" text\n);\n\nQuestion: Tell me the record for yukiya naito" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='yukiya naito';" } ]
[ { "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 \"location\" text\n);\n\nQuestion: Tell me the record for kazuhiro nakamura" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='kazuhiro nakamura';" } ]
[ { "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 \"location\" text\n);\n\nQuestion: Tell me the method for stanislav nuschik" }, { "role": "assistant", "content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='stanislav nuschik';" } ]
[ { "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\" text\n);\n\nQuestion: What was the Result of IFL: Los Angeles?" }, { "role": "assistant", "content": "SELECT \"res\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='ifl: los angeles';" } ]
[ { "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\" text\n);\n\nQuestion: Which Event resulted in a Win for Opponent, Shane Ott?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"res\"='win' AND \"opponent\"='shane ott';" } ]