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 \"jersey_progress\" (\n \"stage_winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"combination_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: What is the general classification for a mountains value of Christophe Moreau and a Team winner of Team CSC?" }, { "role": "assistant", "content": "SELECT \"general_classification\" FROM \"jersey_progress\" WHERE \"mountains_classification\"='christophe moreau' AND \"team_classification\"='team csc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"am\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"name\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What is the frequency of KQLX?" }, { "role": "assistant", "content": "SELECT \"frequency\" FROM \"am\" WHERE \"call_sign\"='kqlx';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"am\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"name\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What is the call sign of 1200 am?" }, { "role": "assistant", "content": "SELECT \"call_sign\" FROM \"am\" WHERE \"frequency\"='1200 am';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"am\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"name\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What is the frequency of the talk station?" }, { "role": "assistant", "content": "SELECT \"frequency\" FROM \"am\" WHERE \"format\"='talk';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"am\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"name\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What is the frequency of KFNW?" }, { "role": "assistant", "content": "SELECT \"frequency\" FROM \"am\" WHERE \"call_sign\"='kfnw';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"non_championship_race_results\" (\n \"race_name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What is the constructor for the VII Race of Champions?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"non_championship_race_results\" WHERE \"race_name\"='vii race of champions';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"non_championship_race_results\" (\n \"race_name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What is the name of the race won by driver Carlos Reutemann?" }, { "role": "assistant", "content": "SELECT \"race_name\" FROM \"non_championship_race_results\" WHERE \"winning_driver\"='carlos reutemann';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"g\" (\n \"player\" text,\n \"pos\" text,\n \"from\" real,\n \"school_country\" text,\n \"rebs\" real,\n \"asts\" real\n);\n\nQuestion: What is the average rebounds for the player who started in 1986 and who plays SG?" }, { "role": "assistant", "content": "SELECT AVG(\"rebs\") FROM \"g\" WHERE \"from\"=1986 AND \"pos\"='sg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"g\" (\n \"player\" text,\n \"pos\" text,\n \"from\" real,\n \"school_country\" text,\n \"rebs\" real,\n \"asts\" real\n);\n\nQuestion: What is the school for player who began in 1986, has fewer rebounds than 711 and plays F?" }, { "role": "assistant", "content": "SELECT \"school_country\" FROM \"g\" WHERE \"from\"<1986 AND \"rebs\"<711 AND \"pos\"='f';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"g\" (\n \"player\" text,\n \"pos\" text,\n \"from\" real,\n \"school_country\" text,\n \"rebs\" real,\n \"asts\" real\n);\n\nQuestion: What is the highest of a player with asts fewer than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"from\") FROM \"g\" WHERE \"asts\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: what is the date when the home is st. louis?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"march\" WHERE \"home\"='st. louis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Where is the home on march 12?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"march\" WHERE \"date\"='march 12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: what is the decision on the date march 18?" }, { "role": "assistant", "content": "SELECT \"decision\" FROM \"march\" WHERE \"date\"='march 18';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"high_school_statistics\" (\n \"year\" text,\n \"tckl\" real,\n \"sack\" real,\n \"p_ko_ret\" real,\n \"yards\" real\n);\n\nQuestion: What is the total of TCKL in 2000 with a P/KO RET less than 14?" }, { "role": "assistant", "content": "SELECT COUNT(\"tckl\") FROM \"high_school_statistics\" WHERE \"year\"='2000' AND \"p_ko_ret\"<14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"high_school_statistics\" (\n \"year\" text,\n \"tckl\" real,\n \"sack\" real,\n \"p_ko_ret\" real,\n \"yards\" real\n);\n\nQuestion: What is the highest YARDS with a TCKL more than 51 and less than 2 SACK?" }, { "role": "assistant", "content": "SELECT MAX(\"yards\") FROM \"high_school_statistics\" WHERE \"tckl\">51 AND \"sack\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"high_school_statistics\" (\n \"year\" text,\n \"tckl\" real,\n \"sack\" real,\n \"p_ko_ret\" real,\n \"yards\" real\n);\n\nQuestion: What is the total of all YARDS with 0 SACK and less than 14 P/KO RET?" }, { "role": "assistant", "content": "SELECT COUNT(\"yards\") FROM \"high_school_statistics\" WHERE \"sack\"=0 AND \"p_ko_ret\"<14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women_s_tournament\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"spike\" text,\n \"2008_club\" text\n);\n\nQuestion: Tell me the name for 2008 club of vol\u00e9ro z\u00fcrich" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"women_s_tournament\" WHERE \"2008_club\"='vol\u00e9ro z\u00fcrich';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft\" (\n \"round\" text,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"team\" text,\n \"college\" text\n);\n\nQuestion: What is the pick for West Virginia college?" }, { "role": "assistant", "content": "SELECT \"pick\" FROM \"draft\" WHERE \"college\"='west virginia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft\" (\n \"round\" text,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"team\" text,\n \"college\" text\n);\n\nQuestion: What round has a position of F/C from Iowa College?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"draft\" WHERE \"position\"='f/c' AND \"college\"='iowa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft\" (\n \"round\" text,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"team\" text,\n \"college\" text\n);\n\nQuestion: What nationality has a pick of 1?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"draft\" WHERE \"pick\"='1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft\" (\n \"round\" text,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"team\" text,\n \"college\" text\n);\n\nQuestion: Which nationality has a round of 1, and F position from Louisville?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"draft\" WHERE \"round\"='1' AND \"position\"='f' AND \"college\"='louisville';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_20\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which team plays at the Arden Street Oval?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_20\" WHERE \"venue\"='arden street oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_20\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Where does Carlton play?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_20\" WHERE \"home_team\"='carlton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: What was the date of the game in which the home team was the Grizzlies and the visiting team was the Timberwolves?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"april\" WHERE \"home\"='grizzlies' AND \"visitor\"='timberwolves';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_line_series\" (\n \"airing_date\" text,\n \"english_title_chinese_title\" text,\n \"number_of_episodes\" real,\n \"genre\" text,\n \"official_website\" text\n);\n\nQuestion: What is the airing date for costume comedy that has 20 episodes?" }, { "role": "assistant", "content": "SELECT \"airing_date\" FROM \"third_line_series\" WHERE \"number_of_episodes\"=20 AND \"genre\"='costume comedy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"youngest_winners\" (\n \"rank\" real,\n \"name\" text,\n \"film\" text,\n \"year\" text,\n \"date_of_birth\" text,\n \"date_of_award\" text\n);\n\nQuestion: What year was 7th heaven made?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"youngest_winners\" WHERE \"film\"='7th heaven';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"youngest_winners\" (\n \"rank\" real,\n \"name\" text,\n \"film\" text,\n \"year\" text,\n \"date_of_birth\" text,\n \"date_of_award\" text\n);\n\nQuestion: What film was made in 1999?" }, { "role": "assistant", "content": "SELECT \"film\" FROM \"youngest_winners\" WHERE \"year\"='1999';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"rank\" real,\n \"name\" text,\n \"city\" text,\n \"height_m\" real,\n \"height_ft\" real,\n \"floors\" real\n);\n\nQuestion: what is the city with the height (ft) more than 328.1, rank higher than 56, a height (m) of 103 and floors less than 28?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"tallest_buildings\" WHERE \"height_ft\">328.1 AND \"rank\">56 AND \"height_m\"=103 AND \"floors\"<28;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"rank\" real,\n \"name\" text,\n \"city\" text,\n \"height_m\" real,\n \"height_ft\" real,\n \"floors\" real\n);\n\nQuestion: what is the total of floors when the name is k\u00f6lntriangle and rank is less thank 63?" }, { "role": "assistant", "content": "SELECT SUM(\"floors\") FROM \"tallest_buildings\" WHERE \"name\"='k\u00f6lntriangle' AND \"rank\"<63;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"rank\" real,\n \"name\" text,\n \"city\" text,\n \"height_m\" real,\n \"height_ft\" real,\n \"floors\" real\n);\n\nQuestion: what is the lowest height (ft) for messeturm and more than 55 floors?" }, { "role": "assistant", "content": "SELECT MIN(\"height_ft\") FROM \"tallest_buildings\" WHERE \"name\"='messeturm' AND \"floors\">55;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"rank\" real,\n \"name\" text,\n \"city\" text,\n \"height_m\" real,\n \"height_ft\" real,\n \"floors\" real\n);\n\nQuestion: what is the rank for the city of cologne, floors is 34 and height (ft) is more than 452.8?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"tallest_buildings\" WHERE \"city\"='cologne' AND \"floors\"=34 AND \"height_ft\">452.8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_stage\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real,\n \"group_position\" text\n);\n\nQuestion: Which opponents have an Attendance larger than 61,000, and a Result F\u2013A of 3\u20132?" }, { "role": "assistant", "content": "SELECT \"opponents\" FROM \"group_stage\" WHERE \"attendance\">'61,000' AND \"result_f_a\"='3\u20132';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_stage\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real,\n \"group_position\" text\n);\n\nQuestion: Which Group position has Result F\u2013A of 0\u20131 on 1 november 2006?" }, { "role": "assistant", "content": "SELECT \"group_position\" FROM \"group_stage\" WHERE \"result_f_a\"='0\u20131' AND \"date\"='1 november 2006';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"batsmen\" (\n \"name\" text,\n \"club\" text,\n \"birth_date\" text,\n \"batting_style\" text,\n \"bowling_style\" text\n);\n\nQuestion: What club is R. H. C. Human who has a right arm medium pace bowling style a member of?" }, { "role": "assistant", "content": "SELECT \"club\" FROM \"batsmen\" WHERE \"bowling_style\"='right arm medium pace' AND \"name\"='r. h. c. human';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"batsmen\" (\n \"name\" text,\n \"club\" text,\n \"birth_date\" text,\n \"batting_style\" text,\n \"bowling_style\" text\n);\n\nQuestion: What is the birth date of A. J. Holmes who has a right-handed batting style?" }, { "role": "assistant", "content": "SELECT \"birth_date\" FROM \"batsmen\" WHERE \"batting_style\"='right-handed' AND \"name\"='a. j. holmes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"batsmen\" (\n \"name\" text,\n \"club\" text,\n \"birth_date\" text,\n \"batting_style\" text,\n \"bowling_style\" text\n);\n\nQuestion: What is the batting style of the person who has a right arm medium pace bowling style and a birth date of 10 February 1910 (aged 29)?" }, { "role": "assistant", "content": "SELECT \"batting_style\" FROM \"batsmen\" WHERE \"bowling_style\"='right arm medium pace' AND \"birth_date\"='10 february 1910 (aged 29)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men_s_tournament\" (\n \"name_v_t_e\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"club\" text\n);\n\nQuestion: What is the weight for the v t e of \u017eivko goci\u0107 category:articles with hcards?" }, { "role": "assistant", "content": "SELECT \"weight\" FROM \"men_s_tournament\" WHERE \"name_v_t_e\"='\u017eivko goci\u0107 category:articles with hcards';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men_s_tournament\" (\n \"name_v_t_e\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"club\" text\n);\n\nQuestion: What is the weight of the v t e of du\u0161ko pijetlovi\u0107 category:articles with hcards?" }, { "role": "assistant", "content": "SELECT \"weight\" FROM \"men_s_tournament\" WHERE \"name_v_t_e\"='du\u0161ko pijetlovi\u0107 category:articles with hcards';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"single_game\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"opposition\" text\n);\n\nQuestion: What was the total for David O'Callaghan, and a Tally of 1-9?" }, { "role": "assistant", "content": "SELECT SUM(\"total\") FROM \"single_game\" WHERE \"player\"='david o''callaghan' AND \"tally\"='1-9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"single_game\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"opposition\" text\n);\n\nQuestion: What is the opposition when the tally was 0-11?" }, { "role": "assistant", "content": "SELECT \"opposition\" FROM \"single_game\" WHERE \"tally\"='0-11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"single_game\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"opposition\" text\n);\n\nQuestion: What is the tally in Kilkenny county with 10 as the total and opposition of Waterford?" }, { "role": "assistant", "content": "SELECT \"tally\" FROM \"single_game\" WHERE \"county\"='kilkenny' AND \"total\"=10 AND \"opposition\"='waterford';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"charts\" (\n \"year\" real,\n \"single\" text,\n \"chart\" text,\n \"position\" real,\n \"weeks_on_chart\" real\n);\n\nQuestion: What is the average weeks of a song with a larger than 3 position after 1977?" }, { "role": "assistant", "content": "SELECT AVG(\"weeks_on_chart\") FROM \"charts\" WHERE \"position\">3 AND \"year\">1977;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"charts\" (\n \"year\" real,\n \"single\" text,\n \"chart\" text,\n \"position\" real,\n \"weeks_on_chart\" real\n);\n\nQuestion: What is the sum of the weeks on a chart a song with a position less than 1 haas?" }, { "role": "assistant", "content": "SELECT SUM(\"weeks_on_chart\") FROM \"charts\" WHERE \"position\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"charts\" (\n \"year\" real,\n \"single\" text,\n \"chart\" text,\n \"position\" real,\n \"weeks_on_chart\" real\n);\n\nQuestion: What is the earliest year a song with a position less than 1 has?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"charts\" WHERE \"position\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text\n);\n\nQuestion: what is the tyre when the entrant is scuderia milano?" }, { "role": "assistant", "content": "SELECT \"tyre\" FROM \"entries\" WHERE \"entrant\"='scuderia milano';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text\n);\n\nQuestion: who is the driver with the engine era 1.5 l6 s and the chassis is era b?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"entries\" WHERE \"engine\"='era 1.5 l6 s' AND \"chassis\"='era b';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text\n);\n\nQuestion: who is the driver when the constructor is maserati, the chassis is maserati 4clt-48 and the tyre is d?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"entries\" WHERE \"constructor\"='maserati' AND \"chassis\"='maserati 4clt-48' AND \"tyre\"='d';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text\n);\n\nQuestion: who is the constructor when the tyre is d, the engine is talbot 23cv 4.5 l6, the chassis is talbot-lago t26c and the entrant is ecurie belge?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"entries\" WHERE \"tyre\"='d' AND \"engine\"='talbot 23cv 4.5 l6' AND \"chassis\"='talbot-lago t26c' AND \"entrant\"='ecurie belge';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"reactor_attributes\" (\n \"kk_1\" text,\n \"kk_2\" text,\n \"kk_3\" text,\n \"kk_4\" text,\n \"kk_5\" text,\n \"kk_6\" text,\n \"kk_7\" text\n);\n\nQuestion: What is KK -1 if KK -3 is 1,100?" }, { "role": "assistant", "content": "SELECT \"kk_1\" FROM \"reactor_attributes\" WHERE \"kk_3\"='1,100';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"reactor_attributes\" (\n \"kk_1\" text,\n \"kk_2\" text,\n \"kk_3\" text,\n \"kk_4\" text,\n \"kk_5\" text,\n \"kk_6\" text,\n \"kk_7\" text\n);\n\nQuestion: What is KK -5 if KK - 3 is 310?" }, { "role": "assistant", "content": "SELECT \"kk_5\" FROM \"reactor_attributes\" WHERE \"kk_3\"='310';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"reactor_attributes\" (\n \"kk_1\" text,\n \"kk_2\" text,\n \"kk_3\" text,\n \"kk_4\" text,\n \"kk_5\" text,\n \"kk_6\" text,\n \"kk_7\" text\n);\n\nQuestion: What is KK - 5 if KK - 1 is 1,067?" }, { "role": "assistant", "content": "SELECT \"kk_5\" FROM \"reactor_attributes\" WHERE \"kk_1\"='1,067';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" text,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"time\" text,\n \"purse\" text\n);\n\nQuestion: Who is the Winner with a Time of 1:12.00 and Melvin A. Holland as the Jockey?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"past_winners\" WHERE \"time\"='1:12.00' AND \"jockey\"='melvin a. holland';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" text,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"time\" text,\n \"purse\" text\n);\n\nQuestion: Which Year has a Purse of $83,925?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"past_winners\" WHERE \"purse\"='$83,925';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" text,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"time\" text,\n \"purse\" text\n);\n\nQuestion: What is the Purse listed for the Year of 1998?" }, { "role": "assistant", "content": "SELECT \"purse\" FROM \"past_winners\" WHERE \"year\"='1998';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" text,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"time\" text,\n \"purse\" text\n);\n\nQuestion: What's the Winner in the Year of 2000?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"past_winners\" WHERE \"year\"='2000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" text,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"time\" text,\n \"purse\" text\n);\n\nQuestion: What's the WInner with a TIme of 1:10.60, and Owner of Leslie Combs II?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"past_winners\" WHERE \"time\"='1:10.60' AND \"owner\"='leslie combs ii';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" text,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"time\" text,\n \"purse\" text\n);\n\nQuestion: Who is the Trainer with the Year of 2013?" }, { "role": "assistant", "content": "SELECT \"trainer\" FROM \"past_winners\" WHERE \"year\"='2013';" } ]
[ { "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 \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What venue features an away side score of 11.11 (77)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_17\" WHERE \"away_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 \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who is the away side when the crowd is over 14,112 with an away team score of 11.11 (77)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_17\" WHERE \"crowd\">'14,112' AND \"away_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_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How many points did the away team of st kilda score?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_10\" WHERE \"away_team\"='st kilda';" } ]
[ { "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 \"tv_time\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: Tell me the date with result of l 13\u20139" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"result\"='l 13\u20139';" } ]
[ { "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 \"tv_time\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: Tell me the total number of week for w 35\u20137" }, { "role": "assistant", "content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"result\"='w 35\u20137';" } ]
[ { "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 \"tv_time\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: Tell me the average week for result of l 34\u201324" }, { "role": "assistant", "content": "SELECT AVG(\"week\") FROM \"schedule\" WHERE \"result\"='l 34\u201324';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ambassadors_to_czechoslovakia\" (\n \"name\" text,\n \"tenure_begin\" text,\n \"tenure_end\" real,\n \"british_monarch\" text,\n \"czechoslovak_president\" text\n);\n\nQuestion: Who was the President of Czechoslovakia when an ambassador's tenure began in 1950?" }, { "role": "assistant", "content": "SELECT \"czechoslovak_president\" FROM \"ambassadors_to_czechoslovakia\" WHERE \"tenure_begin\"='1950';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_ratings\" (\n \"episode\" text,\n \"air_date\" text,\n \"rating\" real,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" real,\n \"weekly_rank\" real\n);\n\nQuestion: What is the total share for an episode with an air date of November 19, 2007?" }, { "role": "assistant", "content": "SELECT SUM(\"share\") FROM \"u_s_ratings\" WHERE \"air_date\"='november 19, 2007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which manufacturer has a Time/Retired of +15.665?" }, { "role": "assistant", "content": "SELECT \"manufacturer\" FROM \"125cc_classification\" WHERE \"time_retired\"='+15.665';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What were the laps of aprilia with a grid of 10?" }, { "role": "assistant", "content": "SELECT \"laps\" FROM \"125cc_classification\" WHERE \"manufacturer\"='aprilia' AND \"grid\"=10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the size of the crowd at the game played at Junction Oval?" }, { "role": "assistant", "content": "SELECT AVG(\"crowd\") FROM \"round_5\" WHERE \"venue\"='junction oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When was the game when North Melbourne was the home team?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_5\" WHERE \"home_team\"='north melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cfl_draft\" (\n \"round\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which School/Club Team does Andrew Jones play for?" }, { "role": "assistant", "content": "SELECT \"school_club_team\" FROM \"cfl_draft\" WHERE \"player\"='andrew jones';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cfl_draft\" (\n \"round\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which School/Club Team did not make it to round 2?" }, { "role": "assistant", "content": "SELECT \"school_club_team\" FROM \"cfl_draft\" WHERE \"round\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cfl_draft\" (\n \"round\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which player is the 24 pick?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"cfl_draft\" WHERE \"pick\"='24';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cfl_draft\" (\n \"round\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the average round of the number 16 pick?" }, { "role": "assistant", "content": "SELECT AVG(\"round\") FROM \"cfl_draft\" WHERE \"pick\"='16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"coaches_records\" (\n \"name\" text,\n \"coaching_career\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"win_pct\" real,\n \"points_per_game\" real\n);\n\nQuestion: How many games were lost where the win percentage is smaller than 16.7 and the played games is 3?" }, { "role": "assistant", "content": "SELECT COUNT(\"lost\") FROM \"coaches_records\" WHERE \"win_pct\"<16.7 AND \"played\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_100_in_the_united_states\" (\n \"rank\" real,\n \"name\" text,\n \"location\" text,\n \"state\" text,\n \"designer_year\" text\n);\n\nQuestion: Where is pine valley?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"top_100_in_the_united_states\" WHERE \"name\"='pine valley';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_100_in_the_united_states\" (\n \"rank\" real,\n \"name\" text,\n \"location\" text,\n \"state\" text,\n \"designer_year\" text\n);\n\nQuestion: What is augusta's low rank?" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"top_100_in_the_united_states\" WHERE \"location\"='augusta';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"listed_breeds\" (\n \"breed_a\" text,\n \"group\" text,\n \"2002_registrations\" real,\n \"2005_registrations\" real,\n \"2011_registrations\" real\n);\n\nQuestion: Which group has a registration less than 75 in 2011, more then 140 in 2005, and less than 148 in 2002?" }, { "role": "assistant", "content": "SELECT \"group\" FROM \"listed_breeds\" WHERE \"2011_registrations\">75 AND \"2005_registrations\">140 AND \"2002_registrations\"<148;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"specs_and_range\" (\n \"model\" text,\n \"engine_make_capacity\" text,\n \"power_k_w_rpm\" text,\n \"torque_nm_rpm\" text,\n \"gvm_kg_technical_capacity\" text,\n \"gcm_kg_technical_capacity\" text\n);\n\nQuestion: Which Model has the GCM (kg) Technical Capacity of 42000?" }, { "role": "assistant", "content": "SELECT \"model\" FROM \"specs_and_range\" WHERE \"gcm_kg_technical_capacity\"='42000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"specs_and_range\" (\n \"model\" text,\n \"engine_make_capacity\" text,\n \"power_k_w_rpm\" text,\n \"torque_nm_rpm\" text,\n \"gvm_kg_technical_capacity\" text,\n \"gcm_kg_technical_capacity\" text\n);\n\nQuestion: Which Model has a GCM (kg) Technical Capacity of 35000, a GVM (kg) Technical Capacity of 16000, and Cummins Interact 6.0-euro III (turbo intercooler) for the Engine?" }, { "role": "assistant", "content": "SELECT \"model\" FROM \"specs_and_range\" WHERE \"gcm_kg_technical_capacity\"='35000' AND \"gvm_kg_technical_capacity\"='16000' AND \"engine_make_capacity\"='cummins interact 6.0-euro iii (turbo intercooler)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"specs_and_range\" (\n \"model\" text,\n \"engine_make_capacity\" text,\n \"power_k_w_rpm\" text,\n \"torque_nm_rpm\" text,\n \"gvm_kg_technical_capacity\" text,\n \"gcm_kg_technical_capacity\" text\n);\n\nQuestion: Which Torque Nm@rpm has a Power kW@rpm equal to 184 @ 2500 and a GVM (kg) Technical Capacity of 16000?" }, { "role": "assistant", "content": "SELECT \"torque_nm_rpm\" FROM \"specs_and_range\" WHERE \"power_k_w_rpm\"='184 @ 2500' AND \"gvm_kg_technical_capacity\"='16000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"star_parivaar_awards\" (\n \"year\" real,\n \"category\" text,\n \"character\" text,\n \"for_the_show\" text,\n \"result\" text\n);\n\nQuestion: Which character won before 2006?" }, { "role": "assistant", "content": "SELECT \"character\" FROM \"star_parivaar_awards\" WHERE \"result\"='won' AND \"year\"<2006;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"star_parivaar_awards\" (\n \"year\" real,\n \"category\" text,\n \"character\" text,\n \"for_the_show\" text,\n \"result\" text\n);\n\nQuestion: In 2004 who was favourite maa?" }, { "role": "assistant", "content": "SELECT \"character\" FROM \"star_parivaar_awards\" WHERE \"category\"='favourite maa' AND \"year\"=2004;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"star_parivaar_awards\" (\n \"year\" real,\n \"category\" text,\n \"character\" text,\n \"for_the_show\" text,\n \"result\" text\n);\n\nQuestion: What were the results after 2004?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"star_parivaar_awards\" WHERE \"year\">2004;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"star_parivaar_awards\" (\n \"year\" real,\n \"category\" text,\n \"character\" text,\n \"for_the_show\" text,\n \"result\" text\n);\n\nQuestion: In 2007 what category won?" }, { "role": "assistant", "content": "SELECT \"category\" FROM \"star_parivaar_awards\" WHERE \"result\"='won' AND \"year\"<2007;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senate_composition_at_the_beginning_of_t\" (\n \"d_39\" text,\n \"d_40\" text,\n \"d_41\" text,\n \"d_42\" text,\n \"d_43\" text,\n \"d_44\" text,\n \"d_45\" text,\n \"d_46\" text,\n \"d_47\" text,\n \"d_48\" text\n);\n\nQuestion: What's the D 48 \u221a when the D 40 \u221a is D 37?" }, { "role": "assistant", "content": "SELECT \"d_48\" FROM \"senate_composition_at_the_beginning_of_t\" WHERE \"d_40\"='d 37';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senate_composition_at_the_beginning_of_t\" (\n \"d_39\" text,\n \"d_40\" text,\n \"d_41\" text,\n \"d_42\" text,\n \"d_43\" text,\n \"d_44\" text,\n \"d_45\" text,\n \"d_46\" text,\n \"d_47\" text,\n \"d_48\" text\n);\n\nQuestion: What's the D 42 \u221a when D 46 \u221a is majority\u2192?" }, { "role": "assistant", "content": "SELECT \"d_42\" FROM \"senate_composition_at_the_beginning_of_t\" WHERE \"d_46\"='majority\u2192';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senate_composition_at_the_beginning_of_t\" (\n \"d_39\" text,\n \"d_40\" text,\n \"d_41\" text,\n \"d_42\" text,\n \"d_43\" text,\n \"d_44\" text,\n \"d_45\" text,\n \"d_46\" text,\n \"d_47\" text,\n \"d_48\" text\n);\n\nQuestion: What's the D 40 \u221a when D 43 \u221a is d 14?" }, { "role": "assistant", "content": "SELECT \"d_40\" FROM \"senate_composition_at_the_beginning_of_t\" WHERE \"d_43\"='d 14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senate_composition_at_the_beginning_of_t\" (\n \"d_39\" text,\n \"d_40\" text,\n \"d_41\" text,\n \"d_42\" text,\n \"d_43\" text,\n \"d_44\" text,\n \"d_45\" text,\n \"d_46\" text,\n \"d_47\" text,\n \"d_48\" text\n);\n\nQuestion: What's the D 42 \u221a when D 44 \u221a is majority\u2192?" }, { "role": "assistant", "content": "SELECT \"d_42\" FROM \"senate_composition_at_the_beginning_of_t\" WHERE \"d_44\"='majority\u2192';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senate_composition_at_the_beginning_of_t\" (\n \"d_39\" text,\n \"d_40\" text,\n \"d_41\" text,\n \"d_42\" text,\n \"d_43\" text,\n \"d_44\" text,\n \"d_45\" text,\n \"d_46\" text,\n \"d_47\" text,\n \"d_48\" text\n);\n\nQuestion: What's the D 44 \u221a when D 46 \u221a is d 26?" }, { "role": "assistant", "content": "SELECT \"d_44\" FROM \"senate_composition_at_the_beginning_of_t\" WHERE \"d_46\"='d 26';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senate_composition_at_the_beginning_of_t\" (\n \"d_39\" text,\n \"d_40\" text,\n \"d_41\" text,\n \"d_42\" text,\n \"d_43\" text,\n \"d_44\" text,\n \"d_45\" text,\n \"d_46\" text,\n \"d_47\" text,\n \"d_48\" text\n);\n\nQuestion: What's the D 42 \u221a when D 43 \u221a is r 5?" }, { "role": "assistant", "content": "SELECT \"d_42\" FROM \"senate_composition_at_the_beginning_of_t\" WHERE \"d_43\"='r 5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"houses\" (\n \"house_name\" text,\n \"composition\" text,\n \"named_after\" text,\n \"founded\" real,\n \"colours\" text\n);\n\nQuestion: How many benue houses have been founded?" }, { "role": "assistant", "content": "SELECT COUNT(\"founded\") FROM \"houses\" WHERE \"house_name\"='benue';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"houses\" (\n \"house_name\" text,\n \"composition\" text,\n \"named_after\" text,\n \"founded\" real,\n \"colours\" text\n);\n\nQuestion: When is the earliest year founded for houses named after the river benue?" }, { "role": "assistant", "content": "SELECT MIN(\"founded\") FROM \"houses\" WHERE \"named_after\"='river benue';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"houses\" (\n \"house_name\" text,\n \"composition\" text,\n \"named_after\" text,\n \"founded\" real,\n \"colours\" text\n);\n\nQuestion: What composition was founded in 1976?" }, { "role": "assistant", "content": "SELECT \"composition\" FROM \"houses\" WHERE \"founded\"=1976;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"houses\" (\n \"house_name\" text,\n \"composition\" text,\n \"named_after\" text,\n \"founded\" real,\n \"colours\" text\n);\n\nQuestion: What colours have a House Name of ogun?" }, { "role": "assistant", "content": "SELECT \"colours\" FROM \"houses\" WHERE \"house_name\"='ogun';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What's the average attendance on january 6, 2008?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"january\" WHERE \"date\"='january 6, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score when the spurs were the visitors?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"january\" WHERE \"visitor\"='spurs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score when the nets were the visitors and attendance was over 16,494?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"january\" WHERE \"attendance\">'16,494' AND \"visitor\"='nets';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states\" (\n \"name\" text,\n \"gnis_feature_id\" real,\n \"state\" text,\n \"county\" text,\n \"type\" text,\n \"usgs_7_5_map\" text\n);\n\nQuestion: Which name has a type of lake, a County of hennepin, and a USGS 7.5 Map of rogers?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"united_states\" WHERE \"type\"='lake' AND \"county\"='hennepin' AND \"usgs_7_5_map\"='rogers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states\" (\n \"name\" text,\n \"gnis_feature_id\" real,\n \"state\" text,\n \"county\" text,\n \"type\" text,\n \"usgs_7_5_map\" text\n);\n\nQuestion: What is the total GNIS Feature ID with a County of idaho?" }, { "role": "assistant", "content": "SELECT SUM(\"gnis_feature_id\") FROM \"united_states\" WHERE \"county\"='idaho';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states\" (\n \"name\" text,\n \"gnis_feature_id\" real,\n \"state\" text,\n \"county\" text,\n \"type\" text,\n \"usgs_7_5_map\" text\n);\n\nQuestion: What is the lowest GNIS Feature ID from County of sheridan?" }, { "role": "assistant", "content": "SELECT MIN(\"gnis_feature_id\") FROM \"united_states\" WHERE \"county\"='sheridan';" } ]