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 \"standings\" (\n \"nation\" text,\n \"skip\" text,\n \"ends_won\" real,\n \"ends_lost\" real,\n \"blank_ends\" real,\n \"stolen_ends\" real,\n \"shot_pct\" text\n);\n\nQuestion: What is the Blank Ends when there are less than 39 ends won and, more than 35 ends lost, and 4 stolen ends." }, { "role": "assistant", "content": "SELECT \"blank_ends\" FROM \"standings\" WHERE \"ends_won\"<39 AND \"ends_lost\">35 AND \"stolen_ends\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1995\" (\n \"date\" text,\n \"cover_model\" text,\n \"centerfold_model\" text,\n \"interview_subject\" text,\n \"20_questions\" text\n);\n\nQuestion: Who was the 20 Questions section aimed at when the Interview Subject was Camille Paglia?" }, { "role": "assistant", "content": "SELECT \"20_questions\" FROM \"1995\" WHERE \"interview_subject\"='camille paglia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1995\" (\n \"date\" text,\n \"cover_model\" text,\n \"centerfold_model\" text,\n \"interview_subject\" text,\n \"20_questions\" text\n);\n\nQuestion: Who was the Centerfold Model on 5-95?" }, { "role": "assistant", "content": "SELECT \"centerfold_model\" FROM \"1995\" WHERE \"date\"='5-95';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1995\" (\n \"date\" text,\n \"cover_model\" text,\n \"centerfold_model\" text,\n \"interview_subject\" text,\n \"20_questions\" text\n);\n\nQuestion: Who was the 20 Questions section aimed at when Cover Model was Kimberley Conrad Hefner?" }, { "role": "assistant", "content": "SELECT \"20_questions\" FROM \"1995\" WHERE \"cover_model\"='kimberley conrad hefner';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1995\" (\n \"date\" text,\n \"cover_model\" text,\n \"centerfold_model\" text,\n \"interview_subject\" text,\n \"20_questions\" text\n);\n\nQuestion: Who was the Centerfold Model when the Cover Model was Julie Lynn Cialini?" }, { "role": "assistant", "content": "SELECT \"centerfold_model\" FROM \"1995\" WHERE \"cover_model\"='julie lynn cialini';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1995\" (\n \"date\" text,\n \"cover_model\" text,\n \"centerfold_model\" text,\n \"interview_subject\" text,\n \"20_questions\" text\n);\n\nQuestion: Who was the Interview Subject when the Centerfold Model was Melissa Deanne Holliday?" }, { "role": "assistant", "content": "SELECT \"interview_subject\" FROM \"1995\" WHERE \"centerfold_model\"='melissa deanne holliday';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1995\" (\n \"date\" text,\n \"cover_model\" text,\n \"centerfold_model\" text,\n \"interview_subject\" text,\n \"20_questions\" text\n);\n\nQuestion: Who was the 20 Questions section aimed at when Centerfold Model was Rachel Je\u00e1n Marteen?" }, { "role": "assistant", "content": "SELECT \"20_questions\" FROM \"1995\" WHERE \"centerfold_model\"='rachel je\u00e1n marteen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_united_states_national_ice_hocke\" (\n \"position\" text,\n \"jersey_num\" real,\n \"name\" text,\n \"height_cm\" real,\n \"weight_kg\" real,\n \"birthdate\" text,\n \"birthplace\" text,\n \"previous_club_team\" text\n);\n\nQuestion: What was the average Jersey # of Steve Griffith, when his Weight (kg) was less than 84?" }, { "role": "assistant", "content": "SELECT AVG(\"jersey_num\") FROM \"list_of_united_states_national_ice_hocke\" WHERE \"name\"='steve griffith' AND \"weight_kg\"<84;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_united_states_national_ice_hocke\" (\n \"position\" text,\n \"jersey_num\" real,\n \"name\" text,\n \"height_cm\" real,\n \"weight_kg\" real,\n \"birthdate\" text,\n \"birthplace\" text,\n \"previous_club_team\" text\n);\n\nQuestion: What was the lowest Weight (kg) for a player that had Jersey #10?" }, { "role": "assistant", "content": "SELECT MIN(\"weight_kg\") FROM \"list_of_united_states_national_ice_hocke\" WHERE \"jersey_num\"=10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_united_states_national_ice_hocke\" (\n \"position\" text,\n \"jersey_num\" real,\n \"name\" text,\n \"height_cm\" real,\n \"weight_kg\" real,\n \"birthdate\" text,\n \"birthplace\" text,\n \"previous_club_team\" text\n);\n\nQuestion: How many different Heights (cm) did Mark Fusco have, when his Jersey # was less than 16?" }, { "role": "assistant", "content": "SELECT COUNT(\"height_cm\") FROM \"list_of_united_states_national_ice_hocke\" WHERE \"jersey_num\"<16 AND \"name\"='mark fusco';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_4\" (\n \"episode\" real,\n \"title\" text,\n \"story\" text,\n \"adapted_by\" text,\n \"director\" text,\n \"airdate\" text,\n \"exists\" text\n);\n\nQuestion: What was the title of the episode that martin worth wrote the story for?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"series_4\" WHERE \"story\"='martin worth';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_13_9_titles_4_runners_up\" (\n \"outcome\" text,\n \"year\" text,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: In what year was Xavier Malisse the runner-up with scores of 4\u20136, 6\u20134, [8\u201310]?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"doubles_13_9_titles_4_runners_up\" WHERE \"outcome\"='runner-up' AND \"score\"='4\u20136, 6\u20134, [8\u201310]';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_13_9_titles_4_runners_up\" (\n \"outcome\" text,\n \"year\" text,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: On what surface was the game played that had a score of 4\u20136, 6\u20134, [8\u201310]?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"doubles_13_9_titles_4_runners_up\" WHERE \"score\"='4\u20136, 6\u20134, [8\u201310]';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players\" (\n \"player\" text,\n \"position\" text,\n \"date_of_birth_age\" text,\n \"caps\" text,\n \"province_club\" text\n);\n\nQuestion: What is Caps, when Province / Club is Example, when Position is Prop, and when Player is Sam Walters?" }, { "role": "assistant", "content": "SELECT \"caps\" FROM \"players\" WHERE \"province_club\"='example' AND \"position\"='prop' AND \"player\"='sam walters';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players\" (\n \"player\" text,\n \"position\" text,\n \"date_of_birth_age\" text,\n \"caps\" text,\n \"province_club\" text\n);\n\nQuestion: What is Postition, when Date of Birth (Age) is Example, and when Player is Mark Spencer?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"players\" WHERE \"date_of_birth_age\"='example' AND \"player\"='mark spencer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players\" (\n \"player\" text,\n \"position\" text,\n \"date_of_birth_age\" text,\n \"caps\" text,\n \"province_club\" text\n);\n\nQuestion: What is Player, when Caps is Example, and when Position is Center?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"players\" WHERE \"caps\"='example' AND \"position\"='center';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players\" (\n \"player\" text,\n \"position\" text,\n \"date_of_birth_age\" text,\n \"caps\" text,\n \"province_club\" text\n);\n\nQuestion: What is Caps, when Province / Club is DRFC, and when Position is Center?" }, { "role": "assistant", "content": "SELECT \"caps\" FROM \"players\" WHERE \"province_club\"='drfc' AND \"position\"='center';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players\" (\n \"player\" text,\n \"position\" text,\n \"date_of_birth_age\" text,\n \"caps\" text,\n \"province_club\" text\n);\n\nQuestion: What is Position, when Caps is Example, and When Player is Shane Kelly?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"players\" WHERE \"caps\"='example' AND \"player\"='shane kelly';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players\" (\n \"player\" text,\n \"position\" text,\n \"date_of_birth_age\" text,\n \"caps\" text,\n \"province_club\" text\n);\n\nQuestion: What is Position, when Province / Club is Example, when Date of Birth (Age) is Example, and when Player is Michael Elumeze?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"players\" WHERE \"province_club\"='example' AND \"date_of_birth_age\"='example' AND \"player\"='michael elumeze';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the average number played of the team with 1 drawn and 24 against?" }, { "role": "assistant", "content": "SELECT AVG(\"played\") FROM \"campeonato_paulista\" WHERE \"drawn\"=1 AND \"against\"=24;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the highest lost number of the team with less than 14 points and less than 18 played?" }, { "role": "assistant", "content": "SELECT MAX(\"lost\") FROM \"campeonato_paulista\" WHERE \"points\"<14 AND \"played\"<18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Which team had 1 position?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"campeonato_paulista\" WHERE \"position\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the lowest number of played of the team with 18 points and a position greater than 5?" }, { "role": "assistant", "content": "SELECT MIN(\"played\") FROM \"campeonato_paulista\" WHERE \"points\"=18 AND \"position\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the total number of points of the team with less than 4 drawn and an against of 34?" }, { "role": "assistant", "content": "SELECT COUNT(\"points\") FROM \"campeonato_paulista\" WHERE \"drawn\"<4 AND \"against\"=34;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the average number of drawn with a difference of 17 and 22 points?" }, { "role": "assistant", "content": "SELECT AVG(\"drawn\") FROM \"campeonato_paulista\" WHERE \"difference\"='17' AND \"points\"=22;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the team that has forward-center as a position?" }, { "role": "assistant", "content": "SELECT \"school_club_team\" FROM \"s\" WHERE \"position\"='forward-center';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: What team does Kenny Smith play for?" }, { "role": "assistant", "content": "SELECT \"school_club_team\" FROM \"s\" WHERE \"player\"='kenny smith';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: What years was Lebanon the nationality?" }, { "role": "assistant", "content": "SELECT \"years_in_orlando\" FROM \"s\" WHERE \"nationality\"='lebanon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_of_japan_tour_5\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Which margin of victory has cyber agent ladies as the tournament?" }, { "role": "assistant", "content": "SELECT \"margin_of_victory\" FROM \"lpga_of_japan_tour_5\" WHERE \"tournament\"='cyber agent ladies';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_of_japan_tour_5\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What date has yani tseng as the runner (s)-up?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"lpga_of_japan_tour_5\" WHERE \"runner_s_up\"='yani tseng';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_of_japan_tour_5\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the margin of victory that has masters gc ladies as the tournament?" }, { "role": "assistant", "content": "SELECT \"margin_of_victory\" FROM \"lpga_of_japan_tour_5\" WHERE \"tournament\"='masters gc ladies';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_of_japan_tour_5\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the date that has yani tseng as the runner (s)-up?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"lpga_of_japan_tour_5\" WHERE \"runner_s_up\"='yani tseng';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_of_japan_tour_5\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the winning score that has victory of 2 strokes for the margin, and cyber agent ladies for the tournament?" }, { "role": "assistant", "content": "SELECT \"winning_score\" FROM \"lpga_of_japan_tour_5\" WHERE \"margin_of_victory\"='2 strokes' AND \"tournament\"='cyber agent ladies';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_results\" (\n \"season\" text,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"fast_laps\" real,\n \"points\" real,\n \"pos\" text\n);\n\nQuestion: What is the highest Poles with a win that is smaller than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"poles\") FROM \"career_results\" WHERE \"wins\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_production\" (\n \"headphone_model\" text,\n \"headphone_class\" text,\n \"sensitivity_d_b\" text,\n \"impedance_ohms\" real,\n \"driver_matched_d_b\" text,\n \"construction\" text,\n \"earpads\" text,\n \"termination\" text,\n \"succeeded_by\" text\n);\n\nQuestion: What is the headphone model with a plastic construction and a prestige headphone class?" }, { "role": "assistant", "content": "SELECT \"headphone_model\" FROM \"past_production\" WHERE \"construction\"='plastic' AND \"headphone_class\"='prestige';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_production\" (\n \"headphone_model\" text,\n \"headphone_class\" text,\n \"sensitivity_d_b\" text,\n \"impedance_ohms\" real,\n \"driver_matched_d_b\" text,\n \"construction\" text,\n \"earpads\" text,\n \"termination\" text,\n \"succeeded_by\" text\n);\n\nQuestion: What earpads does the headphone with plastic contruction and was succeeded by igrado have?" }, { "role": "assistant", "content": "SELECT \"earpads\" FROM \"past_production\" WHERE \"construction\"='plastic' AND \"succeeded_by\"='igrado';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_production\" (\n \"headphone_model\" text,\n \"headphone_class\" text,\n \"sensitivity_d_b\" text,\n \"impedance_ohms\" real,\n \"driver_matched_d_b\" text,\n \"construction\" text,\n \"earpads\" text,\n \"termination\" text,\n \"succeeded_by\" text\n);\n\nQuestion: What are the earpads of the headphone with a plastic construction, an unknown sensitivity, and was succeeded by sr325?" }, { "role": "assistant", "content": "SELECT \"earpads\" FROM \"past_production\" WHERE \"construction\"='plastic' AND \"sensitivity_d_b\"='unknown' AND \"succeeded_by\"='sr325';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_production\" (\n \"headphone_model\" text,\n \"headphone_class\" text,\n \"sensitivity_d_b\" text,\n \"impedance_ohms\" real,\n \"driver_matched_d_b\" text,\n \"construction\" text,\n \"earpads\" text,\n \"termination\" text,\n \"succeeded_by\" text\n);\n\nQuestion: What is the headphone model which was succeeded by sr325?" }, { "role": "assistant", "content": "SELECT \"headphone_model\" FROM \"past_production\" WHERE \"succeeded_by\"='sr325';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"circuit\" text,\n \"winning_drivers\" text,\n \"winning_constructor\" text,\n \"regulations\" text,\n \"report\" text\n);\n\nQuestion: What regulations have hudson as the winning constructor?" }, { "role": "assistant", "content": "SELECT \"regulations\" FROM \"results\" WHERE \"winning_constructor\"='hudson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"circuit\" text,\n \"winning_drivers\" text,\n \"winning_constructor\" text,\n \"regulations\" text,\n \"report\" text\n);\n\nQuestion: What regulations have carlos arzani as the winning driver?" }, { "role": "assistant", "content": "SELECT \"regulations\" FROM \"results\" WHERE \"winning_drivers\"='carlos arzani';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"circuit\" text,\n \"winning_drivers\" text,\n \"winning_constructor\" text,\n \"regulations\" text,\n \"report\" text\n);\n\nQuestion: What is the latest year that has ferrari 166 fl as the winning constructor?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"results\" WHERE \"winning_constructor\"='ferrari 166 fl';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbcs_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What is the city of license that has lp as the class?" }, { "role": "assistant", "content": "SELECT \"city_of_license\" FROM \"s_rebroadcaster_of_cbcs_fm\" WHERE \"class\"='lp';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbcs_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What is the identifier that has 50,000 watts of power?" }, { "role": "assistant", "content": "SELECT \"identifier\" FROM \"s_rebroadcaster_of_cbcs_fm\" WHERE \"power\"='50,000 watts';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbcs_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What RECNet has 40 watts of power and temagami as the city of license?" }, { "role": "assistant", "content": "SELECT \"rec_net\" FROM \"s_rebroadcaster_of_cbcs_fm\" WHERE \"power\"='40 watts' AND \"city_of_license\"='temagami';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbcs_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What city of license has A as a class, and cbec-fm as the identifier?" }, { "role": "assistant", "content": "SELECT \"city_of_license\" FROM \"s_rebroadcaster_of_cbcs_fm\" WHERE \"class\"='a' AND \"identifier\"='cbec-fm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbcs_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What RECNet has elk lake as the city of license?" }, { "role": "assistant", "content": "SELECT \"rec_net\" FROM \"s_rebroadcaster_of_cbcs_fm\" WHERE \"city_of_license\"='elk lake';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbcs_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What frequency has temagami as the city of license?" }, { "role": "assistant", "content": "SELECT \"frequency\" FROM \"s_rebroadcaster_of_cbcs_fm\" WHERE \"city_of_license\"='temagami';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"smaller_branches\" (\n \"branch\" text,\n \"address\" text,\n \"neighborhood\" text,\n \"first_branch_opened\" real,\n \"current_branch_opened\" real\n);\n\nQuestion: What is the highest Current Branch Opened, when Neighborhood is W. Portland Park?" }, { "role": "assistant", "content": "SELECT MAX(\"current_branch_opened\") FROM \"smaller_branches\" WHERE \"neighborhood\"='w. portland park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"smaller_branches\" (\n \"branch\" text,\n \"address\" text,\n \"neighborhood\" text,\n \"first_branch_opened\" real,\n \"current_branch_opened\" real\n);\n\nQuestion: What is the First Branch Opened, when Branch is Belmont Library?" }, { "role": "assistant", "content": "SELECT \"first_branch_opened\" FROM \"smaller_branches\" WHERE \"branch\"='belmont library';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"smaller_branches\" (\n \"branch\" text,\n \"address\" text,\n \"neighborhood\" text,\n \"first_branch_opened\" real,\n \"current_branch_opened\" real\n);\n\nQuestion: What is Neighborhood, when Branch is Hollywood Library?" }, { "role": "assistant", "content": "SELECT \"neighborhood\" FROM \"smaller_branches\" WHERE \"branch\"='hollywood library';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"smaller_branches\" (\n \"branch\" text,\n \"address\" text,\n \"neighborhood\" text,\n \"first_branch_opened\" real,\n \"current_branch_opened\" real\n);\n\nQuestion: What is Current Branch Opened, when Branch is Midland Library?" }, { "role": "assistant", "content": "SELECT \"current_branch_opened\" FROM \"smaller_branches\" WHERE \"branch\"='midland library';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assists\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"assists\" real\n);\n\nQuestion: Which player has the fewest assists and played 2 games or fewer?" }, { "role": "assistant", "content": "SELECT MIN(\"assists\") FROM \"assists\" WHERE \"games\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"monthly_mobile_subscriber_additions\" (\n \"year\" real,\n \"january\" real,\n \"february\" real,\n \"march\" real,\n \"april\" real,\n \"june\" real,\n \"july\" real,\n \"august\" real,\n \"september\" real,\n \"october\" real,\n \"november\" real,\n \"december\" real,\n \"annual_additions_in_millions\" real,\n \"average_monthly_additions_in_millions\" real\n);\n\nQuestion: What was the total number for March with less than 8.77 in January, more than 1.69 in December, an average monthly addition less than 5.35, and before 2004?" }, { "role": "assistant", "content": "SELECT COUNT(\"march\") FROM \"monthly_mobile_subscriber_additions\" WHERE \"january\"<8.77 AND \"december\">1.69 AND \"average_monthly_additions_in_millions\"<5.35 AND \"year\"<2004;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"monthly_mobile_subscriber_additions\" (\n \"year\" real,\n \"january\" real,\n \"february\" real,\n \"march\" real,\n \"april\" real,\n \"june\" real,\n \"july\" real,\n \"august\" real,\n \"september\" real,\n \"october\" real,\n \"november\" real,\n \"december\" real,\n \"annual_additions_in_millions\" real,\n \"average_monthly_additions_in_millions\" real\n);\n\nQuestion: What is the total number for November, larger than 8.53 in February, 20.21 in March, and less than 7.9 in September?" }, { "role": "assistant", "content": "SELECT COUNT(\"november\") FROM \"monthly_mobile_subscriber_additions\" WHERE \"february\">8.53 AND \"march\"=20.21 AND \"september\"<7.9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"monthly_mobile_subscriber_additions\" (\n \"year\" real,\n \"january\" real,\n \"february\" real,\n \"march\" real,\n \"april\" real,\n \"june\" real,\n \"july\" real,\n \"august\" real,\n \"september\" real,\n \"october\" real,\n \"november\" real,\n \"december\" real,\n \"annual_additions_in_millions\" real,\n \"average_monthly_additions_in_millions\" real\n);\n\nQuestion: What is the sum for December that has 0.36 in July, and lager than 0.35000000000000003 in February?" }, { "role": "assistant", "content": "SELECT SUM(\"december\") FROM \"monthly_mobile_subscriber_additions\" WHERE \"july\"=0.36 AND \"february\">0.35000000000000003;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"monthly_mobile_subscriber_additions\" (\n \"year\" real,\n \"january\" real,\n \"february\" real,\n \"march\" real,\n \"april\" real,\n \"june\" real,\n \"july\" real,\n \"august\" real,\n \"september\" real,\n \"october\" real,\n \"november\" real,\n \"december\" real,\n \"annual_additions_in_millions\" real,\n \"average_monthly_additions_in_millions\" real\n);\n\nQuestion: What is the total number for July with less than 8.05 in October, more than 4.46 in December, and more than 6.79 in November?" }, { "role": "assistant", "content": "SELECT COUNT(\"july\") FROM \"monthly_mobile_subscriber_additions\" WHERE \"october\"<8.05 AND \"december\">4.46 AND \"november\">6.79;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"monthly_mobile_subscriber_additions\" (\n \"year\" real,\n \"january\" real,\n \"february\" real,\n \"march\" real,\n \"april\" real,\n \"june\" real,\n \"july\" real,\n \"august\" real,\n \"september\" real,\n \"october\" real,\n \"november\" real,\n \"december\" real,\n \"annual_additions_in_millions\" real,\n \"average_monthly_additions_in_millions\" real\n);\n\nQuestion: What is the total number in October with less than 2.48 in September, after 2002, more than 1.42 in June, and smaller than 7.44 in February?" }, { "role": "assistant", "content": "SELECT COUNT(\"october\") FROM \"monthly_mobile_subscriber_additions\" WHERE \"september\"<2.48 AND \"year\">2002 AND \"june\">1.42 AND \"february\"<7.44;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Catalog with a Region that is europe?" }, { "role": "assistant", "content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"region\"='europe';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"specific_fuel_consumption_sfc_specific_i\" (\n \"engine_type\" text,\n \"scenario\" text,\n \"sfc_in_lb_lbf_h\" real,\n \"sfc_in_g_k_n_s\" real,\n \"specific_impulse_s\" real,\n \"effective_exhaust_velocity_m_s\" real\n);\n\nQuestion: What is the highest SFC in g/(kN*s) for Rolls-Royce/Snecma Olympus 593 engines and SFCs under 1.195 lb/(lbf*h)?" }, { "role": "assistant", "content": "SELECT MAX(\"sfc_in_g_k_n_s\") FROM \"specific_fuel_consumption_sfc_specific_i\" WHERE \"engine_type\"='rolls-royce/snecma olympus 593' AND \"sfc_in_lb_lbf_h\"<1.195;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"may\" (\n \"week_of\" text,\n \"tier\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"semi_finalists\" text\n);\n\nQuestion: What is Winner, when Week is 8 May, when Semi Finalists is Helena Sukov\u00e1 Mary Pierce, and when Runner-Up is Conchita Mart\u00ednez Patricia Tarabini?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"may\" WHERE \"week_of\"='8 may' AND \"semi_finalists\"='helena sukov\u00e1 mary pierce' AND \"runner_up\"='conchita mart\u00ednez patricia tarabini';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"may\" (\n \"week_of\" text,\n \"tier\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"semi_finalists\" text\n);\n\nQuestion: What is Week, when Semi Finalists is Sandrine Testud Yone Kamio?" }, { "role": "assistant", "content": "SELECT \"week_of\" FROM \"may\" WHERE \"semi_finalists\"='sandrine testud yone kamio';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_wickets_in_a_season\" (\n \"rank\" text,\n \"s_wicket\" text,\n \"player\" text,\n \"matches\" text,\n \"season\" text\n);\n\nQuestion: In what Season was Colin Miller (TAS) the Player?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"most_wickets_in_a_season\" WHERE \"player\"='colin miller (tas)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_wickets_in_a_season\" (\n \"rank\" text,\n \"s_wicket\" text,\n \"player\" text,\n \"matches\" text,\n \"season\" text\n);\n\nQuestion: What Rank has a 65 s Wicket?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"most_wickets_in_a_season\" WHERE \"s_wicket\"='65';" } ]
[ { "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 \"game_site\" text,\n \"record\" text,\n \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: Which result featured the Indianapolis Colts as opponents?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"opponent\"='indianapolis colts';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_special_cities_now_core_or_design\" (\n \"name\" text,\n \"japanese\" text,\n \"date_of_designation\" text,\n \"date_of_reclassification\" text,\n \"region\" text,\n \"prefecture\" text\n);\n\nQuestion: Whose Name has a Date of reclassification of 2003-04-01 (merge into shizuoka )?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"former_special_cities_now_core_or_design\" WHERE \"date_of_reclassification\"='2003-04-01 (merge into shizuoka )';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_special_cities_now_core_or_design\" (\n \"name\" text,\n \"japanese\" text,\n \"date_of_designation\" text,\n \"date_of_reclassification\" text,\n \"region\" text,\n \"prefecture\" text\n);\n\nQuestion: WHich Japanese has a Prefecture of iwate?" }, { "role": "assistant", "content": "SELECT \"japanese\" FROM \"former_special_cities_now_core_or_design\" WHERE \"prefecture\"='iwate';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_special_cities_now_core_or_design\" (\n \"name\" text,\n \"japanese\" text,\n \"date_of_designation\" text,\n \"date_of_reclassification\" text,\n \"region\" text,\n \"prefecture\" text\n);\n\nQuestion: Which Date of designation has a Name of kurume?" }, { "role": "assistant", "content": "SELECT \"date_of_designation\" FROM \"former_special_cities_now_core_or_design\" WHERE \"name\"='kurume';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_special_cities_now_core_or_design\" (\n \"name\" text,\n \"japanese\" text,\n \"date_of_designation\" text,\n \"date_of_reclassification\" text,\n \"region\" text,\n \"prefecture\" text\n);\n\nQuestion: What kind of Japanese has a Region of t\u014dhoku?" }, { "role": "assistant", "content": "SELECT \"japanese\" FROM \"former_special_cities_now_core_or_design\" WHERE \"region\"='t\u014dhoku';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_special_cities_now_core_or_design\" (\n \"name\" text,\n \"japanese\" text,\n \"date_of_designation\" text,\n \"date_of_reclassification\" text,\n \"region\" text,\n \"prefecture\" text\n);\n\nQuestion: WHose Name has a Region of kansai on 2012-04-01 ( core city )?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"former_special_cities_now_core_or_design\" WHERE \"region\"='kansai' AND \"date_of_reclassification\"='2012-04-01 ( core city )';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_united_states_national_ice_hocke\" (\n \"position\" text,\n \"name\" text,\n \"height_cm\" real,\n \"weight_kg\" real,\n \"birthdate\" text,\n \"birthplace\" text,\n \"1998_1999_team\" text\n);\n\nQuestion: What is the Position with a Birthdate that is august 17, 1980?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"list_of_united_states_national_ice_hocke\" WHERE \"birthdate\"='august 17, 1980';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"residence_hall\" text,\n \"established\" real,\n \"rector\" text,\n \"campus\" text,\n \"capacity\" real,\n \"colors\" text,\n \"mascot\" text\n);\n\nQuestion: Which capacity has a purple and white colors?" }, { "role": "assistant", "content": "SELECT \"capacity\" FROM \"references\" WHERE \"colors\"='purple and white';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"virginia_counties_and_cities_ranked_by_p\" (\n \"county_or_city\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: How many households have a median family income of $60,400?" }, { "role": "assistant", "content": "SELECT \"number_of_households\" FROM \"virginia_counties_and_cities_ranked_by_p\" WHERE \"median_family_income\"='$60,400';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"virginia_counties_and_cities_ranked_by_p\" (\n \"county_or_city\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: What county of city has more than 9,505 households with a median household income greater than $94,880?" }, { "role": "assistant", "content": "SELECT \"county_or_city\" FROM \"virginia_counties_and_cities_ranked_by_p\" WHERE \"number_of_households\">'9,505' AND \"median_household_income\"='$94,880';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_united_states_national_ice_hocke\" (\n \"position\" text,\n \"jersey_number\" real,\n \"name_v_t_e\" text,\n \"height_cm\" real,\n \"weight_kg\" real,\n \"birthplace\" text,\n \"2008_09_team\" text,\n \"nhl_rights_if_any\" text\n);\n\nQuestion: What is the average weight of the player with a height of 180 cm and plays the d position?" }, { "role": "assistant", "content": "SELECT AVG(\"weight_kg\") FROM \"list_of_united_states_national_ice_hocke\" WHERE \"height_cm\"=180 AND \"position\"='d';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_united_states_national_ice_hocke\" (\n \"position\" text,\n \"jersey_number\" real,\n \"name_v_t_e\" text,\n \"height_cm\" real,\n \"weight_kg\" real,\n \"birthplace\" text,\n \"2008_09_team\" text,\n \"nhl_rights_if_any\" text\n);\n\nQuestion: What is the birthplace of the player with Calgary Flames NHL rights, plays the f position, and has a height taller than 175 cm?" }, { "role": "assistant", "content": "SELECT \"birthplace\" FROM \"list_of_united_states_national_ice_hocke\" WHERE \"position\"='f' AND \"height_cm\">175 AND \"nhl_rights_if_any\"='calgary flames';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_united_states_national_ice_hocke\" (\n \"position\" text,\n \"jersey_number\" real,\n \"name_v_t_e\" text,\n \"height_cm\" real,\n \"weight_kg\" real,\n \"birthplace\" text,\n \"2008_09_team\" text,\n \"nhl_rights_if_any\" text\n);\n\nQuestion: What is the 2008-09 team of the player who plays the f position and has NHL rights with the New Jersey Devils?" }, { "role": "assistant", "content": "SELECT \"2008_09_team\" FROM \"list_of_united_states_national_ice_hocke\" WHERE \"position\"='f' AND \"nhl_rights_if_any\"='new jersey devils';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparison_of_action_potentials_a_ps_fro\" (\n \"animal\" text,\n \"cell_type\" text,\n \"resting_potential_m_v\" text,\n \"ap_increase_m_v\" text,\n \"ap_duration_ms\" text,\n \"conduction_speed_m_s\" text\n);\n\nQuestion: What was the resting potential with an AP duration of 1.0 and a median giant fiber cell type?" }, { "role": "assistant", "content": "SELECT \"resting_potential_m_v\" FROM \"comparison_of_action_potentials_a_ps_fro\" WHERE \"ap_duration_ms\"='1.0' AND \"cell_type\"='median giant fiber';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparison_of_action_potentials_a_ps_fro\" (\n \"animal\" text,\n \"cell_type\" text,\n \"resting_potential_m_v\" text,\n \"ap_increase_m_v\" text,\n \"ap_duration_ms\" text,\n \"conduction_speed_m_s\" text\n);\n\nQuestion: Which animal has a resting potential of \u221260?" }, { "role": "assistant", "content": "SELECT \"animal\" FROM \"comparison_of_action_potentials_a_ps_fro\" WHERE \"resting_potential_m_v\"='\u221260';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparison_of_action_potentials_a_ps_fro\" (\n \"animal\" text,\n \"cell_type\" text,\n \"resting_potential_m_v\" text,\n \"ap_increase_m_v\" text,\n \"ap_duration_ms\" text,\n \"conduction_speed_m_s\" text\n);\n\nQuestion: Which animal has an AP duration of 1.0 and a conduction speed of 7\u201330?" }, { "role": "assistant", "content": "SELECT \"animal\" FROM \"comparison_of_action_potentials_a_ps_fro\" WHERE \"ap_duration_ms\"='1.0' AND \"conduction_speed_m_s\"='7\u201330';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparison_of_action_potentials_a_ps_fro\" (\n \"animal\" text,\n \"cell_type\" text,\n \"resting_potential_m_v\" text,\n \"ap_increase_m_v\" text,\n \"ap_duration_ms\" text,\n \"conduction_speed_m_s\" text\n);\n\nQuestion: What AP increase has an AP duration of 0.75?" }, { "role": "assistant", "content": "SELECT \"ap_increase_m_v\" FROM \"comparison_of_action_potentials_a_ps_fro\" WHERE \"ap_duration_ms\"='0.75';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparison_of_action_potentials_a_ps_fro\" (\n \"animal\" text,\n \"cell_type\" text,\n \"resting_potential_m_v\" text,\n \"ap_increase_m_v\" text,\n \"ap_duration_ms\" text,\n \"conduction_speed_m_s\" text\n);\n\nQuestion: Which cell type has a conduction speed of 35?" }, { "role": "assistant", "content": "SELECT \"cell_type\" FROM \"comparison_of_action_potentials_a_ps_fro\" WHERE \"conduction_speed_m_s\"='35';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"england\" (\n \"rank\" real,\n \"name\" text,\n \"years\" text,\n \"matches\" real,\n \"goals\" real\n);\n\nQuestion: What was the total matches that ranked above 10?" }, { "role": "assistant", "content": "SELECT SUM(\"matches\") FROM \"england\" WHERE \"rank\">10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"england\" (\n \"rank\" real,\n \"name\" text,\n \"years\" text,\n \"matches\" real,\n \"goals\" real\n);\n\nQuestion: What was the total amount of matches for Alan Shearer?" }, { "role": "assistant", "content": "SELECT COUNT(\"matches\") FROM \"england\" WHERE \"name\"='alan shearer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"england\" (\n \"rank\" real,\n \"name\" text,\n \"years\" text,\n \"matches\" real,\n \"goals\" real\n);\n\nQuestion: What is the average goals for Jimmy Greaves, and matches more than 516?" }, { "role": "assistant", "content": "SELECT AVG(\"goals\") FROM \"england\" WHERE \"name\"='jimmy greaves' AND \"matches\">516;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"england\" (\n \"rank\" real,\n \"name\" text,\n \"years\" text,\n \"matches\" real,\n \"goals\" real\n);\n\nQuestion: What was the total number of matches for Nat Lofthouse, ranking higher than 7?" }, { "role": "assistant", "content": "SELECT COUNT(\"matches\") FROM \"england\" WHERE \"name\"='nat lofthouse' AND \"rank\">7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"england\" (\n \"rank\" real,\n \"name\" text,\n \"years\" text,\n \"matches\" real,\n \"goals\" real\n);\n\nQuestion: What is the highest rank for Nat Lofthouse, and goals more than 255?" }, { "role": "assistant", "content": "SELECT MAX(\"rank\") FROM \"england\" WHERE \"name\"='nat lofthouse' AND \"goals\">255;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" text,\n \"circuit\" text,\n \"location_state\" text,\n \"date\" text,\n \"winner\" text\n);\n\nQuestion: What is the location/state that has adelaide international raceway as the circuit?" }, { "role": "assistant", "content": "SELECT \"location_state\" FROM \"calendar\" WHERE \"circuit\"='adelaide international raceway';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episodes\" (\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What is the name of the director for the episode titled \"homewrecker for the holidays\"?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"episodes\" WHERE \"title\"='\\\"homewrecker for the holidays\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episodes\" (\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What is the Original air date for the episode with a Production code of 07-00-107?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"episodes\" WHERE \"production_code\"='07-00-107';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episodes\" (\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What is the name of the director of the episode written by robin schwartz & robert tarlow?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"episodes\" WHERE \"written_by\"='robin schwartz & robert tarlow';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episodes\" (\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What is the Original air date for the episode directed by lev l. spiro, with a Production code of 07-00-109?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"episodes\" WHERE \"directed_by\"='lev l. spiro' AND \"production_code\"='07-00-109';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episodes\" (\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What is the name of the writer for the episode with an Original air date of october 9, 2000?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"episodes\" WHERE \"original_air_date\"='october 9, 2000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episodes\" (\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What is the Title written by Terri Hughes & Ron Milbauer, and an Original air date of march 6, 2001?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"episodes\" WHERE \"written_by\"='terri hughes & ron milbauer' AND \"original_air_date\"='march 6, 2001';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What time or retired does Scott Dixon have?" }, { "role": "assistant", "content": "SELECT \"time_retired\" FROM \"race\" WHERE \"driver\"='scott dixon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which driver has a grid bigger than 3 and a time of +62.6 secs?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"race\" WHERE \"grid\">3 AND \"time_retired\"='+62.6 secs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Who drives for Newman-Haas Racing with a time of 1:51:47.260?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"race\" WHERE \"team\"='newman-haas racing' AND \"time_retired\"='1:51:47.260';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which driver had less than 65 laps for Sigma Autosport?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"race\" WHERE \"laps\"<65 AND \"team\"='sigma autosport';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"i_que_game_boy_advance\" (\n \"chinese_title\" text,\n \"pinyin\" text,\n \"released_date\" real,\n \"genre\" text,\n \"game_modes\" text\n);\n\nQuestion: Which game modes have Pinyin of ch\u0101oj\u00ed m\u01cel\u00ec\u014du sh\u00ecji\u00e8?" }, { "role": "assistant", "content": "SELECT \"game_modes\" FROM \"i_que_game_boy_advance\" WHERE \"pinyin\"='ch\u0101oj\u00ed m\u01cel\u00ec\u014du sh\u00ecji\u00e8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sovereign_states\" (\n \"name\" text,\n \"subdivisions\" text,\n \"area_km\" real,\n \"population_1_july_2005_est\" real,\n \"population_density_per_km\" real,\n \"capital\" text\n);\n\nQuestion: What is the sum of Population (1 July 2005 est.), when Area (km\u00b2) is less than 5,131, when Population density (per km\u00b2) is less than 180, when Subdivisions is Parishes, and when Capital is Roseau?" }, { "role": "assistant", "content": "SELECT SUM(\"population_1_july_2005_est\") FROM \"sovereign_states\" WHERE \"area_km\"<'5,131' AND \"population_density_per_km\"<180 AND \"subdivisions\"='parishes' AND \"capital\"='roseau';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sovereign_states\" (\n \"name\" text,\n \"subdivisions\" text,\n \"area_km\" real,\n \"population_1_july_2005_est\" real,\n \"population_density_per_km\" real,\n \"capital\" text\n);\n\nQuestion: What is the lowest Population (1 July 2005 est.), when Population density (per km\u00b2) is 0?" }, { "role": "assistant", "content": "SELECT MIN(\"population_1_july_2005_est\") FROM \"sovereign_states\" WHERE \"population_density_per_km\"=0;" } ]