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 \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the average week of a game with a result of l 10-7 attended by 37,500?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"week\") FROM \"schedule\" WHERE \"result\"='l 10-7' AND \"attendance\"<'37,500';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the average attendance on October 30, 1938?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"schedule\" WHERE \"date\"='october 30, 1938';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1974\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: When did Yugoslavia play a friendly game in Belgrade?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"1974\" WHERE \"city\"='belgrade' AND \"type_of_game\"='friendly';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1974\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: When was the WC 1974 Qualifying game?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"1974\" WHERE \"type_of_game\"='wc 1974 qualifying';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1974\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: What city did Yugoslavia play Norway in?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"1974\" WHERE \"opponent\"='norway';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1974\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: Who did Yugoslavia play against that led to a result of 2:3?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"1974\" WHERE \"results\"='2:3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_10_6_4\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_final\" text,\n \"score_in_final\" text\n);\n\nQuestion: What is the final score of the runner-up on 9 February 1992?"
},
{
"role": "assistant",
"content": "SELECT \"score_in_final\" FROM \"doubles_10_6_4\" WHERE \"outcome\"='runner-up' AND \"date\"='9 february 1992';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which opponent has a time of 1:50?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='1:50';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which opponent has a time of 2:35?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='2:35';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is the time when the opponent is stephanie palmer?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='stephanie palmer';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What tournament has Samantha Stosur as the opponent in the final?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_wins_5\" WHERE \"opponent_in_the_final\"='samantha stosur';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What date is the z\u00fcrich, switzerland tournament?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"singles_wins_5\" WHERE \"tournament\"='z\u00fcrich, switzerland';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What is the date of the Sydney, Australia tournament with a hard surface?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"singles_wins_5\" WHERE \"surface\"='hard' AND \"tournament\"='sydney, australia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which Result has a Date of 4 april 1993?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"international_goals\" WHERE \"date\"='4 april 1993';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which Venue has a Result of 5-1, and a Score of 3-0?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"result\"='5-1' AND \"score\"='3-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which Score has a Result of 5-1?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"result\"='5-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which Venue has a Result of 5-1, and a Score of 1-0?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"result\"='5-1' AND \"score\"='1-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which Venue has a Result of 5-0?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"result\"='5-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"score\" text,\n \"to_par\" text,\n \"winner_s_share\" real\n);\n\nQuestion: What did winner Gary Player par?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"winners\" WHERE \"winner\"='gary player';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_of_nvidia_chipsets\" (\n \"model\" text,\n \"processors_supported\" text,\n \"fsb_ht_frequency_m_hz\" text,\n \"memory\" text,\n \"pci_express\" text,\n \"sata\" real,\n \"pata\" real,\n \"sound\" text,\n \"network\" text,\n \"features\" text\n);\n\nQuestion: How many PATAs does an nForce Professional 3400 MCP have?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pata\") FROM \"comparison_of_nvidia_chipsets\" WHERE \"model\"='nforce professional 3400 mcp';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_of_nvidia_chipsets\" (\n \"model\" text,\n \"processors_supported\" text,\n \"fsb_ht_frequency_m_hz\" text,\n \"memory\" text,\n \"pci_express\" text,\n \"sata\" real,\n \"pata\" real,\n \"sound\" text,\n \"network\" text,\n \"features\" text\n);\n\nQuestion: Which PCI-Express has a DDR 266/333/400 Registered/ECC memory and Enhanced AC'97 2.3 sound?"
},
{
"role": "assistant",
"content": "SELECT \"pci_express\" FROM \"comparison_of_nvidia_chipsets\" WHERE \"memory\"='ddr 266/333/400 registered/ecc' AND \"sound\"='enhanced ac''97 2.3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_of_nvidia_chipsets\" (\n \"model\" text,\n \"processors_supported\" text,\n \"fsb_ht_frequency_m_hz\" text,\n \"memory\" text,\n \"pci_express\" text,\n \"sata\" real,\n \"pata\" real,\n \"sound\" text,\n \"network\" text,\n \"features\" text\n);\n\nQuestion: Which FSB/HT frequency (MHz) has a SATA larger than 6 and DDR 266/333/400 Registered/ECC memory?"
},
{
"role": "assistant",
"content": "SELECT \"fsb_ht_frequency_m_hz\" FROM \"comparison_of_nvidia_chipsets\" WHERE \"sata\">6 AND \"memory\"='ddr 266/333/400 registered/ecc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_of_nvidia_chipsets\" (\n \"model\" text,\n \"processors_supported\" text,\n \"fsb_ht_frequency_m_hz\" text,\n \"memory\" text,\n \"pci_express\" text,\n \"sata\" real,\n \"pata\" real,\n \"sound\" text,\n \"network\" text,\n \"features\" text\n);\n\nQuestion: Which network has model nForce Professional 3400 MCP?"
},
{
"role": "assistant",
"content": "SELECT \"network\" FROM \"comparison_of_nvidia_chipsets\" WHERE \"model\"='nforce professional 3400 mcp';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"members\" (\n \"institution\" text,\n \"location\" text,\n \"established\" real,\n \"gained_university_status\" real,\n \"vice_chancellor\" text,\n \"total_number_of_students\" real,\n \"research_funding_000\" real\n);\n\nQuestion: Which institution has more than 19,020 students in london with a research funding of more than 7,734?"
},
{
"role": "assistant",
"content": "SELECT \"institution\" FROM \"members\" WHERE \"total_number_of_students\">'19,020' AND \"location\"='london' AND \"research_funding_000\">'7,734';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"members\" (\n \"institution\" text,\n \"location\" text,\n \"established\" real,\n \"gained_university_status\" real,\n \"vice_chancellor\" text,\n \"total_number_of_students\" real,\n \"research_funding_000\" real\n);\n\nQuestion: Which institution gained university status after 1932 and has a research funding more than 7,238?"
},
{
"role": "assistant",
"content": "SELECT \"institution\" FROM \"members\" WHERE \"research_funding_000\">'7,238' AND \"gained_university_status\">1932;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fiat_scudo_engines\" (\n \"model\" text,\n \"engine\" text,\n \"displacement\" text,\n \"valvetrain\" text,\n \"fuel_system\" text,\n \"max_power_at_rpm\" text,\n \"max_torque_at_rpm\" text,\n \"years\" text\n);\n\nQuestion: What model has an engine of 1,868 cc?"
},
{
"role": "assistant",
"content": "SELECT \"model\" FROM \"fiat_scudo_engines\" WHERE \"displacement\"='1,868 cc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What College team has 8 rounds?"
},
{
"role": "assistant",
"content": "SELECT \"college_junior_club_team_league\" FROM \"draft_picks\" WHERE \"round\"=8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What nationality is Daryn Fersovich?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"player\"='daryn fersovich';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text,\n \"report\" text\n);\n\nQuestion: What day was the ground subiaco?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_17\" WHERE \"ground\"='subiaco';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text,\n \"report\" text\n);\n\nQuestion: Which home team had a score of 11.11 (77)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_17\" WHERE \"home_team_score\"='11.11 (77)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text,\n \"report\" text\n);\n\nQuestion: What's the average crowd when the away team score was 14.14 (98)?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_17\" WHERE \"away_team_score\"='14.14 (98)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text,\n \"report\" text\n);\n\nQuestion: Which away team score had a home team score of 15.8 (98)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_17\" WHERE \"home_team_score\"='15.8 (98)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text,\n \"report\" text\n);\n\nQuestion: What was the home team score for essendon?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_17\" WHERE \"home_team\"='essendon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text,\n \"report\" text\n);\n\nQuestion: What was the crowd size for the Home team of melbourne?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_17\" WHERE \"home_team\"='melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"week_10\" (\n \"couple\" text,\n \"score\" text,\n \"style\" text,\n \"music\" text,\n \"result\" text\n);\n\nQuestion: Which Score has a Couple of cristi\u00e1n & cheryl, and a Style of cha-cha-cha?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"week_10\" WHERE \"couple\"='cristi\u00e1n & cheryl' AND \"style\"='cha-cha-cha';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"week_10\" (\n \"couple\" text,\n \"score\" text,\n \"style\" text,\n \"music\" text,\n \"result\" text\n);\n\nQuestion: Which Score has a Couple comprised of jason & edyta, and a Style of freestyle?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"week_10\" WHERE \"couple\"='jason & edyta' AND \"style\"='freestyle';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"week_10\" (\n \"couple\" text,\n \"score\" text,\n \"style\" text,\n \"music\" text,\n \"result\" text\n);\n\nQuestion: Which music is jive?"
},
{
"role": "assistant",
"content": "SELECT \"music\" FROM \"week_10\" WHERE \"style\"='jive';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"week_10\" (\n \"couple\" text,\n \"score\" text,\n \"style\" text,\n \"music\" text,\n \"result\" text\n);\n\nQuestion: Which Couple has a Result of third place, and a Style of cha-cha-cha?"
},
{
"role": "assistant",
"content": "SELECT \"couple\" FROM \"week_10\" WHERE \"result\"='third place' AND \"style\"='cha-cha-cha';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"week_10\" (\n \"couple\" text,\n \"score\" text,\n \"style\" text,\n \"music\" text,\n \"result\" text\n);\n\nQuestion: Which Score has a Result of third place, and a Style of cha-cha-cha?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"week_10\" WHERE \"result\"='third place' AND \"style\"='cha-cha-cha';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"week_10\" (\n \"couple\" text,\n \"score\" text,\n \"style\" text,\n \"music\" text,\n \"result\" text\n);\n\nQuestion: Which Music has a Score of 30 (10, 10, 10), and a Style of cha-cha-cha?"
},
{
"role": "assistant",
"content": "SELECT \"music\" FROM \"week_10\" WHERE \"score\"='30 (10, 10, 10)' AND \"style\"='cha-cha-cha';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"toy_group_breeds_of_major_kennel_clubs_k\" (\n \"the_kennel_club_uk_toy_group\" text,\n \"canadian_kennel_club_toy_dogs_group\" text,\n \"american_kennel_club_toy_group\" text,\n \"australian_national_kennel_council_toy_dogs_group\" text,\n \"new_zealand_kennel_club_toy_group\" text\n);\n\nQuestion: What is the Australian National Kennel Council Toy Dogs Group with papillon as the Kennel Club breed?"
},
{
"role": "assistant",
"content": "SELECT \"australian_national_kennel_council_toy_dogs_group\" FROM \"toy_group_breeds_of_major_kennel_clubs_k\" WHERE \"the_kennel_club_uk_toy_group\"='papillon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"toy_group_breeds_of_major_kennel_clubs_k\" (\n \"the_kennel_club_uk_toy_group\" text,\n \"canadian_kennel_club_toy_dogs_group\" text,\n \"american_kennel_club_toy_group\" text,\n \"australian_national_kennel_council_toy_dogs_group\" text,\n \"new_zealand_kennel_club_toy_group\" text\n);\n\nQuestion: What is the New Zealand Kennel Club Toy Group with papillon as the Australian National Kennel Council Toy Dogs Group breed?"
},
{
"role": "assistant",
"content": "SELECT \"new_zealand_kennel_club_toy_group\" FROM \"toy_group_breeds_of_major_kennel_clubs_k\" WHERE \"australian_national_kennel_council_toy_dogs_group\"='papillon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"toy_group_breeds_of_major_kennel_clubs_k\" (\n \"the_kennel_club_uk_toy_group\" text,\n \"canadian_kennel_club_toy_dogs_group\" text,\n \"american_kennel_club_toy_group\" text,\n \"australian_national_kennel_council_toy_dogs_group\" text,\n \"new_zealand_kennel_club_toy_group\" text\n);\n\nQuestion: What is the Canadian Kennel Club Toy Dogs Group with the australian silky terrier as the Australian National Kennel Council Toy Dogs Group breed?"
},
{
"role": "assistant",
"content": "SELECT \"canadian_kennel_club_toy_dogs_group\" FROM \"toy_group_breeds_of_major_kennel_clubs_k\" WHERE \"australian_national_kennel_council_toy_dogs_group\"='australian silky terrier';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"toy_group_breeds_of_major_kennel_clubs_k\" (\n \"the_kennel_club_uk_toy_group\" text,\n \"canadian_kennel_club_toy_dogs_group\" text,\n \"american_kennel_club_toy_group\" text,\n \"australian_national_kennel_council_toy_dogs_group\" text,\n \"new_zealand_kennel_club_toy_group\" text\n);\n\nQuestion: What is the Kennel Club (UK) Toy Group with the shih-tzu as the American Kennel Club Toy Group breed?"
},
{
"role": "assistant",
"content": "SELECT \"the_kennel_club_uk_toy_group\" FROM \"toy_group_breeds_of_major_kennel_clubs_k\" WHERE \"american_kennel_club_toy_group\"='shih-tzu';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"event_schedule\" (\n \"entrants\" real,\n \"winner\" text,\n \"prize\" text,\n \"runner_up\" text,\n \"results\" text\n);\n\nQuestion: What prize amount was awarded at the event with 453 entrants?"
},
{
"role": "assistant",
"content": "SELECT \"prize\" FROM \"event_schedule\" WHERE \"entrants\"=453;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"event_schedule\" (\n \"entrants\" real,\n \"winner\" text,\n \"prize\" text,\n \"runner_up\" text,\n \"results\" text\n);\n\nQuestion: What were the overall event results when Michael Demichele was runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"results\" FROM \"event_schedule\" WHERE \"runner_up\"='michael demichele';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"event_schedule\" (\n \"entrants\" real,\n \"winner\" text,\n \"prize\" text,\n \"runner_up\" text,\n \"results\" text\n);\n\nQuestion: What were the results of the event where $817,781 was awarded to less than 1,236 entrants?"
},
{
"role": "assistant",
"content": "SELECT \"results\" FROM \"event_schedule\" WHERE \"entrants\"<'1,236' AND \"prize\"='$817,781';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"event_schedule\" (\n \"entrants\" real,\n \"winner\" text,\n \"prize\" text,\n \"runner_up\" text,\n \"results\" text\n);\n\nQuestion: What was the fewest entrants in an event won by Grant Hinkle?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"entrants\") FROM \"event_schedule\" WHERE \"winner\"='grant hinkle';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"event_schedule\" (\n \"entrants\" real,\n \"winner\" text,\n \"prize\" text,\n \"runner_up\" text,\n \"results\" text\n);\n\nQuestion: How many entrants did the events won by Frank Gary average?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"entrants\") FROM \"event_schedule\" WHERE \"winner\"='frank gary';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: What medal was won in the 1996 Atlanta games in wrestling?"
},
{
"role": "assistant",
"content": "SELECT \"medal\" FROM \"list_of_medalists\" WHERE \"games\"='1996 atlanta' AND \"sport\"='wrestling';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: Who won a medal at the 2008 Beijing Olympics?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"list_of_medalists\" WHERE \"games\"='2008 beijing';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: What event did Cristina Iovu participate in?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"list_of_medalists\" WHERE \"name\"='cristina iovu';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: At which games was a bronze medal won in the 94kg men's weightlifting event?"
},
{
"role": "assistant",
"content": "SELECT \"games\" FROM \"list_of_medalists\" WHERE \"medal\"='bronze' AND \"sport\"='weightlifting' AND \"event\"='94kg men''s weightlifting';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: Which sport has 94kg men's weightlifting as one of its events?"
},
{
"role": "assistant",
"content": "SELECT \"sport\" FROM \"list_of_medalists\" WHERE \"event\"='94kg men''s weightlifting';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the Name of the Quarterback with a Pick # less than 11?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"atlanta_falcons_draft_history\" WHERE \"pick_num\"<11 AND \"position\"='quarterback';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_roster\" (\n \"surname\" text,\n \"first\" text,\n \"d_o_b\" text,\n \"bats\" text,\n \"throws\" text,\n \"position\" text\n);\n\nQuestion: What is donovan's surname?"
},
{
"role": "assistant",
"content": "SELECT \"surname\" FROM \"player_roster\" WHERE \"first\"='donovan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_roster\" (\n \"surname\" text,\n \"first\" text,\n \"d_o_b\" text,\n \"bats\" text,\n \"throws\" text,\n \"position\" text\n);\n\nQuestion: How many throws did james get?"
},
{
"role": "assistant",
"content": "SELECT \"throws\" FROM \"player_roster\" WHERE \"first\"='james';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_roster\" (\n \"surname\" text,\n \"first\" text,\n \"d_o_b\" text,\n \"bats\" text,\n \"throws\" text,\n \"position\" text\n);\n\nQuestion: When is Biddle's DOB?"
},
{
"role": "assistant",
"content": "SELECT \"d_o_b\" FROM \"player_roster\" WHERE \"surname\"='biddle';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"attendances\" (\n \"team\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"highest\" real,\n \"lowest\" real,\n \"average\" real\n);\n\nQuestion: Average larger than 2,279, and a Team of queen of the south, and a Capacity larger than 6,412 has what lowest of the sum?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"lowest\") FROM \"attendances\" WHERE \"average\">'2,279' AND \"team\"='queen of the south' AND \"capacity\">'6,412';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"attendances\" (\n \"team\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"highest\" real,\n \"lowest\" real,\n \"average\" real\n);\n\nQuestion: Highest larger than 2,169, and a Average larger than 3,502 involves which team?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"attendances\" WHERE \"highest\">'2,169' AND \"average\">'3,502';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"attendances\" (\n \"team\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"highest\" real,\n \"lowest\" real,\n \"average\" real\n);\n\nQuestion: Highest smaller than 3,378, and a Stadium of cappielow has what average capacity?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"capacity\") FROM \"attendances\" WHERE \"highest\"<'3,378' AND \"stadium\"='cappielow';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Who is the opponent of the game with 33,628 folks in attendance?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"attendance\"='33,628';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the loss of the game with 38,062 folks in attendance?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"attendance\"='38,062';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the score of the game that 33,531 people went too?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"attendance\"='33,531';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the date of the game with 38,062 people in attendance?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"attendance\"='38,062';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is Brendan Locke's College/Junior/Club Team (League)?"
},
{
"role": "assistant",
"content": "SELECT \"college_junior_club_team_league\" FROM \"draft_picks\" WHERE \"player\"='brendan locke';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What League's Round is Sup and Position is Right Wing?"
},
{
"role": "assistant",
"content": "SELECT \"college_junior_club_team_league\" FROM \"draft_picks\" WHERE \"position\"='right wing' AND \"round\"='sup';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: In what Round is the Position Goaltender?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"draft_picks\" WHERE \"position\"='goaltender';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: In what League is Left Wing Yanick Dupre?"
},
{
"role": "assistant",
"content": "SELECT \"college_junior_club_team_league\" FROM \"draft_picks\" WHERE \"position\"='left wing' AND \"player\"='yanick dupre';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: In what League in Round 6 is the Position Right Wing?"
},
{
"role": "assistant",
"content": "SELECT \"college_junior_club_team_league\" FROM \"draft_picks\" WHERE \"position\"='right wing' AND \"round\"='6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: In what Round is John Parco a Center?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"draft_picks\" WHERE \"position\"='center' AND \"player\"='john parco';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"county_cricket\" (\n \"season\" text,\n \"team\" text,\n \"wins\" text,\n \"losses\" text,\n \"draws\" text\n);\n\nQuestion: Which team had 15 draws?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"county_cricket\" WHERE \"draws\"='15';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"county_cricket\" (\n \"season\" text,\n \"team\" text,\n \"wins\" text,\n \"losses\" text,\n \"draws\" text\n);\n\nQuestion: Which season had 16 losses for the Hampshire team?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"county_cricket\" WHERE \"losses\"='16' AND \"team\"='hampshire';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"county_cricket\" (\n \"season\" text,\n \"team\" text,\n \"wins\" text,\n \"losses\" text,\n \"draws\" text\n);\n\nQuestion: Which season had 0 wins and 5 losses for the Surrey team?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"county_cricket\" WHERE \"wins\"='0' AND \"losses\"='5' AND \"team\"='surrey';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"county_cricket\" (\n \"season\" text,\n \"team\" text,\n \"wins\" text,\n \"losses\" text,\n \"draws\" text\n);\n\nQuestion: Which season had 10 draws?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"county_cricket\" WHERE \"draws\"='10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"county_cricket\" (\n \"season\" text,\n \"team\" text,\n \"wins\" text,\n \"losses\" text,\n \"draws\" text\n);\n\nQuestion: How many draws did Durham have?"
},
{
"role": "assistant",
"content": "SELECT \"draws\" FROM \"county_cricket\" WHERE \"team\"='durham';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"county_cricket\" (\n \"season\" text,\n \"team\" text,\n \"wins\" text,\n \"losses\" text,\n \"draws\" text\n);\n\nQuestion: How many wins happened with 8 draws?"
},
{
"role": "assistant",
"content": "SELECT \"wins\" FROM \"county_cricket\" WHERE \"draws\"='8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: What was the grid of Jenson Button?"
},
{
"role": "assistant",
"content": "SELECT \"grid\" FROM \"race\" WHERE \"driver\"='jenson button';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: Who was the constructor of the car that went 56 laps and had a grid of 15?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"race\" WHERE \"laps\"='56' AND \"grid\"='15';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: Who was the contstructor of the car having a grid of 20?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"race\" WHERE \"grid\"='20';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: What was the time of the car having a constructor of Renault, which went 40 laps?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race\" WHERE \"constructor\"='renault' AND \"laps\"='40';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: Who constructed the car that had a grid of 6?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"race\" WHERE \"grid\"='6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_season\" (\n \"season\" text,\n \"races\" real,\n \"podiums\" real,\n \"pole\" real,\n \"f_lap\" real\n);\n\nQuestion: Can you tell me the sum of Podiums that has the Season of 2006, and the Races larger than 16?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"podiums\") FROM \"by_season\" WHERE \"season\"='2006' AND \"races\">16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_season\" (\n \"season\" text,\n \"races\" real,\n \"podiums\" real,\n \"pole\" real,\n \"f_lap\" real\n);\n\nQuestion: Can you tell me the sum of FLap that has the Pole larger than 0, and the Podiums of 6?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"f_lap\") FROM \"by_season\" WHERE \"pole\">0 AND \"podiums\"=6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Name the home with record of 33-18-9"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"february\" WHERE \"record\"='33-18-9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Name the score for detroit home and record of 33-18-9"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"february\" WHERE \"home\"='detroit' AND \"record\"='33-18-9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Name the score for toronto visitor and record of 29-17-8"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"february\" WHERE \"visitor\"='toronto' AND \"record\"='29-17-8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Name the home for detroit visitor and date of february 29"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"february\" WHERE \"visitor\"='detroit' AND \"date\"='february 29';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"discography\" (\n \"year\" real,\n \"album\" text,\n \"record_label\" text,\n \"info\" text,\n \"music\" text\n);\n\nQuestion: Which Music has a Record label of moviebox/ speed records / music waves?"
},
{
"role": "assistant",
"content": "SELECT \"music\" FROM \"discography\" WHERE \"record_label\"='moviebox/ speed records / music waves';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"discography\" (\n \"year\" real,\n \"album\" text,\n \"record_label\" text,\n \"info\" text,\n \"music\" text\n);\n\nQuestion: Which Year is the highest one that has a Record label of supertone melodies?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"discography\" WHERE \"record_label\"='supertone melodies';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"discography\" (\n \"year\" real,\n \"album\" text,\n \"record_label\" text,\n \"info\" text,\n \"music\" text\n);\n\nQuestion: Which Record label has an Album of tera roop?"
},
{
"role": "assistant",
"content": "SELECT \"record_label\" FROM \"discography\" WHERE \"album\"='tera roop';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"discography\" (\n \"year\" real,\n \"album\" text,\n \"record_label\" text,\n \"info\" text,\n \"music\" text\n);\n\nQuestion: Which Record label has an Album of rambo?"
},
{
"role": "assistant",
"content": "SELECT \"record_label\" FROM \"discography\" WHERE \"album\"='rambo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"discography\" (\n \"year\" real,\n \"album\" text,\n \"record_label\" text,\n \"info\" text,\n \"music\" text\n);\n\nQuestion: Which Info has an Album of romeo?"
},
{
"role": "assistant",
"content": "SELECT \"info\" FROM \"discography\" WHERE \"album\"='romeo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the average attendance when the record was 58\u201349?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"game_log\" WHERE \"record\"='58\u201349';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the attendance when the score was 8\u20137?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"attendance\") FROM \"game_log\" WHERE \"score\"='8\u20137';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the attendance for july 18?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"game_log\" WHERE \"date\"='july 18';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"major_tournaments_hosted\" (\n \"year\" real,\n \"tournament\" text,\n \"winner\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"winner_s_share\" text\n);\n\nQuestion: How many strokes to par when the score is 1 up?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"major_tournaments_hosted\" WHERE \"score\"='1 up';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"result\" text,\n \"site\" text,\n \"series\" text\n);\n\nQuestion: Name the series for game 5"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"nba_finals\" WHERE \"game\"='game 5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"result\" text,\n \"site\" text,\n \"series\" text\n);\n\nQuestion: Name the site for game of game 2"
},
{
"role": "assistant",
"content": "SELECT \"site\" FROM \"nba_finals\" WHERE \"game\"='game 2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"result\" text,\n \"site\" text,\n \"series\" text\n);\n\nQuestion: Name the site with game of game 6"
},
{
"role": "assistant",
"content": "SELECT \"site\" FROM \"nba_finals\" WHERE \"game\"='game 6';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.