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 \"1973\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: what type of game has the resuts of 1:0?" }, { "role": "assistant", "content": "SELECT \"type_of_game\" FROM \"1973\" WHERE \"results\"='1:0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_most_appearances\" (\n \"ranking\" real,\n \"nationality\" text,\n \"name\" text,\n \"games\" real,\n \"years\" text\n);\n\nQuestion: What is the average Games for 1965\u20131981, and a Ranking larger than 4?" }, { "role": "assistant", "content": "SELECT AVG(\"games\") FROM \"all_time_most_appearances\" WHERE \"years\"='1965\u20131981' AND \"ranking\">4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_most_appearances\" (\n \"ranking\" real,\n \"nationality\" text,\n \"name\" text,\n \"games\" real,\n \"years\" text\n);\n\nQuestion: What is the Years when games shows 550?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"all_time_most_appearances\" WHERE \"games\"=550;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_most_appearances\" (\n \"ranking\" real,\n \"nationality\" text,\n \"name\" text,\n \"games\" real,\n \"years\" text\n);\n\nQuestion: What is the Nationality that shows 4 as the ranking?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"all_time_most_appearances\" WHERE \"ranking\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rotavirus_genes_and_proteins\" (\n \"rna_segment_gene\" real,\n \"size_s_base_pair\" real,\n \"protein\" text,\n \"molecular_weight_k_da\" text,\n \"location\" text,\n \"copies_per_particle\" text\n);\n\nQuestion: Which location has a copies per particle of 0 and a protein of nsp3?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"rotavirus_genes_and_proteins\" WHERE \"copies_per_particle\"='0' AND \"protein\"='nsp3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rotavirus_genes_and_proteins\" (\n \"rna_segment_gene\" real,\n \"size_s_base_pair\" real,\n \"protein\" text,\n \"molecular_weight_k_da\" text,\n \"location\" text,\n \"copies_per_particle\" text\n);\n\nQuestion: How many copies per particle does the protein nsp2 have?" }, { "role": "assistant", "content": "SELECT \"copies_per_particle\" FROM \"rotavirus_genes_and_proteins\" WHERE \"protein\"='nsp2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rotavirus_genes_and_proteins\" (\n \"rna_segment_gene\" real,\n \"size_s_base_pair\" real,\n \"protein\" text,\n \"molecular_weight_k_da\" text,\n \"location\" text,\n \"copies_per_particle\" text\n);\n\nQuestion: What is the highest RNA segment having a protein of vp2 and a base pair size over 2690?" }, { "role": "assistant", "content": "SELECT MAX(\"rna_segment_gene\") FROM \"rotavirus_genes_and_proteins\" WHERE \"protein\"='vp2' AND \"size_s_base_pair\">2690;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rotavirus_genes_and_proteins\" (\n \"rna_segment_gene\" real,\n \"size_s_base_pair\" real,\n \"protein\" text,\n \"molecular_weight_k_da\" text,\n \"location\" text,\n \"copies_per_particle\" text\n);\n\nQuestion: What is the number of copies per particle having a nonstructural location, an RNA segment over 5 and a base pair size under 751?" }, { "role": "assistant", "content": "SELECT \"copies_per_particle\" FROM \"rotavirus_genes_and_proteins\" WHERE \"location\"='nonstructural' AND \"rna_segment_gene\">5 AND \"size_s_base_pair\"<751;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual\" (\n \"year\" real,\n \"location\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: Who won the bronze medal in Hiroshima?" }, { "role": "assistant", "content": "SELECT \"bronze\" FROM \"individual\" WHERE \"location\"='hiroshima';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual\" (\n \"year\" real,\n \"location\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: Who won the silver medal in the games where Hong Chia-yuh took home bronze?" }, { "role": "assistant", "content": "SELECT \"silver\" FROM \"individual\" WHERE \"bronze\"='hong chia-yuh';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual\" (\n \"year\" real,\n \"location\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: Where did Michael Eric Bibat win bronze?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"individual\" WHERE \"bronze\"='michael eric bibat';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual\" (\n \"year\" real,\n \"location\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: Who won gold in the games where Pan Cheng-Tsung won silver?" }, { "role": "assistant", "content": "SELECT \"gold\" FROM \"individual\" WHERE \"silver\"='pan cheng-tsung';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many Bronzes that has a Silver of 0, and a Gold of 0, and a Nation of denmark, and a Total larger than 1?" }, { "role": "assistant", "content": "SELECT SUM(\"bronze\") FROM \"medal_table\" WHERE \"silver\"=0 AND \"gold\"=0 AND \"nation\"='denmark' AND \"total\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many Bronzes that has a Nation of italy?" }, { "role": "assistant", "content": "SELECT MAX(\"bronze\") FROM \"medal_table\" WHERE \"nation\"='italy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many Silvers that has a Gold smaller than 1, and a Rank of 9, and a Total smaller than 1?" }, { "role": "assistant", "content": "SELECT SUM(\"silver\") FROM \"medal_table\" WHERE \"gold\"<1 AND \"rank\"='9' AND \"total\"<1;" } ]
[ { "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: Which Bronze has a Nation of spain?" }, { "role": "assistant", "content": "SELECT MAX(\"bronze\") FROM \"medal_table\" WHERE \"nation\"='spain';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"name\" text,\n \"date\" text,\n \"goals\" real,\n \"assists\" real,\n \"team\" text,\n \"venue\" text,\n \"opponent\" text,\n \"competition\" text,\n \"total_goals\" real,\n \"total_assists\" real\n);\n\nQuestion: Who was the opponent at the competition held at Jeonju?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"members\" WHERE \"venue\"='jeonju';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"january\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: How many Januarys had records of 22-15-6?" }, { "role": "assistant", "content": "SELECT COUNT(\"january\") FROM \"schedule_and_results\" WHERE \"record\"='22-15-6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"event_circuit\" text,\n \"city_state\" text,\n \"date\" text,\n \"format\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: what is the date of barbagallo raceway?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"calendar\" WHERE \"event_circuit\"='barbagallo raceway';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"event_circuit\" text,\n \"city_state\" text,\n \"date\" text,\n \"format\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: What city is the hidden valley raceway in?" }, { "role": "assistant", "content": "SELECT \"city_state\" FROM \"calendar\" WHERE \"event_circuit\"='hidden valley raceway';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"april\" (\n \"game_num\" real,\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What was the score in game 81?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"april\" WHERE \"game_num\"=81;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"april\" (\n \"game_num\" real,\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What was the record after game 79?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"april\" WHERE \"game_num\"=79;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"april\" (\n \"game_num\" real,\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Who was the home team on April 15?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"april\" WHERE \"date\"='april 15';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"administrative_divisions\" (\n \"name\" text,\n \"hanzi\" text,\n \"hanyu_pinyin\" text,\n \"population_2010_11_01\" text,\n \"area_km\" text,\n \"density_km\" text\n);\n\nQuestion: What is the Pinyin for \u4f9d\u5170\u53bf?" }, { "role": "assistant", "content": "SELECT \"hanyu_pinyin\" FROM \"administrative_divisions\" WHERE \"hanzi\"='\u4f9d\u5170\u53bf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"administrative_divisions\" (\n \"name\" text,\n \"hanzi\" text,\n \"hanyu_pinyin\" text,\n \"population_2010_11_01\" text,\n \"area_km\" text,\n \"density_km\" text\n);\n\nQuestion: What is the Pinyin for the item that has a density of 77?" }, { "role": "assistant", "content": "SELECT \"hanyu_pinyin\" FROM \"administrative_divisions\" WHERE \"density_km\"='77';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"administrative_divisions\" (\n \"name\" text,\n \"hanzi\" text,\n \"hanyu_pinyin\" text,\n \"population_2010_11_01\" text,\n \"area_km\" text,\n \"density_km\" text\n);\n\nQuestion: What is the population for the area that has a Hanzi of \u5ef6\u5bff\u53bf?" }, { "role": "assistant", "content": "SELECT \"population_2010_11_01\" FROM \"administrative_divisions\" WHERE \"hanzi\"='\u5ef6\u5bff\u53bf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"administrative_divisions\" (\n \"name\" text,\n \"hanzi\" text,\n \"hanyu_pinyin\" text,\n \"population_2010_11_01\" text,\n \"area_km\" text,\n \"density_km\" text\n);\n\nQuestion: What is the population as of 11-01-2010 for Bayan County?" }, { "role": "assistant", "content": "SELECT \"population_2010_11_01\" FROM \"administrative_divisions\" WHERE \"name\"='bayan county';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"administrative_divisions\" (\n \"name\" text,\n \"hanzi\" text,\n \"hanyu_pinyin\" text,\n \"population_2010_11_01\" text,\n \"area_km\" text,\n \"density_km\" text\n);\n\nQuestion: What is the Hanzi for p\u00edngf\u00e1ng q\u016b?" }, { "role": "assistant", "content": "SELECT \"hanzi\" FROM \"administrative_divisions\" WHERE \"hanyu_pinyin\"='p\u00edngf\u00e1ng q\u016b';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_standings\" (\n \"season\" real,\n \"overall\" text,\n \"slalom\" text,\n \"giant_slalom\" text,\n \"super_g\" text,\n \"combined\" text\n);\n\nQuestion: Which Slalom has an overall of 25 in the 2009 season?" }, { "role": "assistant", "content": "SELECT \"slalom\" FROM \"season_standings\" WHERE \"overall\"='25' AND \"season\"=2009;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_standings\" (\n \"season\" real,\n \"overall\" text,\n \"slalom\" text,\n \"giant_slalom\" text,\n \"super_g\" text,\n \"combined\" text\n);\n\nQuestion: What is the earliest season with a Giant Slalom of 5?" }, { "role": "assistant", "content": "SELECT MIN(\"season\") FROM \"season_standings\" WHERE \"giant_slalom\"='5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_standings\" (\n \"season\" real,\n \"overall\" text,\n \"slalom\" text,\n \"giant_slalom\" text,\n \"super_g\" text,\n \"combined\" text\n);\n\nQuestion: Which combined score has an overall of 8?" }, { "role": "assistant", "content": "SELECT \"combined\" FROM \"season_standings\" WHERE \"overall\"='8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_standings\" (\n \"season\" real,\n \"overall\" text,\n \"slalom\" text,\n \"giant_slalom\" text,\n \"super_g\" text,\n \"combined\" text\n);\n\nQuestion: Which Super Ghas a missed season due to injury?" }, { "role": "assistant", "content": "SELECT \"super_g\" FROM \"season_standings\" WHERE \"overall\"='missed season due to injury';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: Name the most events with cuts made more than 6 and top 25 more than 30" }, { "role": "assistant", "content": "SELECT MAX(\"events\") FROM \"summary\" WHERE \"cuts_made\">6 AND \"top_25\">30;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: Name the top-10 with top-5 less than 1" }, { "role": "assistant", "content": "SELECT \"top_10\" FROM \"summary\" WHERE \"top_5\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: Name the averae top 25 with events less than 0" }, { "role": "assistant", "content": "SELECT AVG(\"top_25\") FROM \"summary\" WHERE \"events\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: Name the total number of top 10 with top 25 less than 2 and top 5 more than 0" }, { "role": "assistant", "content": "SELECT COUNT(\"top_10\") FROM \"summary\" WHERE \"top_25\"<2 AND \"top_5\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"0_6_0_0_6_0_garratt_production_list_all_\" (\n \"gauge\" text,\n \"railway\" text,\n \"works_no\" text,\n \"year\" text,\n \"builder\" text\n);\n\nQuestion: In what Year is the Gauge 2 ft 6 in?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"0_6_0_0_6_0_garratt_production_list_all_\" WHERE \"gauge\"='2 ft 6 in';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"0_6_0_0_6_0_garratt_production_list_all_\" (\n \"gauge\" text,\n \"railway\" text,\n \"works_no\" text,\n \"year\" text,\n \"builder\" text\n);\n\nQuestion: In what Year is the Works No. 2040-2049?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"0_6_0_0_6_0_garratt_production_list_all_\" WHERE \"works_no\"='2040-2049';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"0_6_0_0_6_0_garratt_production_list_all_\" (\n \"gauge\" text,\n \"railway\" text,\n \"works_no\" text,\n \"year\" text,\n \"builder\" text\n);\n\nQuestion: In what Year is the Works no. 2040-2049?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"0_6_0_0_6_0_garratt_production_list_all_\" WHERE \"works_no\"='2040-2049';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"0_6_0_0_6_0_garratt_production_list_all_\" (\n \"gauge\" text,\n \"railway\" text,\n \"works_no\" text,\n \"year\" text,\n \"builder\" text\n);\n\nQuestion: What is the Gauge of Builder Beyer, Peacock?" }, { "role": "assistant", "content": "SELECT \"gauge\" FROM \"0_6_0_0_6_0_garratt_production_list_all_\" WHERE \"builder\"='beyer, peacock';" } ]
[ { "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 round has the record of 5-0?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='5-0';" } ]
[ { "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 method has the record of 11-1?" }, { "role": "assistant", "content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='11-1';" } ]
[ { "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: The UFC 44 event has what method?" }, { "role": "assistant", "content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='ufc 44';" } ]
[ { "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 has 12-1 as a record?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='12-1';" } ]
[ { "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 round was a loss with a record of 12-3?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"mixed_martial_arts_record\" WHERE \"res\"='loss' AND \"record\"='12-3';" } ]
[ { "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: The record of 11-1 used what method?" }, { "role": "assistant", "content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='11-1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_11_5_6\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What surface was the match on November 6, 1982 played on?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"doubles_11_5_6\" WHERE \"date\"='november 6, 1982';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_standings\" (\n \"team\" text,\n \"players\" text,\n \"placing\" real,\n \"round_robin_w_l\" text,\n \"matches_w_l\" text,\n \"sets_w_l\" text\n);\n\nQuestion: What place did russia finish in?" }, { "role": "assistant", "content": "SELECT COUNT(\"placing\") FROM \"teams_and_standings\" WHERE \"team\"='russia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_class\" (\n \"class\" text,\n \"season\" text,\n \"race\" real,\n \"podiums\" real,\n \"pole\" real,\n \"f_lap\" real,\n \"w_chmp\" real\n);\n\nQuestion: What's the WChmp of the race greater than 42 and pole greater than 11?" }, { "role": "assistant", "content": "SELECT COUNT(\"w_chmp\") FROM \"by_class\" WHERE \"race\">42 AND \"pole\">11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_class\" (\n \"class\" text,\n \"season\" text,\n \"race\" real,\n \"podiums\" real,\n \"pole\" real,\n \"f_lap\" real,\n \"w_chmp\" real\n);\n\nQuestion: If podiums are 26, what's the lowest WChmp?" }, { "role": "assistant", "content": "SELECT MIN(\"w_chmp\") FROM \"by_class\" WHERE \"podiums\"=26;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_class\" (\n \"class\" text,\n \"season\" text,\n \"race\" real,\n \"podiums\" real,\n \"pole\" real,\n \"f_lap\" real,\n \"w_chmp\" real\n);\n\nQuestion: If the class is total, what is the total number of podiums?" }, { "role": "assistant", "content": "SELECT COUNT(\"podiums\") FROM \"by_class\" WHERE \"class\"='total';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_class\" (\n \"class\" text,\n \"season\" text,\n \"race\" real,\n \"podiums\" real,\n \"pole\" real,\n \"f_lap\" real,\n \"w_chmp\" real\n);\n\nQuestion: During race 14, what's the podiums?" }, { "role": "assistant", "content": "SELECT MAX(\"podiums\") FROM \"by_class\" WHERE \"race\"=14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_good_news_network_in_spanish\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" text,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What Call sign has a City of license of higgston, ga?" }, { "role": "assistant", "content": "SELECT \"call_sign\" FROM \"the_good_news_network_in_spanish\" WHERE \"city_of_license\"='higgston, ga';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_good_news_network_in_spanish\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" text,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What City of license has a ERP W of 2,000?" }, { "role": "assistant", "content": "SELECT \"city_of_license\" FROM \"the_good_news_network_in_spanish\" WHERE \"erp_w\"='2,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_good_news_network_in_spanish\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" text,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is the Class where City of license is lake oconee, ga?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"the_good_news_network_in_spanish\" WHERE \"city_of_license\"='lake oconee, ga';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indianapolis_500\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"start\" real,\n \"finish\" real,\n \"team\" text\n);\n\nQuestion: What chassis has 2012 as the year?" }, { "role": "assistant", "content": "SELECT \"chassis\" FROM \"indianapolis_500\" WHERE \"year\"=2012;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indianapolis_500\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"start\" real,\n \"finish\" real,\n \"team\" text\n);\n\nQuestion: What engine has a start less than 7, and 23 as a finish?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"indianapolis_500\" WHERE \"start\"<7 AND \"finish\"=23;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indianapolis_500\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"start\" real,\n \"finish\" real,\n \"team\" text\n);\n\nQuestion: What is the average finish that has a start greater than 3, with honda as the engine, and 2011 as the year?" }, { "role": "assistant", "content": "SELECT AVG(\"finish\") FROM \"indianapolis_500\" WHERE \"start\">3 AND \"engine\"='honda' AND \"year\"=2011;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indianapolis_500\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"start\" real,\n \"finish\" real,\n \"team\" text\n);\n\nQuestion: How many starts have a year prior to 2012, and team penske as the team, with a finish greater than 27?" }, { "role": "assistant", "content": "SELECT SUM(\"start\") FROM \"indianapolis_500\" WHERE \"year\"<2012 AND \"team\"='team penske' AND \"finish\">27;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indianapolis_500\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"start\" real,\n \"finish\" real,\n \"team\" text\n);\n\nQuestion: What start has a year later than 2010, and chip ganassi racing as the team?" }, { "role": "assistant", "content": "SELECT \"start\" FROM \"indianapolis_500\" WHERE \"year\">2010 AND \"team\"='chip ganassi racing';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"penalty_shootouts\" (\n \"date\" text,\n \"competition\" text,\n \"opponents\" text,\n \"venue\" text,\n \"score\" text\n);\n\nQuestion: Who was the opponent at the Football League Trophy competition?" }, { "role": "assistant", "content": "SELECT \"opponents\" FROM \"penalty_shootouts\" WHERE \"competition\"='football league trophy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"penalty_shootouts\" (\n \"date\" text,\n \"competition\" text,\n \"opponents\" text,\n \"venue\" text,\n \"score\" text\n);\n\nQuestion: What was the opponent at the League Play Offs at home?" }, { "role": "assistant", "content": "SELECT \"opponents\" FROM \"penalty_shootouts\" WHERE \"venue\"='home' AND \"competition\"='league play offs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"penalty_shootouts\" (\n \"date\" text,\n \"competition\" text,\n \"opponents\" text,\n \"venue\" text,\n \"score\" text\n);\n\nQuestion: What venue held that game against the Queens Park Rangers?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"penalty_shootouts\" WHERE \"opponents\"='queens park rangers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"penalty_shootouts\" (\n \"date\" text,\n \"competition\" text,\n \"opponents\" text,\n \"venue\" text,\n \"score\" text\n);\n\nQuestion: Who was the opponent at the away game with a score of 5-4?" }, { "role": "assistant", "content": "SELECT \"opponents\" FROM \"penalty_shootouts\" WHERE \"venue\"='away' AND \"score\"='5-4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"penalty_shootouts\" (\n \"date\" text,\n \"competition\" text,\n \"opponents\" text,\n \"venue\" text,\n \"score\" text\n);\n\nQuestion: Who was the opponent at the League Cup competition with a score of 3-1?" }, { "role": "assistant", "content": "SELECT \"opponents\" FROM \"penalty_shootouts\" WHERE \"competition\"='league cup' AND \"score\"='3-1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text,\n \"team_classification\" text,\n \"combativity_award\" text\n);\n\nQuestion: Name the team classification for stage of 20" }, { "role": "assistant", "content": "SELECT \"team_classification\" FROM \"classification_leadership\" WHERE \"stage\"='20';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text,\n \"team_classification\" text,\n \"combativity_award\" text\n);\n\nQuestion: Name the winner with mountains classification of franco pellizotti and combativity award of martijn maaskant" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"classification_leadership\" WHERE \"mountains_classification\"='franco pellizotti' AND \"combativity_award\"='martijn maaskant';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text,\n \"team_classification\" text,\n \"combativity_award\" text\n);\n\nQuestion: Name the general classification with roman kreuziger and points classification of fabian cancellara" }, { "role": "assistant", "content": "SELECT \"general_classification\" FROM \"classification_leadership\" WHERE \"young_rider_classification\"='roman kreuziger' AND \"points_classification\"='fabian cancellara';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text,\n \"team_classification\" text,\n \"combativity_award\" text\n);\n\nQuestion: Name the combativity award with winner of luis le\u00f3n s\u00e1nchez" }, { "role": "assistant", "content": "SELECT \"combativity_award\" FROM \"classification_leadership\" WHERE \"winner\"='luis le\u00f3n s\u00e1nchez';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_two\" (\n \"order\" real,\n \"episode\" text,\n \"air_date\" text,\n \"u_s_timeslot_est\" text,\n \"18_49\" real,\n \"viewers\" real\n);\n\nQuestion: What is the sum of numbers listed in 18-49 for the episode that aired on June 25, 2009 with an order larger than 29?" }, { "role": "assistant", "content": "SELECT SUM(\"18_49\") FROM \"season_two\" WHERE \"air_date\"='june 25, 2009' AND \"order\">29;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_two\" (\n \"order\" real,\n \"episode\" text,\n \"air_date\" text,\n \"u_s_timeslot_est\" text,\n \"18_49\" real,\n \"viewers\" real\n);\n\nQuestion: What is the total 18-49 for the episode that aired on July 2, 2009 with more than 3.5 viewers?" }, { "role": "assistant", "content": "SELECT COUNT(\"18_49\") FROM \"season_two\" WHERE \"air_date\"='july 2, 2009' AND \"viewers\">3.5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_two\" (\n \"order\" real,\n \"episode\" text,\n \"air_date\" text,\n \"u_s_timeslot_est\" text,\n \"18_49\" real,\n \"viewers\" real\n);\n\nQuestion: What was the timeslot in the US for the episode, \"the farm\"?" }, { "role": "assistant", "content": "SELECT \"u_s_timeslot_est\" FROM \"season_two\" WHERE \"episode\"='\\\"the farm\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_two\" (\n \"order\" real,\n \"episode\" text,\n \"air_date\" text,\n \"u_s_timeslot_est\" text,\n \"18_49\" real,\n \"viewers\" real\n);\n\nQuestion: What is the average 18-49 for the episode that had an order number higher than 35 and less than 3.5 viewers?" }, { "role": "assistant", "content": "SELECT AVG(\"18_49\") FROM \"season_two\" WHERE \"viewers\"<3.5 AND \"order\">35;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_two\" (\n \"order\" real,\n \"episode\" text,\n \"air_date\" text,\n \"u_s_timeslot_est\" text,\n \"18_49\" real,\n \"viewers\" real\n);\n\nQuestion: What is the episode name that aired on July 23, 2009 with more than 3.31 viewers?" }, { "role": "assistant", "content": "SELECT \"episode\" FROM \"season_two\" WHERE \"air_date\"='july 23, 2009' AND \"viewers\">3.31;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"studio_albums\" (\n \"year\" real,\n \"album\" text,\n \"oricon_position\" real,\n \"1st_week_sales\" text,\n \"copies_sold\" text\n);\n\nQuestion: What year sold 1,695,900+ copies with an Oricon position larger than 1?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"studio_albums\" WHERE \"copies_sold\"='1,695,900+' AND \"oricon_position\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"studio_albums\" (\n \"year\" real,\n \"album\" text,\n \"oricon_position\" real,\n \"1st_week_sales\" text,\n \"copies_sold\" text\n);\n\nQuestion: How many copies were sold where the position is lager than 1 in 1988?" }, { "role": "assistant", "content": "SELECT \"copies_sold\" FROM \"studio_albums\" WHERE \"oricon_position\">1 AND \"year\"=1988;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"studio_albums\" (\n \"year\" real,\n \"album\" text,\n \"oricon_position\" real,\n \"1st_week_sales\" text,\n \"copies_sold\" text\n);\n\nQuestion: How many copies were sold when the 1st week sales were 4,590+?" }, { "role": "assistant", "content": "SELECT \"copies_sold\" FROM \"studio_albums\" WHERE \"1st_week_sales\"='4,590+';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_wins_7\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the Winning Score on May 29, 1977?" }, { "role": "assistant", "content": "SELECT \"winning_score\" FROM \"lpga_tour_wins_7\" WHERE \"date\"='may 29, 1977';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_wins_7\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: On what Date was Patty Sheehan Runner(s)-up?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"lpga_tour_wins_7\" WHERE \"runner_s_up\"='patty sheehan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_wins_7\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: On what Date was Judy Rankin Runner(s)-up?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"lpga_tour_wins_7\" WHERE \"runner_s_up\"='judy rankin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_wins_7\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: On what Date was the Winning score \u20138 (69-72-70-69=280)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"lpga_tour_wins_7\" WHERE \"winning_score\"='\u20138 (69-72-70-69=280)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_wins_7\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: On what Date was Carole Charbonnier a Runner(s)-up with a 1 stroke Margin of victory?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"lpga_tour_wins_7\" WHERE \"margin_of_victory\"='1 stroke' AND \"runner_s_up\"='carole charbonnier';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_wins_7\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What Tournament has a Winning score of +3 (71-72-70=213)?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"lpga_tour_wins_7\" WHERE \"winning_score\"='+3 (71-72-70=213)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What date did the team play home in Toronto?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"february\" WHERE \"home\"='toronto';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: How many people attended the game when Larry Hughes(33) was the leading scorer and cleveland was visiting?" }, { "role": "assistant", "content": "SELECT SUM(\"attendance\") FROM \"february\" WHERE \"visitor\"='cleveland' AND \"leading_scorer\"='larry hughes(33)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: When did they play Utah at home?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"february\" WHERE \"home\"='utah';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"stadium\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What opponent has balboa stadium as the opponent?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"regular_season\" WHERE \"stadium\"='balboa stadium';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"stadium\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What is the highest attendance that has oakland raiders as the opponent, with a week greater than 9?" }, { "role": "assistant", "content": "SELECT MAX(\"attendance\") FROM \"regular_season\" WHERE \"opponent\"='oakland raiders' AND \"week\">9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1999\" (\n \"rank\" real,\n \"name\" text,\n \"headquarters\" text,\n \"primary_industry\" text,\n \"market_value_usd_million\" real\n);\n\nQuestion: Where is the headquarter of the conglomerate industry?" }, { "role": "assistant", "content": "SELECT \"headquarters\" FROM \"1999\" WHERE \"primary_industry\"='conglomerate';" } ]
[ { "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 date was the game played at the venue of Hrazdan Stadium, Yerevan, Armenia?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"international_goals\" WHERE \"venue\"='hrazdan stadium, yerevan, armenia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual\" (\n \"year\" real,\n \"location\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: Who was the bronze medal when the Asian Games were held in Busan?" }, { "role": "assistant", "content": "SELECT \"bronze\" FROM \"individual\" WHERE \"location\"='busan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual\" (\n \"year\" real,\n \"location\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: Who won the gold when Kim Hyang-Mi won the bronze?" }, { "role": "assistant", "content": "SELECT \"gold\" FROM \"individual\" WHERE \"bronze\"='kim hyang-mi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual\" (\n \"year\" real,\n \"location\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: What was the earliest year that Park Jung-Ah won the gold?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"individual\" WHERE \"gold\"='park jung-ah';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual\" (\n \"year\" real,\n \"location\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: Who won the bronze when the Asian Games were in Doha?" }, { "role": "assistant", "content": "SELECT \"bronze\" FROM \"individual\" WHERE \"location\"='doha';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the Attendance on November 29, 1953?" }, { "role": "assistant", "content": "SELECT SUM(\"attendance\") FROM \"schedule\" WHERE \"date\"='november 29, 1953';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: After Week 5, what was the Result of the game with Attendance greater than 22,057?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\">'22,057' AND \"week\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"pick_num\" real,\n \"nfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which NFL team picked Patrick Collins?" }, { "role": "assistant", "content": "SELECT \"nfl_team\" FROM \"nfl_draft\" WHERE \"player\"='patrick collins';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"pick_num\" real,\n \"nfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which NFL team picked a player for the Wide Receiver position?" }, { "role": "assistant", "content": "SELECT \"nfl_team\" FROM \"nfl_draft\" WHERE \"position\"='wide receiver';" } ]
[ { "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 result has a year after 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 tournament has a year prior to 2001?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"achievements\" WHERE \"year\"<2001;" } ]