chat_prompt
stringlengths
438
1.53k
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is number of silver for the country with more than 0 gold, rank of 14, and more than 4 bronze?" }, { "role": "assistant", "content": "SELECT COUNT(\"silver\") FROM \"medal_table\" WHERE \"gold\">0 AND \"rank\"='14' AND \"bronze\">4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the number of gold for the country ranked 19?" }, { "role": "assistant", "content": "SELECT SUM(\"gold\") FROM \"medal_table\" WHERE \"rank\"='19';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the least amount of silver when there is less than 0 bronze?" }, { "role": "assistant", "content": "SELECT MIN(\"silver\") FROM \"medal_table\" WHERE \"bronze\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the most bronze when the total is 14, and there are more than 6 gold?" }, { "role": "assistant", "content": "SELECT MAX(\"bronze\") FROM \"medal_table\" WHERE \"total\"=14 AND \"gold\">6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"snatch\" text,\n \"andrei_rybakou_blr\" text,\n \"187kg\" text,\n \"chiang_mai_thailand\" text\n);\n\nQuestion: Which world record has a 187kg of 392kg?" }, { "role": "assistant", "content": "SELECT \"world_record\" FROM \"records\" WHERE \"187kg\"='392kg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"snatch\" text,\n \"andrei_rybakou_blr\" text,\n \"187kg\" text,\n \"chiang_mai_thailand\" text\n);\n\nQuestion: Who has 187kg and a Snatch of Clean & Jerk?" }, { "role": "assistant", "content": "SELECT \"187kg\" FROM \"records\" WHERE \"snatch\"='clean & jerk';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"snatch\" text,\n \"andrei_rybakou_blr\" text,\n \"187kg\" text,\n \"chiang_mai_thailand\" text\n);\n\nQuestion: What is the world record for a 187kg of 392kg?" }, { "role": "assistant", "content": "SELECT \"world_record\" FROM \"records\" WHERE \"187kg\"='392kg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What is the Reserved for (SC / ST /None) when the constituency number is 203?" }, { "role": "assistant", "content": "SELECT \"reserved_for_sc_st_none\" FROM \"assembly_segments\" WHERE \"constituency_number\"='203';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What is the number of electorates (2009) for the Indore district, when reserved for (SC / ST /None) is none, and constituency number is 208?" }, { "role": "assistant", "content": "SELECT SUM(\"number_of_electorates_2009\") FROM \"assembly_segments\" WHERE \"district\"='indore' AND \"reserved_for_sc_st_none\"='none' AND \"constituency_number\"='208';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What is the district when the reserved for (SC / ST /None) is none, number of electorates (2009) is larger than 190,441, and name is Indore-2?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"assembly_segments\" WHERE \"reserved_for_sc_st_none\"='none' AND \"number_of_electorates_2009\">'190,441' AND \"name\"='indore-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"usage_share_of_desktop_browsers_for_june\" (\n \"source\" text,\n \"chrome\" text,\n \"internet_explorer\" text,\n \"firefox\" text,\n \"safari\" text,\n \"opera\" text,\n \"other\" text\n);\n\nQuestion: What percentage of users were using other browsers according to the source that reported 21.22% were using Firefox?" }, { "role": "assistant", "content": "SELECT \"other\" FROM \"usage_share_of_desktop_browsers_for_june\" WHERE \"firefox\"='21.22%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"usage_share_of_desktop_browsers_for_june\" (\n \"source\" text,\n \"chrome\" text,\n \"internet_explorer\" text,\n \"firefox\" text,\n \"safari\" text,\n \"opera\" text,\n \"other\" text\n);\n\nQuestion: According to W3Counter, what percentage of browsers used Firefox?" }, { "role": "assistant", "content": "SELECT \"firefox\" FROM \"usage_share_of_desktop_browsers_for_june\" WHERE \"source\"='w3counter';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"usage_share_of_desktop_browsers_for_june\" (\n \"source\" text,\n \"chrome\" text,\n \"internet_explorer\" text,\n \"firefox\" text,\n \"safari\" text,\n \"opera\" text,\n \"other\" text\n);\n\nQuestion: What percentage of users were using Firefox according to the source that reported 21.70% used Internet Explorer?" }, { "role": "assistant", "content": "SELECT \"firefox\" FROM \"usage_share_of_desktop_browsers_for_june\" WHERE \"internet_explorer\"='21.70%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"usage_share_of_desktop_browsers_for_june\" (\n \"source\" text,\n \"chrome\" text,\n \"internet_explorer\" text,\n \"firefox\" text,\n \"safari\" text,\n \"opera\" text,\n \"other\" text\n);\n\nQuestion: Which source reported 32.60% of browsers used Chrome?" }, { "role": "assistant", "content": "SELECT \"source\" FROM \"usage_share_of_desktop_browsers_for_june\" WHERE \"chrome\"='32.60%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"usage_share_of_desktop_browsers_for_june\" (\n \"source\" text,\n \"chrome\" text,\n \"internet_explorer\" text,\n \"firefox\" text,\n \"safari\" text,\n \"opera\" text,\n \"other\" text\n);\n\nQuestion: What percentage of users were using Firefox according to the source that reported 15.40% used Safari?" }, { "role": "assistant", "content": "SELECT \"firefox\" FROM \"usage_share_of_desktop_browsers_for_june\" WHERE \"safari\"='15.40%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"usage_share_of_desktop_browsers_for_june\" (\n \"source\" text,\n \"chrome\" text,\n \"internet_explorer\" text,\n \"firefox\" text,\n \"safari\" text,\n \"opera\" text,\n \"other\" text\n);\n\nQuestion: What percentage of users were using Internet Explorer according to the source that reported 20.01% used Firefox?" }, { "role": "assistant", "content": "SELECT \"internet_explorer\" FROM \"usage_share_of_desktop_browsers_for_june\" WHERE \"firefox\"='20.01%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_prix_career_statistics\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"machine\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: How many points did team Rothmans Honda have in 1992?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"grand_prix_career_statistics\" WHERE \"team\"='rothmans honda' AND \"year\"=1992;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_prix_career_statistics\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"machine\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: What class before 1990 has points of 33?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"grand_prix_career_statistics\" WHERE \"year\"<1990 AND \"points\"=33;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_prix_career_statistics\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"machine\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: How many total points were in 1992?" }, { "role": "assistant", "content": "SELECT COUNT(\"points\") FROM \"grand_prix_career_statistics\" WHERE \"year\"=1992;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_prix_career_statistics\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"machine\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: In 1992, what class has higher wins than 0?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"grand_prix_career_statistics\" WHERE \"wins\">0 AND \"year\"=1992;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_prix_career_statistics\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"machine\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: What was the class that team Honda Britain was in with points higher than 0?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"grand_prix_career_statistics\" WHERE \"team\"='honda britain' AND \"points\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" real,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: Which FA Cup Goals have League Cup Apps larger than 0, and a Name of trevor cherry?" }, { "role": "assistant", "content": "SELECT MAX(\"fa_cup_goals\") FROM \"appearances_and_goals\" WHERE \"league_cup_apps\">0 AND \"name\"='trevor cherry';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" real,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: How many League Goals have League Cup Goals smaller than 0?" }, { "role": "assistant", "content": "SELECT SUM(\"league_goals\") FROM \"appearances_and_goals\" WHERE \"league_cup_goals\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slam_women_s_singles_performance_t\" (\n \"tournament\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What's the 2009 of the Australian Open having a 1R in 2011?" }, { "role": "assistant", "content": "SELECT \"2009\" FROM \"grand_slam_women_s_singles_performance_t\" WHERE \"2011\"='1r' AND \"tournament\"='australian open';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slam_women_s_singles_performance_t\" (\n \"tournament\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What's the 2008 of the Australian Open when the 2011 was 1R?" }, { "role": "assistant", "content": "SELECT \"2008\" FROM \"grand_slam_women_s_singles_performance_t\" WHERE \"2011\"='1r' AND \"tournament\"='australian open';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slam_women_s_singles_performance_t\" (\n \"tournament\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What's the 2008 of the US Open when 2010 was 2R and 2011 was 1R?" }, { "role": "assistant", "content": "SELECT \"2008\" FROM \"grand_slam_women_s_singles_performance_t\" WHERE \"2011\"='1r' AND \"2010\"='2r' AND \"tournament\"='us open';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_line_series\" (\n \"airing_date\" text,\n \"english_title_chinese_title\" text,\n \"number_of_episodes\" real,\n \"genre\" text,\n \"official_website\" text\n);\n\nQuestion: What is the lowest number of episodes in a series with an airing date of 12 jan- 6 feb?" }, { "role": "assistant", "content": "SELECT MIN(\"number_of_episodes\") FROM \"first_line_series\" WHERE \"airing_date\"='12 jan- 6 feb';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles\" (\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 has petra mandula patricia wartusch as the opponent in the final?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"doubles\" WHERE \"opponent_in_the_final\"='petra mandula patricia wartusch';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles\" (\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 date has kimberly po nathalie tauziat as the opponent in the final?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"doubles\" WHERE \"opponent_in_the_final\"='kimberly po nathalie tauziat';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles\" (\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 score has February 12, 2006 as the date?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"doubles\" WHERE \"date\"='february 12, 2006';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles\" (\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 opponent in the final has October 9, 2005 as the date?" }, { "role": "assistant", "content": "SELECT \"opponent_in_the_final\" FROM \"doubles\" WHERE \"date\"='october 9, 2005';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the to par for Bo Bae Song?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"player\"='bo bae song';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the to par for Jiyai Shin when the place is t1?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"place\"='t1' AND \"player\"='jiyai shin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the to par for Jiyai Shin in place t1?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"place\"='t1' AND \"player\"='jiyai shin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What was Laura Diaz's score for place t9?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"second_round\" WHERE \"place\"='t9' AND \"player\"='laura diaz';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What country does Bo Bae Song play for?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"second_round\" WHERE \"player\"='bo bae song';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table_by_country\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many gold medals did Brazil win with a total of more than 55 medals?" }, { "role": "assistant", "content": "SELECT AVG(\"gold\") FROM \"medal_table_by_country\" WHERE \"nation\"='brazil' AND \"total\">55;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table_by_country\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many teams won more than 2 silver medals and fewer than 2 Bronze medals?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"medal_table_by_country\" WHERE \"silver\">2 AND \"bronze\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table_by_country\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the fewest gold medals won by Greece?" }, { "role": "assistant", "content": "SELECT MIN(\"gold\") FROM \"medal_table_by_country\" WHERE \"nation\"='greece';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table_by_country\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest rank of the United States, with fewer than 4 bronze medals?" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"medal_table_by_country\" WHERE \"nation\"='united states' AND \"bronze\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table_by_country\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the highest number of gold medals won by a team that won fewer than 2 silver and fewer than 4 bronze medals?" }, { "role": "assistant", "content": "SELECT MAX(\"gold\") FROM \"medal_table_by_country\" WHERE \"silver\"<2 AND \"bronze\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" real,\n \"react\" real\n);\n\nQuestion: Which React has a Lane smaller than 4, and a Rank larger than 4, and a Time larger than 23.22?" }, { "role": "assistant", "content": "SELECT AVG(\"react\") FROM \"semifinal_2\" WHERE \"lane\"<4 AND \"rank\">4 AND \"time\">23.22;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010_ladder\" (\n \"hampden_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What shows for against when draws are 0, and losses are 16?" }, { "role": "assistant", "content": "SELECT AVG(\"against\") FROM \"2010_ladder\" WHERE \"draws\"=0 AND \"losses\"=16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010_ladder\" (\n \"hampden_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the highest number of wins when draws are larger than 1, and byes are larger than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"wins\") FROM \"2010_ladder\" WHERE \"draws\">1 AND \"byes\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_in_uefa_super_cup_by_club\" (\n \"team\" text,\n \"winners\" real,\n \"runners_up\" real,\n \"years_won\" text,\n \"years_runners_up\" text\n);\n\nQuestion: Which team were runners-up in 2007 and had 1 under winners?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"performance_in_uefa_super_cup_by_club\" WHERE \"winners\"=1 AND \"years_runners_up\"='2007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_in_uefa_super_cup_by_club\" (\n \"team\" text,\n \"winners\" real,\n \"runners_up\" real,\n \"years_won\" text,\n \"years_runners_up\" text\n);\n\nQuestion: What is the sum of winners when 1983 is the years won?" }, { "role": "assistant", "content": "SELECT COUNT(\"winners\") FROM \"performance_in_uefa_super_cup_by_club\" WHERE \"years_won\"='1983';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"single_game\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"opposition\" text\n);\n\nQuestion: Which Rank has a Total of 12?" }, { "role": "assistant", "content": "SELECT AVG(\"rank\") FROM \"single_game\" WHERE \"total\"=12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"single_game\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"opposition\" text\n);\n\nQuestion: Which Rank has an Opposition of limerick?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"single_game\" WHERE \"opposition\"='limerick';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"single_game\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"opposition\" text\n);\n\nQuestion: How much Rank has a Tally of 0-10, and an Opposition of cork?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"single_game\" WHERE \"tally\"='0-10' AND \"opposition\"='cork';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"single_game\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"opposition\" text\n);\n\nQuestion: Which Total has a Rank smaller than 3, and a County of cork?" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"single_game\" WHERE \"rank\"<3 AND \"county\"='cork';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"single_game\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"opposition\" text\n);\n\nQuestion: Which Rank has a Tally of 4-0?" }, { "role": "assistant", "content": "SELECT AVG(\"rank\") FROM \"single_game\" WHERE \"tally\"='4-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_5\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"nationality\" text,\n \"time\" real,\n \"react\" real\n);\n\nQuestion: Which Lane has a Rank larger than 3, and a Time larger than 45.63, and a Reaction smaller than 0.28800000000000003, and an Athlete of geiner mosquera?" }, { "role": "assistant", "content": "SELECT MAX(\"lane\") FROM \"heat_5\" WHERE \"rank\">3 AND \"time\">45.63 AND \"react\"<0.28800000000000003 AND \"athlete\"='geiner mosquera';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_5\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"nationality\" text,\n \"time\" real,\n \"react\" real\n);\n\nQuestion: How many reactions have an Athlete of alleyne francique, and a Lane larger than 9?" }, { "role": "assistant", "content": "SELECT COUNT(\"react\") FROM \"heat_5\" WHERE \"athlete\"='alleyne francique' AND \"lane\">9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"previous_championship_encounters\" (\n \"year\" real,\n \"venue\" text,\n \"competition\" text,\n \"kilkenny_score\" text,\n \"waterford_score\" text\n);\n\nQuestion: What yeae has 6-08 (24) as a waterford score?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"previous_championship_encounters\" WHERE \"waterford_score\"='6-08 (24)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"previous_championship_encounters\" (\n \"year\" real,\n \"venue\" text,\n \"competition\" text,\n \"kilkenny_score\" text,\n \"waterford_score\" text\n);\n\nQuestion: What is the lowest year that has all-ireland hurling final as the competition, and 6-08 (24) as the waterford score?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"previous_championship_encounters\" WHERE \"competition\"='all-ireland hurling final' AND \"waterford_score\"='6-08 (24)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"previous_championship_encounters\" (\n \"year\" real,\n \"venue\" text,\n \"competition\" text,\n \"kilkenny_score\" text,\n \"waterford_score\" text\n);\n\nQuestion: What is the waterford score that has a year prior to 1963, with all-ireland hurling final replay as the competition?" }, { "role": "assistant", "content": "SELECT \"waterford_score\" FROM \"previous_championship_encounters\" WHERE \"year\"<1963 AND \"competition\"='all-ireland hurling final replay';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entry_list\" (\n \"team\" text,\n \"car_spec\" text,\n \"drivers\" text,\n \"class\" text,\n \"rounds\" text\n);\n\nQuestion: What rounds did RML Racing Silverline and James Nash compete?" }, { "role": "assistant", "content": "SELECT \"rounds\" FROM \"entry_list\" WHERE \"team\"='rml racing silverline' AND \"drivers\"='james nash';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entry_list\" (\n \"team\" text,\n \"car_spec\" text,\n \"drivers\" text,\n \"class\" text,\n \"rounds\" text\n);\n\nQuestion: What class is Rob Collard in?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"entry_list\" WHERE \"drivers\"='rob collard';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entry_list\" (\n \"team\" text,\n \"car_spec\" text,\n \"drivers\" text,\n \"class\" text,\n \"rounds\" text\n);\n\nQuestion: What is the car specs for team Airwaves BMW's driver Rob Collard?" }, { "role": "assistant", "content": "SELECT \"car_spec\" FROM \"entry_list\" WHERE \"team\"='airwaves bmw' AND \"drivers\"='rob collard';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"channel_listing\" (\n \"name\" text,\n \"language\" text,\n \"owner\" text,\n \"group\" text,\n \"type\" text\n);\n\nQuestion: What is the language of TV3?" }, { "role": "assistant", "content": "SELECT \"language\" FROM \"channel_listing\" WHERE \"name\"='tv3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"channel_listing\" (\n \"name\" text,\n \"language\" text,\n \"owner\" text,\n \"group\" text,\n \"type\" text\n);\n\nQuestion: What is the group of ESPN International Sports?" }, { "role": "assistant", "content": "SELECT \"group\" FROM \"channel_listing\" WHERE \"name\"='espn international sports';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"channel_listing\" (\n \"name\" text,\n \"language\" text,\n \"owner\" text,\n \"group\" text,\n \"type\" text\n);\n\nQuestion: What is the type of station for ESPN International Sports?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"channel_listing\" WHERE \"name\"='espn international sports';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"channel_listing\" (\n \"name\" text,\n \"language\" text,\n \"owner\" text,\n \"group\" text,\n \"type\" text\n);\n\nQuestion: What is the type of station that is in the movies group?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"channel_listing\" WHERE \"group\"='movies';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_2\" (\n \"rank\" real,\n \"name\" text,\n \"1st_run\" text,\n \"2nd_run\" text,\n \"3rd_run\" text,\n \"total\" real\n);\n\nQuestion: What is the total sum ranked less than 5 with a 37.076 (2) 3rd run?" }, { "role": "assistant", "content": "SELECT SUM(\"total\") FROM \"heat_2\" WHERE \"rank\"<5 AND \"3rd_run\"='37.076 (2)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_2\" (\n \"rank\" real,\n \"name\" text,\n \"1st_run\" text,\n \"2nd_run\" text,\n \"3rd_run\" text,\n \"total\" real\n);\n\nQuestion: What is the name of the person with a total of 22?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"heat_2\" WHERE \"total\"=22;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_2\" (\n \"rank\" real,\n \"name\" text,\n \"1st_run\" text,\n \"2nd_run\" text,\n \"3rd_run\" text,\n \"total\" real\n);\n\nQuestion: What is the total with a rank less than 8 and a 40.143 (4) 2nd run?" }, { "role": "assistant", "content": "SELECT \"total\" FROM \"heat_2\" WHERE \"rank\"<8 AND \"2nd_run\"='40.143 (4)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records_1951_1976\" (\n \"time\" text,\n \"athlete\" text,\n \"nationality\" text,\n \"location_of_race\" text,\n \"date\" text\n);\n\nQuestion: What's the nationality of Henry Carr having a time of 20.3y?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"records_1951_1976\" WHERE \"athlete\"='henry carr' AND \"time\"='20.3y';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records_1951_1976\" (\n \"time\" text,\n \"athlete\" text,\n \"nationality\" text,\n \"location_of_race\" text,\n \"date\" text\n);\n\nQuestion: What's the nationality of Livio Berruti?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"records_1951_1976\" WHERE \"athlete\"='livio berruti';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records_1951_1976\" (\n \"time\" text,\n \"athlete\" text,\n \"nationality\" text,\n \"location_of_race\" text,\n \"date\" text\n);\n\nQuestion: What's the nationality of Ray norton with a time of 20.6?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"records_1951_1976\" WHERE \"time\"='20.6' AND \"athlete\"='ray norton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_european_ultra_prominent_peaks\" (\n \"peak\" text,\n \"country\" text,\n \"elevation_m\" real,\n \"prominence_m\" real,\n \"col_m\" real\n);\n\nQuestion: What is the sum of the prominence in m of slovakia?" }, { "role": "assistant", "content": "SELECT SUM(\"prominence_m\") FROM \"list_of_european_ultra_prominent_peaks\" WHERE \"country\"='slovakia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_european_ultra_prominent_peaks\" (\n \"peak\" text,\n \"country\" text,\n \"elevation_m\" real,\n \"prominence_m\" real,\n \"col_m\" real\n);\n\nQuestion: What is the prominence in m of a col in m greater than 738?" }, { "role": "assistant", "content": "SELECT \"prominence_m\" FROM \"list_of_european_ultra_prominent_peaks\" WHERE \"col_m\">738;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_european_ultra_prominent_peaks\" (\n \"peak\" text,\n \"country\" text,\n \"elevation_m\" real,\n \"prominence_m\" real,\n \"col_m\" real\n);\n\nQuestion: Whta is the lowest col in m of gerlachovsk\u00fd \u0161t\u00edt peak, which has an elevation greater than 2,655 m?" }, { "role": "assistant", "content": "SELECT MIN(\"col_m\") FROM \"list_of_european_ultra_prominent_peaks\" WHERE \"peak\"='gerlachovsk\u00fd \u0161t\u00edt' AND \"elevation_m\">'2,655';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_european_ultra_prominent_peaks\" (\n \"peak\" text,\n \"country\" text,\n \"elevation_m\" real,\n \"prominence_m\" real,\n \"col_m\" real\n);\n\nQuestion: What is the lowest elevation in m of moldoveanu peak, which has a prominence in m less than 2,103 and a col in m less than 498?" }, { "role": "assistant", "content": "SELECT MIN(\"elevation_m\") FROM \"list_of_european_ultra_prominent_peaks\" WHERE \"prominence_m\"<'2,103' AND \"peak\"='moldoveanu peak' AND \"col_m\"<498;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_european_ultra_prominent_peaks\" (\n \"peak\" text,\n \"country\" text,\n \"elevation_m\" real,\n \"prominence_m\" real,\n \"col_m\" real\n);\n\nQuestion: What is the average prominence in m of pietrosul rodnei peak, which has an elevation less than 2,303?" }, { "role": "assistant", "content": "SELECT AVG(\"prominence_m\") FROM \"list_of_european_ultra_prominent_peaks\" WHERE \"peak\"='pietrosul rodnei' AND \"elevation_m\"<'2,303';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_record_progression\" (\n \"score\" text,\n \"shooter\" text,\n \"date\" text,\n \"comp\" text,\n \"place\" text\n);\n\nQuestion: What is the Score of the Shooter with a Comp of OG?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"world_record_progression\" WHERE \"comp\"='og';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualified_competitors\" (\n \"position\" text,\n \"gymnast\" text,\n \"a_score\" real,\n \"b_score\" real,\n \"total\" real\n);\n\nQuestion: What is the B Score when the total is more than 16.125, and position is 3rd?" }, { "role": "assistant", "content": "SELECT SUM(\"b_score\") FROM \"qualified_competitors\" WHERE \"total\">16.125 AND \"position\"='3rd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualified_competitors\" (\n \"position\" text,\n \"gymnast\" text,\n \"a_score\" real,\n \"b_score\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest A Score when the B Score is 9.15, and total is 16.05?" }, { "role": "assistant", "content": "SELECT MIN(\"a_score\") FROM \"qualified_competitors\" WHERE \"b_score\"=9.15 AND \"total\"=16.05;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_3\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: Who had a time of 7:14.64?" }, { "role": "assistant", "content": "SELECT \"athlete\" FROM \"heat_3\" WHERE \"time\"='7:14.64';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_3\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What rank was Lassi Karonen?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"heat_3\" WHERE \"athlete\"='lassi karonen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_3\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What was the rank when then time was 7:52.53?" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"heat_3\" WHERE \"time\"='7:52.53';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_3\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: Who was the athlete from Germany with notes of Q?" }, { "role": "assistant", "content": "SELECT \"athlete\" FROM \"heat_3\" WHERE \"notes\"='q' AND \"country\"='germany';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_3\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What rank is Germany?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"heat_3\" WHERE \"country\"='germany';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_3\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: Who was the athlete from Hong Kong?" }, { "role": "assistant", "content": "SELECT \"athlete\" FROM \"heat_3\" WHERE \"country\"='hong kong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment_08_09\" real,\n \"ihsaa_class_football_class\" text,\n \"county\" text,\n \"year_joined\" real,\n \"previous_conference\" text,\n \"year_left\" real,\n \"conference_joined\" text\n);\n\nQuestion: Which school has a mascot of the Blazers and in the Northeast Corner conference?" }, { "role": "assistant", "content": "SELECT \"school\" FROM \"former_members\" WHERE \"conference_joined\"='northeast corner' AND \"mascot\"='blazers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment_08_09\" real,\n \"ihsaa_class_football_class\" text,\n \"county\" text,\n \"year_joined\" real,\n \"previous_conference\" text,\n \"year_left\" real,\n \"conference_joined\" text\n);\n\nQuestion: Which mascot has an IHSAA Class and Football class of 2A/2A?" }, { "role": "assistant", "content": "SELECT \"mascot\" FROM \"former_members\" WHERE \"ihsaa_class_football_class\"='2a/2a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"amateur_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Which player was selected in rounds under 3?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"amateur_draft\" WHERE \"round\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"f\" (\n \"township\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sqmi\" real,\n \"water_sqmi\" real,\n \"latitude\" real,\n \"longitude\" real,\n \"geo_id\" real,\n \"ansi_code\" real\n);\n\nQuestion: Which Water (sqmi) has a Pop (2010) of 359, and a Longitude smaller than -97.176811?" }, { "role": "assistant", "content": "SELECT MAX(\"water_sqmi\") FROM \"f\" WHERE \"pop_2010\"=359 AND \"longitude\"<-97.176811;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"f\" (\n \"township\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sqmi\" real,\n \"water_sqmi\" real,\n \"latitude\" real,\n \"longitude\" real,\n \"geo_id\" real,\n \"ansi_code\" real\n);\n\nQuestion: Which Land (sqmi) has a Water (sqmi) smaller than 0.04, and a Longitude of -96.794706?" }, { "role": "assistant", "content": "SELECT MIN(\"land_sqmi\") FROM \"f\" WHERE \"water_sqmi\"<0.04 AND \"longitude\"=-96.794706;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"f\" (\n \"township\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sqmi\" real,\n \"water_sqmi\" real,\n \"latitude\" real,\n \"longitude\" real,\n \"geo_id\" real,\n \"ansi_code\" real\n);\n\nQuestion: How much Latitude has a Water (sqmi) of 0.267, and an ANSI code larger than 1759605?" }, { "role": "assistant", "content": "SELECT SUM(\"latitude\") FROM \"f\" WHERE \"water_sqmi\"=0.267 AND \"ansi_code\">1759605;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"f\" (\n \"township\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sqmi\" real,\n \"water_sqmi\" real,\n \"latitude\" real,\n \"longitude\" real,\n \"geo_id\" real,\n \"ansi_code\" real\n);\n\nQuestion: Which ANSI code has a GEO ID larger than 3809927140, and a Water (sqmi) smaller than 0.492, and a Pop (2010) of 37, and a Latitude larger than 48.245979?" }, { "role": "assistant", "content": "SELECT MIN(\"ansi_code\") FROM \"f\" WHERE \"geo_id\">3809927140 AND \"water_sqmi\"<0.492 AND \"pop_2010\"=37 AND \"latitude\">48.245979;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What is the Owner of Frequency 00 99.3?" }, { "role": "assistant", "content": "SELECT \"owner\" FROM \"radio\" WHERE \"frequency\"='00 99.3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What is the Branding of Frequency 00 94.5?" }, { "role": "assistant", "content": "SELECT \"branding\" FROM \"radio\" WHERE \"frequency\"='00 94.5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What is the Call Sign of the Frequency by Owner CKUA Radio Foundation?" }, { "role": "assistant", "content": "SELECT \"call_sign\" FROM \"radio\" WHERE \"owner\"='ckua radio foundation';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What is the Owner of the Frequency with a Format of First Nations Community Radio?" }, { "role": "assistant", "content": "SELECT \"owner\" FROM \"radio\" WHERE \"format\"='first nations community radio';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"size\" real,\n \"ihsaa_class\" text,\n \"county\" text,\n \"year_joined\" real,\n \"previous_conference\" text\n);\n\nQuestion: Which School has a Previous Conference of none (new school), and a Year Joined larger than 1960, and a Location of versailles?" }, { "role": "assistant", "content": "SELECT \"school\" FROM \"membership\" WHERE \"previous_conference\"='none (new school)' AND \"year_joined\">1960 AND \"location\"='versailles';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"size\" real,\n \"ihsaa_class\" text,\n \"county\" text,\n \"year_joined\" real,\n \"previous_conference\" text\n);\n\nQuestion: Which Location has a Previous Conference of independents, and a Mascot of hilltoppers?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"membership\" WHERE \"previous_conference\"='independents' AND \"mascot\"='hilltoppers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"size\" real,\n \"ihsaa_class\" text,\n \"county\" text,\n \"year_joined\" real,\n \"previous_conference\" text\n);\n\nQuestion: Which Year Joined has a Size larger than 93, and a Previous Conference of none (new school), and a Mascot of rebels?" }, { "role": "assistant", "content": "SELECT AVG(\"year_joined\") FROM \"membership\" WHERE \"size\">93 AND \"previous_conference\"='none (new school)' AND \"mascot\"='rebels';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"size\" real,\n \"ihsaa_class\" text,\n \"county\" text,\n \"year_joined\" real,\n \"previous_conference\" text\n);\n\nQuestion: How many years Joined have a Size smaller than 417, and an IHSAA Class of A, and a School of jac-cen-del?" }, { "role": "assistant", "content": "SELECT COUNT(\"year_joined\") FROM \"membership\" WHERE \"size\"<417 AND \"ihsaa_class\"='a' AND \"school\"='jac-cen-del';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1950s\" (\n \"country\" text,\n \"1951\" real,\n \"1952\" real,\n \"1953\" real,\n \"1954\" real,\n \"1955\" real,\n \"1956\" real,\n \"1957\" real,\n \"1958\" real,\n \"1959\" real\n);\n\nQuestion: What is the 1957 number when the 1955 is smaller than 0.63, and 1952 is larger than 0.22?" }, { "role": "assistant", "content": "SELECT COUNT(\"1957\") FROM \"1950s\" WHERE \"1955\"<0.63 AND \"1952\">0.22;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1950s\" (\n \"country\" text,\n \"1951\" real,\n \"1952\" real,\n \"1953\" real,\n \"1954\" real,\n \"1955\" real,\n \"1956\" real,\n \"1957\" real,\n \"1958\" real,\n \"1959\" real\n);\n\nQuestion: What is the 1952 rate when the 1954 is more than 4.2?" }, { "role": "assistant", "content": "SELECT SUM(\"1952\") FROM \"1950s\" WHERE \"1954\">4.2;" } ]