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 \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"purse\" real,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" text\n);\n\nQuestion: What was the value of 1st prize when the score was 271 (-9)?" }, { "role": "assistant", "content": "SELECT \"1st_prize\" FROM \"tournament_results\" WHERE \"score\"='271 (-9)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"purse\" real,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" text\n);\n\nQuestion: What day was the score 200 (-16)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"tournament_results\" WHERE \"score\"='200 (-16)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"purse\" real,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" text\n);\n\nQuestion: Where was Outback Steakhouse Pro-AM held?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"tournament_results\" WHERE \"tournament\"='Outback Steakhouse Pro-Am';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"chhattisgarh_result\" (\n \"state\" text,\n \"date_of_polls\" text,\n \"seats_a_cs\" real,\n \"date_of_counting\" text,\n \"incumbent\" text,\n \"election_winner\" text\n);\n\nQuestion: Which dates of polls occur in the Mizoram state?" }, { "role": "assistant", "content": "SELECT \"date_of_polls\" FROM \"chhattisgarh_result\" WHERE \"state\"='Mizoram';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"chhattisgarh_result\" (\n \"state\" text,\n \"date_of_polls\" text,\n \"seats_a_cs\" real,\n \"date_of_counting\" text,\n \"incumbent\" text,\n \"election_winner\" text\n);\n\nQuestion: How many dates of polls occur in the Madhya Pradesh state?" }, { "role": "assistant", "content": "SELECT COUNT(\"date_of_polls\") FROM \"chhattisgarh_result\" WHERE \"state\"='Madhya Pradesh';" } ]
[ { "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 \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"for\" real,\n \"against\" real,\n \"difference\" real\n);\n\nQuestion: How many under the category of Against have a Difference of 11" }, { "role": "assistant", "content": "SELECT COUNT(\"against\") FROM \"campeonato_paulista\" WHERE \"difference\"=11;" } ]
[ { "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 \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"for\" real,\n \"against\" real,\n \"difference\" real\n);\n\nQuestion: if Against is 20 how much is Won?" }, { "role": "assistant", "content": "SELECT \"won\" FROM \"campeonato_paulista\" WHERE \"against\"=20;" } ]
[ { "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 \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"for\" real,\n \"against\" real,\n \"difference\" real\n);\n\nQuestion: How many Drawn does the team Portuguesa Santista have?" }, { "role": "assistant", "content": "SELECT \"drawn\" FROM \"campeonato_paulista\" WHERE \"team\"='Portuguesa Santista';" } ]
[ { "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 \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"for\" real,\n \"against\" real,\n \"difference\" real\n);\n\nQuestion: If the difference is 11 how much is for?" }, { "role": "assistant", "content": "SELECT MAX(\"for\") FROM \"campeonato_paulista\" WHERE \"difference\"=11;" } ]
[ { "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 \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"for\" real,\n \"against\" real,\n \"difference\" real\n);\n\nQuestion: How many drawn does the team Corinthians have?" }, { "role": "assistant", "content": "SELECT \"drawn\" FROM \"campeonato_paulista\" WHERE \"team\"='Corinthians';" } ]
[ { "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 \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"for\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the highest number won with a difference of 1?" }, { "role": "assistant", "content": "SELECT MAX(\"won\") FROM \"campeonato_paulista\" WHERE \"difference\"='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 \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"for\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What the highest position when there is 28 against?" }, { "role": "assistant", "content": "SELECT MAX(\"position\") FROM \"campeonato_paulista\" WHERE \"against\"=28;" } ]
[ { "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 \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"for\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the highest number won when the number of points is 31?" }, { "role": "assistant", "content": "SELECT MAX(\"won\") FROM \"campeonato_paulista\" WHERE \"points\"=31;" } ]
[ { "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 \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"for\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the smalledt position when the difference was 6?" }, { "role": "assistant", "content": "SELECT MIN(\"position\") FROM \"campeonato_paulista\" WHERE \"difference\"='6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_ratings\" (\n \"season\" real,\n \"num_of_episodes\" real,\n \"timeslot\" text,\n \"season_premiere\" text,\n \"season_final\" text,\n \"peak_audience\" real,\n \"average_audience\" real,\n \"average_nightly_rank\" text,\n \"average_weekly_rank\" text,\n \"average_yearly_ranking\" text\n);\n\nQuestion: How many were the show's average weekly ranking when it reached No. 2 in average nightly ranking?" }, { "role": "assistant", "content": "SELECT COUNT(\"average_weekly_rank\") FROM \"series_ratings\" WHERE \"average_nightly_rank\"='No. 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_ratings\" (\n \"season\" real,\n \"num_of_episodes\" real,\n \"timeslot\" text,\n \"season_premiere\" text,\n \"season_final\" text,\n \"peak_audience\" real,\n \"average_audience\" real,\n \"average_nightly_rank\" text,\n \"average_weekly_rank\" text,\n \"average_yearly_ranking\" text\n);\n\nQuestion: What is the show's time slot during season 3?" }, { "role": "assistant", "content": "SELECT \"timeslot\" FROM \"series_ratings\" WHERE \"season\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scoring_format\" (\n \"from\" real,\n \"to\" real,\n \"goal\" real,\n \"round_1\" text,\n \"round_2\" text,\n \"round_3\" text,\n \"round_4\" text,\n \"round_5\" text,\n \"round_6\" text\n);\n\nQuestion: What are all the round 3's after 1982?" }, { "role": "assistant", "content": "SELECT \"round_3\" FROM \"scoring_format\" WHERE \"from\"=1982;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scoring_format\" (\n \"from\" real,\n \"to\" real,\n \"goal\" real,\n \"round_1\" text,\n \"round_2\" text,\n \"round_3\" text,\n \"round_4\" text,\n \"round_5\" text,\n \"round_6\" text\n);\n\nQuestion: What are all the round 5's where round 6 and up is double?" }, { "role": "assistant", "content": "SELECT \"round_5\" FROM \"scoring_format\" WHERE \"round_6\"='Double';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scoring_format\" (\n \"from\" real,\n \"to\" real,\n \"goal\" real,\n \"round_1\" text,\n \"round_2\" text,\n \"round_3\" text,\n \"round_4\" text,\n \"round_5\" text,\n \"round_6\" text\n);\n\nQuestion: What is the maximum goal after 1979?" }, { "role": "assistant", "content": "SELECT MAX(\"goal\") FROM \"scoring_format\" WHERE \"from\"=1979;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"2000\" text,\n \"january\" text,\n \"february\" text,\n \"march\" text,\n \"april\" text,\n \"may\" text,\n \"june\" text,\n \"july\" text,\n \"august\" text,\n \"september\" text,\n \"october\" text,\n \"november\" text,\n \"december\" text\n);\n\nQuestion: Name all of the february" }, { "role": "assistant", "content": "SELECT \"february\" FROM \"2000s\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"2000\" text,\n \"january\" text,\n \"february\" text,\n \"march\" text,\n \"april\" text,\n \"may\" text,\n \"june\" text,\n \"july\" text,\n \"august\" text,\n \"september\" text,\n \"october\" text,\n \"november\" text,\n \"december\" text\n);\n\nQuestion: Name the junes" }, { "role": "assistant", "content": "SELECT \"june\" FROM \"2000s\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"2000\" text,\n \"january\" text,\n \"february\" text,\n \"march\" text,\n \"april\" text,\n \"may\" text,\n \"june\" text,\n \"july\" text,\n \"august\" text,\n \"september\" text,\n \"october\" text,\n \"november\" text,\n \"december\" text\n);\n\nQuestion: Name the julys" }, { "role": "assistant", "content": "SELECT \"july\" FROM \"2000s\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"2000\" text,\n \"january\" text,\n \"february\" text,\n \"march\" text,\n \"april\" text,\n \"may\" text,\n \"june\" text,\n \"july\" text,\n \"august\" text,\n \"september\" text,\n \"october\" text,\n \"november\" text,\n \"december\" text\n);\n\nQuestion: Name the number of februaries" }, { "role": "assistant", "content": "SELECT COUNT(\"february\") FROM \"2000s\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"2000\" text,\n \"january\" text,\n \"february\" text,\n \"march\" text,\n \"april\" text,\n \"may\" text,\n \"june\" text,\n \"july\" text,\n \"august\" text,\n \"september\" text,\n \"october\" text,\n \"november\" text,\n \"december\" text\n);\n\nQuestion: Name the february" }, { "role": "assistant", "content": "SELECT \"february\" FROM \"2000s\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"apea_s_campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"for\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: How many points are listed when the position is 2?" }, { "role": "assistant", "content": "SELECT MAX(\"points\") FROM \"apea_s_campeonato_paulista\" WHERE \"position\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"apea_s_campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"for\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: When there is a lost of 2 what is the mumber drawn?" }, { "role": "assistant", "content": "SELECT MAX(\"drawn\") FROM \"apea_s_campeonato_paulista\" WHERE \"lost\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"apea_s_campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"for\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: How many games are played?" }, { "role": "assistant", "content": "SELECT MIN(\"played\") FROM \"apea_s_campeonato_paulista\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"apea_s_campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"for\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: When the position is 2 what is the number lost?" }, { "role": "assistant", "content": "SELECT MIN(\"lost\") FROM \"apea_s_campeonato_paulista\" WHERE \"position\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"apea_s_campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"for\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: When the team is ypiranga-sp what is the number of won games?" }, { "role": "assistant", "content": "SELECT MIN(\"won\") FROM \"apea_s_campeonato_paulista\" WHERE \"team\"='Ypiranga-SP';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_15400878_1\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"for\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Name the lease for when points is 19" }, { "role": "assistant", "content": "SELECT MIN(\"for\") FROM \"table1_15400878_1\" WHERE \"points\"=19;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_15400878_1\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"for\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Name the difference for when drawn is larger than 2.0" }, { "role": "assistant", "content": "SELECT \"difference\" FROM \"table1_15400878_1\" WHERE \"drawn\">2.0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_15400878_1\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"for\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Name the most against for minas gerais" }, { "role": "assistant", "content": "SELECT MAX(\"against\") FROM \"table1_15400878_1\" WHERE \"team\"='Minas Gerais';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"peter_drummond_1911_1918\" (\n \"class\" text,\n \"wheels\" real,\n \"date\" text,\n \"builder\" text,\n \"no_built\" real,\n \"1919_nos\" text,\n \"lms_class\" text,\n \"lms_nos\" text\n);\n\nQuestion: What is the LMS class of trains with numbers 14510-5?" }, { "role": "assistant", "content": "SELECT \"lms_class\" FROM \"peter_drummond_1911_1918\" WHERE \"lms_nos\"='14510-5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"peter_drummond_1911_1918\" (\n \"class\" text,\n \"wheels\" real,\n \"date\" text,\n \"builder\" text,\n \"no_built\" real,\n \"1919_nos\" text,\n \"lms_class\" text,\n \"lms_nos\" text\n);\n\nQuestion: What is the date of the 279 wheels?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"peter_drummond_1911_1918\" WHERE \"wheels\"=279;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"peter_drummond_1911_1918\" (\n \"class\" text,\n \"wheels\" real,\n \"date\" text,\n \"builder\" text,\n \"no_built\" real,\n \"1919_nos\" text,\n \"lms_class\" text,\n \"lms_nos\" text\n);\n\nQuestion: What is the class when the LMS class is 3F?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"peter_drummond_1911_1918\" WHERE \"lms_class\"='3F';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"peter_drummond_1911_1918\" (\n \"class\" text,\n \"wheels\" real,\n \"date\" text,\n \"builder\" text,\n \"no_built\" real,\n \"1919_nos\" text,\n \"lms_class\" text,\n \"lms_nos\" text\n);\n\nQuestion: What is the LMS number of the trains built by G&SWR Kilmarnock?" }, { "role": "assistant", "content": "SELECT \"lms_nos\" FROM \"peter_drummond_1911_1918\" WHERE \"builder\"='G&SWR Kilmarnock';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"peter_drummond_1911_1918\" (\n \"class\" text,\n \"wheels\" real,\n \"date\" text,\n \"builder\" text,\n \"no_built\" real,\n \"1919_nos\" text,\n \"lms_class\" text,\n \"lms_nos\" text\n);\n\nQuestion: How many figures are there for wheels for LMS numbers 16377-9?" }, { "role": "assistant", "content": "SELECT COUNT(\"wheels\") FROM \"peter_drummond_1911_1918\" WHERE \"lms_nos\"='16377-9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"peter_drummond_1911_1918\" (\n \"class\" text,\n \"wheels\" real,\n \"date\" text,\n \"builder\" text,\n \"no_built\" real,\n \"1919_nos\" text,\n \"lms_class\" text,\n \"lms_nos\" text\n);\n\nQuestion: What is the builder of the train with LMS Class 3f?" }, { "role": "assistant", "content": "SELECT \"builder\" FROM \"peter_drummond_1911_1918\" WHERE \"lms_class\"='3F';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table_1_historical_storms_and_the_chi_19\" (\n \"name\" text,\n \"year\" real,\n \"landfall\" text,\n \"nhc_advisory_number\" text,\n \"v_mph\" real,\n \"r_miles\" real,\n \"saffir_simpson_category\" real,\n \"chi\" text\n);\n\nQuestion: What is the maximum number for the Saffir-Simpson category in the Carvill Hurricane Index?" }, { "role": "assistant", "content": "SELECT MAX(\"saffir_simpson_category\") FROM \"table_1_historical_storms_and_the_chi_19\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table_1_historical_storms_and_the_chi_19\" (\n \"name\" text,\n \"year\" real,\n \"landfall\" text,\n \"nhc_advisory_number\" text,\n \"v_mph\" real,\n \"r_miles\" real,\n \"saffir_simpson_category\" real,\n \"chi\" text\n);\n\nQuestion: What is the maximum miles per hour recorded when the CHI (Carvill Hurricane Index) is equal to 13.5" }, { "role": "assistant", "content": "SELECT MAX(\"v_mph\") FROM \"table_1_historical_storms_and_the_chi_19\" WHERE \"chi\"='13.5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table_1_historical_storms_and_the_chi_19\" (\n \"name\" text,\n \"year\" real,\n \"landfall\" text,\n \"nhc_advisory_number\" text,\n \"v_mph\" real,\n \"r_miles\" real,\n \"saffir_simpson_category\" real,\n \"chi\" text\n);\n\nQuestion: What is the CHI (Carvill Hurricane Index) when the NHC advisory number is equal to 49b?" }, { "role": "assistant", "content": "SELECT \"chi\" FROM \"table_1_historical_storms_and_the_chi_19\" WHERE \"nhc_advisory_number\"='49B';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table_1_historical_storms_and_the_chi_19\" (\n \"name\" text,\n \"year\" real,\n \"landfall\" text,\n \"nhc_advisory_number\" text,\n \"v_mph\" real,\n \"r_miles\" real,\n \"saffir_simpson_category\" real,\n \"chi\" text\n);\n\nQuestion: What is the maximum number of miles reached in a Texas landfall when the Saffir-Simpson category is smaller than 3.0?" }, { "role": "assistant", "content": "SELECT MAX(\"r_miles\") FROM \"table_1_historical_storms_and_the_chi_19\" WHERE \"landfall\"='Texas' AND \"saffir_simpson_category\"<3.0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table_1_historical_storms_and_the_chi_19\" (\n \"name\" text,\n \"year\" real,\n \"landfall\" text,\n \"nhc_advisory_number\" text,\n \"v_mph\" real,\n \"r_miles\" real,\n \"saffir_simpson_category\" real,\n \"chi\" text\n);\n\nQuestion: What are the miles when the Carvill Hurricane Index (CHI) is equal to 9.9?" }, { "role": "assistant", "content": "SELECT \"r_miles\" FROM \"table_1_historical_storms_and_the_chi_19\" WHERE \"chi\"='9.9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table_1_historical_storms_and_the_chi_19\" (\n \"name\" text,\n \"year\" real,\n \"landfall\" text,\n \"nhc_advisory_number\" text,\n \"v_mph\" real,\n \"r_miles\" real,\n \"saffir_simpson_category\" real,\n \"chi\" text\n);\n\nQuestion: What is the Saffir-Simpson category for the hurricane named Bonnie?" }, { "role": "assistant", "content": "SELECT \"saffir_simpson_category\" FROM \"table_1_historical_storms_and_the_chi_19\" WHERE \"name\"='Bonnie';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_15417439_1\" (\n \"genus_species\" text,\n \"common_name\" text,\n \"accession_number\" text,\n \"length\" text,\n \"similarity\" text,\n \"identity\" text\n);\n\nQuestion: What kind of animal corresponds to the accession number xp_852505.1?" }, { "role": "assistant", "content": "SELECT \"common_name\" FROM \"table1_15417439_1\" WHERE \"accession_number\"='XP_852505.1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_15417439_1\" (\n \"genus_species\" text,\n \"common_name\" text,\n \"accession_number\" text,\n \"length\" text,\n \"similarity\" text,\n \"identity\" text\n);\n\nQuestion: How similar is the genus/species sus scrofa? " }, { "role": "assistant", "content": "SELECT \"similarity\" FROM \"table1_15417439_1\" WHERE \"genus_species\"='Sus scrofa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_15417439_1\" (\n \"genus_species\" text,\n \"common_name\" text,\n \"accession_number\" text,\n \"length\" text,\n \"similarity\" text,\n \"identity\" text\n);\n\nQuestion: What identities do the genus/species arabidopsis thaliana have? " }, { "role": "assistant", "content": "SELECT \"identity\" FROM \"table1_15417439_1\" WHERE \"genus_species\"='Arabidopsis thaliana';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_15417439_1\" (\n \"genus_species\" text,\n \"common_name\" text,\n \"accession_number\" text,\n \"length\" text,\n \"similarity\" text,\n \"identity\" text\n);\n\nQuestion: What's the animals name when the genus/species is rattus norvegicus? " }, { "role": "assistant", "content": "SELECT \"common_name\" FROM \"table1_15417439_1\" WHERE \"genus_species\"='Rattus norvegicus';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_15417439_1\" (\n \"genus_species\" text,\n \"common_name\" text,\n \"accession_number\" text,\n \"length\" text,\n \"similarity\" text,\n \"identity\" text\n);\n\nQuestion: For the genus/species arabidopsis thaliana, what are the lengths? " }, { "role": "assistant", "content": "SELECT \"length\" FROM \"table1_15417439_1\" WHERE \"genus_species\"='Arabidopsis thaliana';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_15430813_1\" (\n \"no_in_season\" real,\n \"no_disc\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: How many original air dates were there for episode 17?" }, { "role": "assistant", "content": "SELECT COUNT(\"original_air_date\") FROM \"table1_15430813_1\" WHERE \"no_in_season\"=17;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_15430813_1\" (\n \"no_in_season\" real,\n \"no_disc\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: When did the episode titled \"Prisoners\" first air?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_15430813_1\" WHERE \"title\"='\\\"Prisoners\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table_of_largest_rogue_trader_losses\" (\n \"name\" text,\n \"country\" text,\n \"date_s\" real,\n \"loss\" text,\n \"institution\" text,\n \"market_activity\" text,\n \"sentence\" text\n);\n\nQuestion: Which company was based in London, United Kingdom?" }, { "role": "assistant", "content": "SELECT \"institution\" FROM \"table_of_largest_rogue_trader_losses\" WHERE \"country\"='London, United Kingdom';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_15431959_1\" (\n \"no_in_season\" real,\n \"no_disc\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: What was the original air date of Stargate SG-1 written by Peter Deluise?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_15431959_1\" WHERE \"written_by\"='Peter DeLuise';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_15431959_1\" (\n \"no_in_season\" real,\n \"no_disc\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: How many seasons did Peter Deluise direct Stargate SG-1?" }, { "role": "assistant", "content": "SELECT MAX(\"no_in_season\") FROM \"table1_15431959_1\" WHERE \"directed_by\"='Peter DeLuise';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_15431959_1\" (\n \"no_in_season\" real,\n \"no_disc\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: Which number episode of season 6 was the title \"Sight Unseen\"?" }, { "role": "assistant", "content": "SELECT MIN(\"no_in_season\") FROM \"table1_15431959_1\" WHERE \"title\"='\\\"Sight Unseen\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"first_district\" text,\n \"second_district\" text,\n \"third_district\" text,\n \"fourth_district\" text,\n \"fifth_district\" text\n);\n\nQuestion: Name the fifth district for william womer" }, { "role": "assistant", "content": "SELECT \"fifth_district\" FROM \"current_members\" WHERE \"third_district\"='William Womer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"first_district\" text,\n \"second_district\" text,\n \"third_district\" text,\n \"fourth_district\" text,\n \"fifth_district\" text\n);\n\nQuestion: Name the third district for christine young" }, { "role": "assistant", "content": "SELECT \"third_district\" FROM \"current_members\" WHERE \"fifth_district\"='Christine Young';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"first_district\" text,\n \"second_district\" text,\n \"third_district\" text,\n \"fourth_district\" text,\n \"fifth_district\" text\n);\n\nQuestion: Name the fourth district for joan runnels" }, { "role": "assistant", "content": "SELECT \"fourth_district\" FROM \"current_members\" WHERE \"second_district\"='Joan Runnels';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"first_district\" text,\n \"second_district\" text,\n \"third_district\" text,\n \"fourth_district\" text,\n \"fifth_district\" text\n);\n\nQuestion: Name the fourth district for beverly bodem" }, { "role": "assistant", "content": "SELECT \"fourth_district\" FROM \"current_members\" WHERE \"first_district\"='Beverly Bodem';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"first_district\" text,\n \"second_district\" text,\n \"third_district\" text,\n \"fourth_district\" text,\n \"fifth_district\" text\n);\n\nQuestion: Name the number for fifth district for richard houskamp" }, { "role": "assistant", "content": "SELECT COUNT(\"fifth_district\") FROM \"current_members\" WHERE \"third_district\"='Richard Houskamp';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"first_district\" text,\n \"second_district\" text,\n \"third_district\" text,\n \"fourth_district\" text,\n \"fifth_district\" text\n);\n\nQuestion: Name the fifth district for steve rudoni" }, { "role": "assistant", "content": "SELECT \"fifth_district\" FROM \"current_members\" WHERE \"fourth_district\"='Steve Rudoni';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"locale\" text,\n \"skip\" text,\n \"w\" real,\n \"l\" real,\n \"pf\" real,\n \"pa\" real,\n \"ends_won\" real,\n \"ends_lost\" real,\n \"blank_ends\" real,\n \"stolen_ends\" real,\n \"shot_pct\" text\n);\n\nQuestion: What was the top ends lost where the ends won 47?" }, { "role": "assistant", "content": "SELECT MAX(\"ends_lost\") FROM \"standings\" WHERE \"ends_won\"=47;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"locale\" text,\n \"skip\" text,\n \"w\" real,\n \"l\" real,\n \"pf\" real,\n \"pa\" real,\n \"ends_won\" real,\n \"ends_lost\" real,\n \"blank_ends\" real,\n \"stolen_ends\" real,\n \"shot_pct\" text\n);\n\nQuestion: What was the location when the stolen ends is 12 and shot pct is 77%?" }, { "role": "assistant", "content": "SELECT \"locale\" FROM \"standings\" WHERE \"stolen_ends\"=12 AND \"shot_pct\"='77%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"locale\" text,\n \"skip\" text,\n \"w\" real,\n \"l\" real,\n \"pf\" real,\n \"pa\" real,\n \"ends_won\" real,\n \"ends_lost\" real,\n \"blank_ends\" real,\n \"stolen_ends\" real,\n \"shot_pct\" text\n);\n\nQuestion: How many stolen ends were there when the locale was Sweden?" }, { "role": "assistant", "content": "SELECT \"stolen_ends\" FROM \"standings\" WHERE \"locale\"='Sweden';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s\" (\n \"name\" text,\n \"position\" text,\n \"number\" real,\n \"school_club_team\" text,\n \"season\" text,\n \"acquisition_via\" text\n);\n\nQuestion: What was the school/club team whose season was in 2012 and were acquired via trade? " }, { "role": "assistant", "content": "SELECT \"school_club_team\" FROM \"s\" WHERE \"season\"='2012' AND \"acquisition_via\"='Trade';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s\" (\n \"name\" text,\n \"position\" text,\n \"number\" real,\n \"school_club_team\" text,\n \"season\" text,\n \"acquisition_via\" text\n);\n\nQuestion: Which school/club team has a player named Mark Sanford? " }, { "role": "assistant", "content": "SELECT \"school_club_team\" FROM \"s\" WHERE \"name\"='Mark Sanford';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s\" (\n \"name\" text,\n \"position\" text,\n \"number\" real,\n \"school_club_team\" text,\n \"season\" text,\n \"acquisition_via\" text\n);\n\nQuestion: How many school/club teams have a player named Manuel Luis Quezon? " }, { "role": "assistant", "content": "SELECT COUNT(\"number\") FROM \"s\" WHERE \"school_club_team\"='Manuel Luis Quezon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s\" (\n \"name\" text,\n \"position\" text,\n \"number\" real,\n \"school_club_team\" text,\n \"season\" text,\n \"acquisition_via\" text\n);\n\nQuestion: How many players are listed for the school/club team Washington? " }, { "role": "assistant", "content": "SELECT COUNT(\"name\") FROM \"s\" WHERE \"school_club_team\"='Washington';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s\" (\n \"name\" text,\n \"position\" text,\n \"number\" real,\n \"school_club_team\" text,\n \"season\" text,\n \"acquisition_via\" text\n);\n\nQuestion: How many players with a position are listed for the 2009 season? " }, { "role": "assistant", "content": "SELECT COUNT(\"position\") FROM \"s\" WHERE \"season\"='2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"a\" (\n \"name\" text,\n \"position\" text,\n \"number\" real,\n \"school_club_team\" text,\n \"season\" real,\n \"acquisition_via\" text\n);\n\nQuestion: Name the school/club for guard" }, { "role": "assistant", "content": "SELECT \"school_club_team\" FROM \"a\" WHERE \"position\"='Guard';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"a\" (\n \"name\" text,\n \"position\" text,\n \"number\" real,\n \"school_club_team\" text,\n \"season\" real,\n \"acquisition_via\" text\n);\n\nQuestion: Name the position for judy-ann ramirez" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"a\" WHERE \"name\"='judy-ann ramirez';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What is the losing bonus for the team with a point difference of -99?" }, { "role": "assistant", "content": "SELECT \"losing_bonus\" FROM \"league_table\" WHERE \"points_difference\"='-99';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: How many games played for teams with 277 points?" }, { "role": "assistant", "content": "SELECT \"played\" FROM \"league_table\" WHERE \"points_for\"='277';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: How many games won for teams with 49 tries against?" }, { "role": "assistant", "content": "SELECT \"won\" FROM \"league_table\" WHERE \"tries_against\"='49';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: How many teams have 62 tries against?" }, { "role": "assistant", "content": "SELECT COUNT(\"points_difference\") FROM \"league_table\" WHERE \"tries_against\"='62';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: How many tries for, for club cambrian welfare rfc?" }, { "role": "assistant", "content": "SELECT \"tries_for\" FROM \"league_table\" WHERE \"club\"='Cambrian Welfare RFC';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: How many teams have 21 tries for?" }, { "role": "assistant", "content": "SELECT COUNT(\"points_difference\") FROM \"league_table\" WHERE \"tries_for\"='21';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"no\" real,\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text\n);\n\nQuestion: How many chassis used number 34?" }, { "role": "assistant", "content": "SELECT COUNT(\"chassis\") FROM \"entries\" WHERE \"no\"=34;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"no\" real,\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text\n);\n\nQuestion: Who was the constructor of car 22?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"entries\" WHERE \"no\"=22;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"no\" real,\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text\n);\n\nQuestion: How many cars used number 48?" }, { "role": "assistant", "content": "SELECT COUNT(\"engine\") FROM \"entries\" WHERE \"no\"=48;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"no\" real,\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text\n);\n\nQuestion: Who drove car 44?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"entries\" WHERE \"no\"=44;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_doubles_finals_15_7_8\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Name the total number of years where runner-up and championship is us open" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"mixed_doubles_finals_15_7_8\" WHERE \"outcome\"='Runner-up' AND \"championship\"='US Open';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_doubles_finals_15_7_8\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Name the surfaace where outcome is runner-up and championship is us open" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"mixed_doubles_finals_15_7_8\" WHERE \"outcome\"='Runner-up' AND \"championship\"='US Open';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_doubles_finals_15_7_8\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Name the partner for mark woodforde martina navratilova" }, { "role": "assistant", "content": "SELECT \"partner\" FROM \"mixed_doubles_finals_15_7_8\" WHERE \"opponents\"='Mark Woodforde Martina Navratilova';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_doubles_finals_15_7_8\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Name the score for rick leach zina garrison" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"mixed_doubles_finals_15_7_8\" WHERE \"opponents\"='Rick Leach Zina Garrison';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_scores\" (\n \"state\" text,\n \"preliminary_average\" text,\n \"interview\" text,\n \"swimsuit\" text,\n \"evening_gown\" text,\n \"semifinal_average\" text\n);\n\nQuestion: Name the swimsuit for arizona" }, { "role": "assistant", "content": "SELECT \"swimsuit\" FROM \"semifinal_scores\" WHERE \"state\"='Arizona';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_f3_challenge\" (\n \"pos\" real,\n \"driver\" text,\n \"qualifying\" real,\n \"race_1\" text,\n \"race_2\" text,\n \"race_3\" text,\n \"points\" real\n);\n\nQuestion: Name the driver for race 2 7" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"indy_f3_challenge\" WHERE \"race_2\"='7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_f3_challenge\" (\n \"pos\" real,\n \"driver\" text,\n \"qualifying\" real,\n \"race_1\" text,\n \"race_2\" text,\n \"race_3\" text,\n \"points\" real\n);\n\nQuestion: Name the total number of qualifiying for race 3 being 3" }, { "role": "assistant", "content": "SELECT COUNT(\"qualifying\") FROM \"indy_f3_challenge\" WHERE \"race_3\"='3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_f3_challenge\" (\n \"pos\" real,\n \"driver\" text,\n \"qualifying\" real,\n \"race_1\" text,\n \"race_2\" text,\n \"race_3\" text,\n \"points\" real\n);\n\nQuestion: Name the driver for race 2 2 " }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"indy_f3_challenge\" WHERE \"race_2\"='2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_f3_challenge\" (\n \"pos\" real,\n \"driver\" text,\n \"qualifying\" real,\n \"race_1\" text,\n \"race_2\" text,\n \"race_3\" text,\n \"points\" real\n);\n\nQuestion: Name the race 1 when race 3 is 8" }, { "role": "assistant", "content": "SELECT \"race_1\" FROM \"indy_f3_challenge\" WHERE \"race_3\"='8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_f3_challenge\" (\n \"pos\" real,\n \"driver\" text,\n \"qualifying\" real,\n \"race_1\" text,\n \"race_2\" text,\n \"race_3\" text,\n \"points\" real\n);\n\nQuestion: Name the race 2 for james winslow" }, { "role": "assistant", "content": "SELECT \"race_2\" FROM \"indy_f3_challenge\" WHERE \"driver\"='James Winslow';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_f3_challenge\" (\n \"pos\" real,\n \"driver\" text,\n \"qualifying\" real,\n \"race_1\" text,\n \"race_2\" text,\n \"race_3\" text,\n \"points\" real\n);\n\nQuestion: Name the total number of positions for race 1 being 2" }, { "role": "assistant", "content": "SELECT COUNT(\"pos\") FROM \"indy_f3_challenge\" WHERE \"race_1\"='2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"full_series_results\" (\n \"rd\" real,\n \"race\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"report\" text\n);\n\nQuestion: Did the race get reported where the winning team was Newman Wachs racing and the pole belonged to Carl Skerlong" }, { "role": "assistant", "content": "SELECT \"report\" FROM \"full_series_results\" WHERE \"pole_position\"='Carl Skerlong' AND \"winning_team\"='Newman Wachs Racing';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"full_series_results\" (\n \"rd\" real,\n \"race\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"report\" text\n);\n\nQuestion: Did the round 8 race get reported" }, { "role": "assistant", "content": "SELECT \"report\" FROM \"full_series_results\" WHERE \"rd\"=8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"full_series_results\" (\n \"rd\" real,\n \"race\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"report\" text\n);\n\nQuestion: Which race was the winning team mathiasen motorsports and the pole belonged to jonathan bomarito" }, { "role": "assistant", "content": "SELECT \"race\" FROM \"full_series_results\" WHERE \"winning_team\"='Mathiasen Motorsports' AND \"pole_position\"='Jonathan Bomarito';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"full_series_results\" (\n \"rd\" real,\n \"race\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"report\" text\n);\n\nQuestion: how many winners were in round 8" }, { "role": "assistant", "content": "SELECT COUNT(\"winning_driver\") FROM \"full_series_results\" WHERE \"rd\"=8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"afternoon\" (\n \"time\" text,\n \"12_00_pm\" text,\n \"01_00_pm\" text,\n \"02_00_pm\" text,\n \"03_00_pm\" text,\n \"04_00_pm\" text,\n \"05_00_pm\" text,\n \"05_55_pm\" text\n);\n\nQuestion: How many episodes air on Wednesday at 12:00pm?" }, { "role": "assistant", "content": "SELECT COUNT(\"12_00_pm\") FROM \"afternoon\" WHERE \"time\"='Wednesday';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"afternoon\" (\n \"time\" text,\n \"12_00_pm\" text,\n \"01_00_pm\" text,\n \"02_00_pm\" text,\n \"03_00_pm\" text,\n \"04_00_pm\" text,\n \"05_00_pm\" text,\n \"05_55_pm\" text\n);\n\nQuestion: What are the names of the episodes that airs at 2:00pm?" }, { "role": "assistant", "content": "SELECT \"02_00_pm\" FROM \"afternoon\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"afternoon\" (\n \"time\" text,\n \"12_00_pm\" text,\n \"01_00_pm\" text,\n \"02_00_pm\" text,\n \"03_00_pm\" text,\n \"04_00_pm\" text,\n \"05_00_pm\" text,\n \"05_55_pm\" text\n);\n\nQuestion: What is the name of the show that airs Friday at 5:55pm?" }, { "role": "assistant", "content": "SELECT \"05_55_pm\" FROM \"afternoon\" WHERE \"time\"='Friday';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"night\" (\n \"time\" text,\n \"06_00_pm\" text,\n \"07_00_pm\" text,\n \"08_00_pm\" text,\n \"09_00_pm\" text,\n \"10_00_pm\" text,\n \"10_30_pm\" text,\n \"11_00_pm\" text\n);\n\nQuestion: Name the 10 pm for thursday" }, { "role": "assistant", "content": "SELECT \"10_00_pm\" FROM \"night\" WHERE \"time\"='Thursday';" } ]