text
stringlengths
147
1.06k
source
dict
### INSTRUCTION What nationality is the draft pick with w position from leninogorsk (russia-2)? ### INPUT CREATE TABLE table_name_66 (nationality VARCHAR, position VARCHAR, college_junior_club_team__league_ VARCHAR) ### OUTPUT SELECT nationality FROM table_name_66 WHERE position = "w" AND college_junior_club_team__league_ = "leninogorsk (russia-2)"
{ "input": "CREATE TABLE table_name_66 (nationality VARCHAR, position VARCHAR, college_junior_club_team__league_ VARCHAR)", "instruction": "What nationality is the draft pick with w position from leninogorsk (russia-2)?", "output": "SELECT nationality FROM table_name_66 WHERE position = \"w\" AND college_junior_club_team__league_ = \"leninogorsk (russia-2)\"" }
### INSTRUCTION What are the records when Elzbieta Urbanczik competed? ### INPUT CREATE TABLE table_14884844_2 (record VARCHAR, athletes VARCHAR) ### OUTPUT SELECT record FROM table_14884844_2 WHERE athletes = "Elzbieta Urbanczik"
{ "input": "CREATE TABLE table_14884844_2 (record VARCHAR, athletes VARCHAR)", "instruction": "What are the records when Elzbieta Urbanczik competed?", "output": "SELECT record FROM table_14884844_2 WHERE athletes = \"Elzbieta Urbanczik\"" }
### INSTRUCTION Where was the tournament where Finland received the bronze and the United States received the silver? ### INPUT CREATE TABLE table_name_22 (venue VARCHAR, bronze VARCHAR, silver VARCHAR) ### OUTPUT SELECT venue FROM table_name_22 WHERE bronze = "finland" AND silver = "united states"
{ "input": "CREATE TABLE table_name_22 (venue VARCHAR, bronze VARCHAR, silver VARCHAR)", "instruction": "Where was the tournament where Finland received the bronze and the United States received the silver?", "output": "SELECT venue FROM table_name_22 WHERE bronze = \"finland\" AND silver = \"united states\"" }
### INSTRUCTION Find the city with the most number of stores. ### INPUT CREATE TABLE district (headquartered_city VARCHAR, district_id VARCHAR); CREATE TABLE store_district (store_id VARCHAR, district_id VARCHAR); CREATE TABLE store (store_id VARCHAR) ### OUTPUT SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city ORDER BY COUNT(*) DESC LIMIT 1
{ "input": "CREATE TABLE district (headquartered_city VARCHAR, district_id VARCHAR); CREATE TABLE store_district (store_id VARCHAR, district_id VARCHAR); CREATE TABLE store (store_id VARCHAR)", "instruction": "Find the city with the most number of stores.", "output": "SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city ORDER BY COUNT(*) DESC LIMIT 1" }
### INSTRUCTION what is the current version of the name mupen64plus with gpl v2 license? ### INPUT CREATE TABLE table_name_97 (current_version VARCHAR, license VARCHAR, name VARCHAR) ### OUTPUT SELECT current_version FROM table_name_97 WHERE license = "gpl v2" AND name = "mupen64plus"
{ "input": "CREATE TABLE table_name_97 (current_version VARCHAR, license VARCHAR, name VARCHAR)", "instruction": "what is the current version of the name mupen64plus with gpl v2 license?", "output": "SELECT current_version FROM table_name_97 WHERE license = \"gpl v2\" AND name = \"mupen64plus\"" }
### INSTRUCTION Which year's genre was jazz under the columbia label when it was nominated for the title Trio jeepy? ### INPUT CREATE TABLE table_name_37 (year VARCHAR, title VARCHAR, result VARCHAR, genre VARCHAR, label VARCHAR) ### OUTPUT SELECT year FROM table_name_37 WHERE genre = "jazz" AND label = "columbia" AND result = "nominated" AND title = "trio jeepy"
{ "input": "CREATE TABLE table_name_37 (year VARCHAR, title VARCHAR, result VARCHAR, genre VARCHAR, label VARCHAR)", "instruction": "Which year's genre was jazz under the columbia label when it was nominated for the title Trio jeepy?", "output": "SELECT year FROM table_name_37 WHERE genre = \"jazz\" AND label = \"columbia\" AND result = \"nominated\" AND title = \"trio jeepy\"" }
### INSTRUCTION Name the recognised seats for pharmacology ### INPUT CREATE TABLE table_19304764_2 (recognised_seats VARCHAR, discipline VARCHAR) ### OUTPUT SELECT recognised_seats FROM table_19304764_2 WHERE discipline = "Pharmacology"
{ "input": "CREATE TABLE table_19304764_2 (recognised_seats VARCHAR, discipline VARCHAR)", "instruction": "Name the recognised seats for pharmacology", "output": "SELECT recognised_seats FROM table_19304764_2 WHERE discipline = \"Pharmacology\"" }
### INSTRUCTION Which claims caused more than 2 settlements or have the maximum claim value? List the date the claim was made and the claim id. ### INPUT CREATE TABLE Settlements (Claim_id VARCHAR); CREATE TABLE Claims (Amount_Claimed INTEGER); CREATE TABLE Claims (Date_Claim_Made VARCHAR, Claim_id VARCHAR, Amount_Claimed INTEGER) ### OUTPUT SELECT T1.Date_Claim_Made, T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.Claim_id HAVING COUNT(*) > 2 UNION SELECT T1.Date_Claim_Made, T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id WHERE T1.Amount_Claimed = (SELECT MAX(Amount_Claimed) FROM Claims)
{ "input": "CREATE TABLE Settlements (Claim_id VARCHAR); CREATE TABLE Claims (Amount_Claimed INTEGER); CREATE TABLE Claims (Date_Claim_Made VARCHAR, Claim_id VARCHAR, Amount_Claimed INTEGER)", "instruction": "Which claims caused more than 2 settlements or have the maximum claim value? List the date the claim was made and the claim id.", "output": "SELECT T1.Date_Claim_Made, T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.Claim_id HAVING COUNT(*) > 2 UNION SELECT T1.Date_Claim_Made, T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id WHERE T1.Amount_Claimed = (SELECT MAX(Amount_Claimed) FROM Claims)" }
### INSTRUCTION For each director, return the director's name together with the title of the movie they directed that received the highest rating among all of their movies, and the value of that rating. Ignore movies whose director is NULL. ### INPUT CREATE TABLE Rating (stars INTEGER, mID VARCHAR); CREATE TABLE Movie (title VARCHAR, director VARCHAR, mID VARCHAR) ### OUTPUT SELECT T2.title, T1.stars, T2.director, MAX(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE director <> "null" GROUP BY director
{ "input": "CREATE TABLE Rating (stars INTEGER, mID VARCHAR); CREATE TABLE Movie (title VARCHAR, director VARCHAR, mID VARCHAR)", "instruction": "For each director, return the director's name together with the title of the movie they directed that received the highest rating among all of their movies, and the value of that rating. Ignore movies whose director is NULL.", "output": "SELECT T2.title, T1.stars, T2.director, MAX(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE director <> \"null\" GROUP BY director" }
### INSTRUCTION Who was the winner in the competition in which Lyn took third place and Lillestrøm was the runner-up? ### INPUT CREATE TABLE table_name_44 (winners VARCHAR, runners_up VARCHAR, third VARCHAR) ### OUTPUT SELECT winners FROM table_name_44 WHERE runners_up = "lillestrøm" AND third = "lyn"
{ "input": "CREATE TABLE table_name_44 (winners VARCHAR, runners_up VARCHAR, third VARCHAR)", "instruction": "Who was the winner in the competition in which Lyn took third place and Lillestrøm was the runner-up?", "output": "SELECT winners FROM table_name_44 WHERE runners_up = \"lillestrøm\" AND third = \"lyn\"" }
### INSTRUCTION How many products are never booked with amount higher than 200? ### INPUT CREATE TABLE products_booked (product_id VARCHAR, booked_amount INTEGER); CREATE TABLE Products_for_hire (product_id VARCHAR, booked_amount INTEGER) ### OUTPUT SELECT COUNT(*) FROM Products_for_hire WHERE NOT product_id IN (SELECT product_id FROM products_booked WHERE booked_amount > 200)
{ "input": "CREATE TABLE products_booked (product_id VARCHAR, booked_amount INTEGER); CREATE TABLE Products_for_hire (product_id VARCHAR, booked_amount INTEGER)", "instruction": "How many products are never booked with amount higher than 200?", "output": "SELECT COUNT(*) FROM Products_for_hire WHERE NOT product_id IN (SELECT product_id FROM products_booked WHERE booked_amount > 200)" }
### INSTRUCTION How many attended the game with a record of 43-34? ### INPUT CREATE TABLE table_name_59 (attendance VARCHAR, record VARCHAR) ### OUTPUT SELECT COUNT(attendance) FROM table_name_59 WHERE record = "43-34"
{ "input": "CREATE TABLE table_name_59 (attendance VARCHAR, record VARCHAR)", "instruction": "How many attended the game with a record of 43-34?", "output": "SELECT COUNT(attendance) FROM table_name_59 WHERE record = \"43-34\"" }
### INSTRUCTION Which Network has a Rank larger than 5, a Show of 2012 summer olympics closing ceremony in london? ### INPUT CREATE TABLE table_name_34 (network VARCHAR, rank VARCHAR, show VARCHAR) ### OUTPUT SELECT network FROM table_name_34 WHERE rank > 5 AND show = "2012 summer olympics closing ceremony in london"
{ "input": "CREATE TABLE table_name_34 (network VARCHAR, rank VARCHAR, show VARCHAR)", "instruction": "Which Network has a Rank larger than 5, a Show of 2012 summer olympics closing ceremony in london?", "output": "SELECT network FROM table_name_34 WHERE rank > 5 AND show = \"2012 summer olympics closing ceremony in london\"" }
### INSTRUCTION What is the total number for a total when the nation is netherlands and silver is larger than 0? ### INPUT CREATE TABLE table_name_12 (total VARCHAR, nation VARCHAR, silver VARCHAR) ### OUTPUT SELECT COUNT(total) FROM table_name_12 WHERE nation = "netherlands" AND silver > 0
{ "input": "CREATE TABLE table_name_12 (total VARCHAR, nation VARCHAR, silver VARCHAR)", "instruction": "What is the total number for a total when the nation is netherlands and silver is larger than 0?", "output": "SELECT COUNT(total) FROM table_name_12 WHERE nation = \"netherlands\" AND silver > 0" }
### INSTRUCTION What electorate does Member dingley brittin category:articles with hcards represent? ### INPUT CREATE TABLE table_name_37 (electorate VARCHAR, member VARCHAR) ### OUTPUT SELECT electorate FROM table_name_37 WHERE member = "dingley brittin category:articles with hcards"
{ "input": "CREATE TABLE table_name_37 (electorate VARCHAR, member VARCHAR)", "instruction": "What electorate does Member dingley brittin category:articles with hcards represent?", "output": "SELECT electorate FROM table_name_37 WHERE member = \"dingley brittin category:articles with hcards\"" }
### INSTRUCTION What is the L2 cache for the processor with iris pro graphics 5200 and frequency of 2.6 ghz? ### INPUT CREATE TABLE table_name_96 (l2_cache VARCHAR, gpu_model VARCHAR, frequency VARCHAR) ### OUTPUT SELECT l2_cache FROM table_name_96 WHERE gpu_model = "iris pro graphics 5200" AND frequency = "2.6 ghz"
{ "input": "CREATE TABLE table_name_96 (l2_cache VARCHAR, gpu_model VARCHAR, frequency VARCHAR)", "instruction": "What is the L2 cache for the processor with iris pro graphics 5200 and frequency of 2.6 ghz?", "output": "SELECT l2_cache FROM table_name_96 WHERE gpu_model = \"iris pro graphics 5200\" AND frequency = \"2.6 ghz\"" }
### INSTRUCTION How many writers write the episode whose director is Jonathan Herron? ### INPUT CREATE TABLE table_22580855_1 (written_by VARCHAR, directed_by VARCHAR) ### OUTPUT SELECT COUNT(written_by) FROM table_22580855_1 WHERE directed_by = "Jonathan Herron"
{ "input": "CREATE TABLE table_22580855_1 (written_by VARCHAR, directed_by VARCHAR)", "instruction": "How many writers write the episode whose director is Jonathan Herron?", "output": "SELECT COUNT(written_by) FROM table_22580855_1 WHERE directed_by = \"Jonathan Herron\"" }
### INSTRUCTION What was the new membership total at the nchc (men only) conference? ### INPUT CREATE TABLE table_27671835_3 (new_membership_total VARCHAR, conference VARCHAR) ### OUTPUT SELECT new_membership_total FROM table_27671835_3 WHERE conference = "NCHC (men only)"
{ "input": "CREATE TABLE table_27671835_3 (new_membership_total VARCHAR, conference VARCHAR)", "instruction": "What was the new membership total at the nchc (men only) conference?", "output": "SELECT new_membership_total FROM table_27671835_3 WHERE conference = \"NCHC (men only)\"" }
### INSTRUCTION Which Totora Municipality (%) is the highest one that has a Chimoré Municipality (%) of 5.1, and a Pocona Municipality (%) smaller than 0.2? ### INPUT CREATE TABLE table_name_72 (totora_municipality___percentage_ INTEGER, chimoré_municipality___percentage_ VARCHAR, pocona_municipality___percentage_ VARCHAR) ### OUTPUT SELECT MAX(totora_municipality___percentage_) FROM table_name_72 WHERE chimoré_municipality___percentage_ = 5.1 AND pocona_municipality___percentage_ < 0.2
{ "input": "CREATE TABLE table_name_72 (totora_municipality___percentage_ INTEGER, chimoré_municipality___percentage_ VARCHAR, pocona_municipality___percentage_ VARCHAR)", "instruction": "Which Totora Municipality (%) is the highest one that has a Chimoré Municipality (%) of 5.1, and a Pocona Municipality (%) smaller than 0.2?", "output": "SELECT MAX(totora_municipality___percentage_) FROM table_name_72 WHERE chimoré_municipality___percentage_ = 5.1 AND pocona_municipality___percentage_ < 0.2" }
### INSTRUCTION What is the Main span of the bridge from China with a Year to open of 2013 and Main span feet of 2,585? ### INPUT CREATE TABLE table_name_23 (main_span_metres VARCHAR, main_span_feet VARCHAR, year_to_open VARCHAR, country VARCHAR) ### OUTPUT SELECT main_span_metres FROM table_name_23 WHERE year_to_open = 2013 AND country = "china" AND main_span_feet = "2,585"
{ "input": "CREATE TABLE table_name_23 (main_span_metres VARCHAR, main_span_feet VARCHAR, year_to_open VARCHAR, country VARCHAR)", "instruction": "What is the Main span of the bridge from China with a Year to open of 2013 and Main span feet of 2,585?", "output": "SELECT main_span_metres FROM table_name_23 WHERE year_to_open = 2013 AND country = \"china\" AND main_span_feet = \"2,585\"" }
### INSTRUCTION When the PCT route available is yes and the maximum term is 10 years, what are the available conversions from patent applications? ### INPUT CREATE TABLE table_2279413_1 (conversion_from_patent_application VARCHAR, maximum_term VARCHAR, pct_route_available VARCHAR) ### OUTPUT SELECT conversion_from_patent_application FROM table_2279413_1 WHERE maximum_term = "10 years" AND pct_route_available = "Yes"
{ "input": "CREATE TABLE table_2279413_1 (conversion_from_patent_application VARCHAR, maximum_term VARCHAR, pct_route_available VARCHAR)", "instruction": "When the PCT route available is yes and the maximum term is 10 years, what are the available conversions from patent applications?", "output": "SELECT conversion_from_patent_application FROM table_2279413_1 WHERE maximum_term = \"10 years\" AND pct_route_available = \"Yes\"" }
### INSTRUCTION What type of disaster is rms atlantic categorized in that was located in Nova Scotia? ### INPUT CREATE TABLE table_name_62 (type VARCHAR, location VARCHAR, disaster VARCHAR) ### OUTPUT SELECT type FROM table_name_62 WHERE location = "nova scotia" AND disaster = "rms atlantic"
{ "input": "CREATE TABLE table_name_62 (type VARCHAR, location VARCHAR, disaster VARCHAR)", "instruction": "What type of disaster is rms atlantic categorized in that was located in Nova Scotia?", "output": "SELECT type FROM table_name_62 WHERE location = \"nova scotia\" AND disaster = \"rms atlantic\"" }
### INSTRUCTION Whats the season/episode of segment a digital dentistry ### INPUT CREATE TABLE table_15187735_16 (netflix VARCHAR, segment_a VARCHAR) ### OUTPUT SELECT netflix FROM table_15187735_16 WHERE segment_a = "Digital Dentistry"
{ "input": "CREATE TABLE table_15187735_16 (netflix VARCHAR, segment_a VARCHAR)", "instruction": "Whats the season/episode of segment a digital dentistry", "output": "SELECT netflix FROM table_15187735_16 WHERE segment_a = \"Digital Dentistry\"" }
### INSTRUCTION What date was the ship named Manhattan completed? ### INPUT CREATE TABLE table_name_60 (commissioned_or_completed_ VARCHAR, _ VARCHAR, ship VARCHAR) ### OUTPUT SELECT commissioned_or_completed_ * _ FROM table_name_60 WHERE ship = "manhattan"
{ "input": "CREATE TABLE table_name_60 (commissioned_or_completed_ VARCHAR, _ VARCHAR, ship VARCHAR)", "instruction": "What date was the ship named Manhattan completed?", "output": "SELECT commissioned_or_completed_ * _ FROM table_name_60 WHERE ship = \"manhattan\"" }
### INSTRUCTION What county had 915 third party voters? ### INPUT CREATE TABLE table_20278716_2 (county VARCHAR, others__number VARCHAR) ### OUTPUT SELECT county FROM table_20278716_2 WHERE others__number = 915
{ "input": "CREATE TABLE table_20278716_2 (county VARCHAR, others__number VARCHAR)", "instruction": "What county had 915 third party voters?", "output": "SELECT county FROM table_20278716_2 WHERE others__number = 915" }
### INSTRUCTION Which nationality is the player from the Philadelphia Flyers? ### INPUT CREATE TABLE table_1473672_3 (nationality VARCHAR, nhl_team VARCHAR) ### OUTPUT SELECT nationality FROM table_1473672_3 WHERE nhl_team = "Philadelphia Flyers"
{ "input": "CREATE TABLE table_1473672_3 (nationality VARCHAR, nhl_team VARCHAR)", "instruction": "Which nationality is the player from the Philadelphia Flyers?", "output": "SELECT nationality FROM table_1473672_3 WHERE nhl_team = \"Philadelphia Flyers\"" }
### INSTRUCTION What is the second party that has a conservative first party in the 1834 election? ### INPUT CREATE TABLE table_name_71 (second_party VARCHAR, first_party VARCHAR, election VARCHAR) ### OUTPUT SELECT second_party FROM table_name_71 WHERE first_party = "conservative" AND election = "1834"
{ "input": "CREATE TABLE table_name_71 (second_party VARCHAR, first_party VARCHAR, election VARCHAR)", "instruction": "What is the second party that has a conservative first party in the 1834 election?", "output": "SELECT second_party FROM table_name_71 WHERE first_party = \"conservative\" AND election = \"1834\"" }
### INSTRUCTION what would be final four mvp maximum when first team is 1 ### INPUT CREATE TABLE table_26130295_3 (final_four_mvp INTEGER, first_team VARCHAR) ### OUTPUT SELECT MAX(final_four_mvp) FROM table_26130295_3 WHERE first_team = 1
{ "input": "CREATE TABLE table_26130295_3 (final_four_mvp INTEGER, first_team VARCHAR)", "instruction": "what would be final four mvp maximum when first team is 1", "output": "SELECT MAX(final_four_mvp) FROM table_26130295_3 WHERE first_team = 1" }
### INSTRUCTION Which LEMA/SUBLEMA that has Votes smaller than 218656, and a Ch of Deputies of 0? ### INPUT CREATE TABLE table_name_22 (lema_sublema VARCHAR, votes VARCHAR, ch_of_deputies VARCHAR) ### OUTPUT SELECT lema_sublema FROM table_name_22 WHERE votes < 218656 AND ch_of_deputies = "0"
{ "input": "CREATE TABLE table_name_22 (lema_sublema VARCHAR, votes VARCHAR, ch_of_deputies VARCHAR)", "instruction": "Which LEMA/SUBLEMA that has Votes smaller than 218656, and a Ch of Deputies of 0?", "output": "SELECT lema_sublema FROM table_name_22 WHERE votes < 218656 AND ch_of_deputies = \"0\"" }
### INSTRUCTION Name the total water resources m3 for rainfall being 650 ### INPUT CREATE TABLE table_22854436_1 (per_capita_average_annual_renewable_water_resources_m_3 VARCHAR, average_annual_rainfall__mm_ VARCHAR) ### OUTPUT SELECT COUNT(per_capita_average_annual_renewable_water_resources_m_3) FROM table_22854436_1 WHERE average_annual_rainfall__mm_ = "650"
{ "input": "CREATE TABLE table_22854436_1 (per_capita_average_annual_renewable_water_resources_m_3 VARCHAR, average_annual_rainfall__mm_ VARCHAR)", "instruction": "Name the total water resources m3 for rainfall being 650", "output": "SELECT COUNT(per_capita_average_annual_renewable_water_resources_m_3) FROM table_22854436_1 WHERE average_annual_rainfall__mm_ = \"650\"" }
### INSTRUCTION What are the name and typical buying and selling prices of the products that have color described as "yellow"? ### INPUT CREATE TABLE ref_colors (color_code VARCHAR, color_description VARCHAR); CREATE TABLE products (product_name VARCHAR, typical_buying_price VARCHAR, typical_selling_price VARCHAR, color_code VARCHAR) ### OUTPUT SELECT t1.product_name, t1.typical_buying_price, t1.typical_selling_price FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = "yellow"
{ "input": "CREATE TABLE ref_colors (color_code VARCHAR, color_description VARCHAR); CREATE TABLE products (product_name VARCHAR, typical_buying_price VARCHAR, typical_selling_price VARCHAR, color_code VARCHAR)", "instruction": "What are the name and typical buying and selling prices of the products that have color described as \"yellow\"?", "output": "SELECT t1.product_name, t1.typical_buying_price, t1.typical_selling_price FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = \"yellow\"" }
### INSTRUCTION What place did Târlea come in at the European Indoor Championships? ### INPUT CREATE TABLE table_name_56 (position VARCHAR, competition VARCHAR) ### OUTPUT SELECT position FROM table_name_56 WHERE competition = "european indoor championships"
{ "input": "CREATE TABLE table_name_56 (position VARCHAR, competition VARCHAR)", "instruction": "What place did Târlea come in at the European Indoor Championships?", "output": "SELECT position FROM table_name_56 WHERE competition = \"european indoor championships\"" }
### INSTRUCTION What is the name and id of the staff who recorded the fault log but has not contacted any visiting engineers? ### INPUT CREATE TABLE Engineer_Visits (contact_staff_id VARCHAR); CREATE TABLE Staff (staff_name VARCHAR, staff_id VARCHAR); CREATE TABLE Fault_Log (recorded_by_staff_id VARCHAR) ### OUTPUT SELECT T1.staff_name, T1.staff_id FROM Staff AS T1 JOIN Fault_Log AS T2 ON T1.staff_id = T2.recorded_by_staff_id EXCEPT SELECT T3.staff_name, T3.staff_id FROM Staff AS T3 JOIN Engineer_Visits AS T4 ON T3.staff_id = T4.contact_staff_id
{ "input": "CREATE TABLE Engineer_Visits (contact_staff_id VARCHAR); CREATE TABLE Staff (staff_name VARCHAR, staff_id VARCHAR); CREATE TABLE Fault_Log (recorded_by_staff_id VARCHAR)", "instruction": "What is the name and id of the staff who recorded the fault log but has not contacted any visiting engineers?", "output": "SELECT T1.staff_name, T1.staff_id FROM Staff AS T1 JOIN Fault_Log AS T2 ON T1.staff_id = T2.recorded_by_staff_id EXCEPT SELECT T3.staff_name, T3.staff_id FROM Staff AS T3 JOIN Engineer_Visits AS T4 ON T3.staff_id = T4.contact_staff_id" }
### INSTRUCTION How many ranks are higher than lane 4 from Great Britain, raced by Margaretha Pedder? ### INPUT CREATE TABLE table_name_83 (rank VARCHAR, name VARCHAR, lane VARCHAR, nationality VARCHAR) ### OUTPUT SELECT COUNT(rank) FROM table_name_83 WHERE lane > 4 AND nationality = "great britain" AND name = "margaretha pedder"
{ "input": "CREATE TABLE table_name_83 (rank VARCHAR, name VARCHAR, lane VARCHAR, nationality VARCHAR)", "instruction": "How many ranks are higher than lane 4 from Great Britain, raced by Margaretha Pedder?", "output": "SELECT COUNT(rank) FROM table_name_83 WHERE lane > 4 AND nationality = \"great britain\" AND name = \"margaretha pedder\"" }
### INSTRUCTION What is the name of the city with the Socialist Party of the Extremadurian People? ### INPUT CREATE TABLE table_name_89 (city VARCHAR, name_in_english VARCHAR) ### OUTPUT SELECT city FROM table_name_89 WHERE name_in_english = "socialist party of the extremadurian people"
{ "input": "CREATE TABLE table_name_89 (city VARCHAR, name_in_english VARCHAR)", "instruction": "What is the name of the city with the Socialist Party of the Extremadurian People?", "output": "SELECT city FROM table_name_89 WHERE name_in_english = \"socialist party of the extremadurian people\"" }
### INSTRUCTION How many rounds did João Victor Horto achieved the fastest lap? ### INPUT CREATE TABLE table_25459168_2 (round VARCHAR, fastest_lap VARCHAR) ### OUTPUT SELECT COUNT(round) FROM table_25459168_2 WHERE fastest_lap = "João Victor Horto"
{ "input": "CREATE TABLE table_25459168_2 (round VARCHAR, fastest_lap VARCHAR)", "instruction": "How many rounds did João Victor Horto achieved the fastest lap?", "output": "SELECT COUNT(round) FROM table_25459168_2 WHERE fastest_lap = \"João Victor Horto\"" }
### INSTRUCTION What's the record that had an opponent of Krzysztof Soszynski and a time of 4:00? ### INPUT CREATE TABLE table_name_64 (record VARCHAR, time VARCHAR, opponent VARCHAR) ### OUTPUT SELECT record FROM table_name_64 WHERE time = "4:00" AND opponent = "krzysztof soszynski"
{ "input": "CREATE TABLE table_name_64 (record VARCHAR, time VARCHAR, opponent VARCHAR)", "instruction": "What's the record that had an opponent of Krzysztof Soszynski and a time of 4:00?", "output": "SELECT record FROM table_name_64 WHERE time = \"4:00\" AND opponent = \"krzysztof soszynski\"" }
### INSTRUCTION What is the number of car models that are produced by each maker and what is the id and full name of each maker? ### INPUT CREATE TABLE CAR_MAKERS (FullName VARCHAR, id VARCHAR, Id VARCHAR); CREATE TABLE MODEL_LIST (Maker VARCHAR) ### OUTPUT SELECT COUNT(*), T2.FullName, T2.id FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id GROUP BY T2.id
{ "input": "CREATE TABLE CAR_MAKERS (FullName VARCHAR, id VARCHAR, Id VARCHAR); CREATE TABLE MODEL_LIST (Maker VARCHAR)", "instruction": "What is the number of car models that are produced by each maker and what is the id and full name of each maker?", "output": "SELECT COUNT(*), T2.FullName, T2.id FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id GROUP BY T2.id" }
### INSTRUCTION find the program owners that have some programs in both morning and night time. ### INPUT CREATE TABLE broadcast (program_id VARCHAR, Time_of_day VARCHAR); CREATE TABLE program (owner VARCHAR, program_id VARCHAR) ### OUTPUT SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = "Morning" INTERSECT SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = "Night"
{ "input": "CREATE TABLE broadcast (program_id VARCHAR, Time_of_day VARCHAR); CREATE TABLE program (owner VARCHAR, program_id VARCHAR)", "instruction": "find the program owners that have some programs in both morning and night time.", "output": "SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = \"Morning\" INTERSECT SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = \"Night\"" }
### INSTRUCTION Tell me the sum of the grid with alfa romeo and toulo de graffenried ### INPUT CREATE TABLE table_name_86 (grid INTEGER, constructor VARCHAR, driver VARCHAR) ### OUTPUT SELECT SUM(grid) FROM table_name_86 WHERE constructor = "alfa romeo" AND driver = "toulo de graffenried"
{ "input": "CREATE TABLE table_name_86 (grid INTEGER, constructor VARCHAR, driver VARCHAR)", "instruction": "Tell me the sum of the grid with alfa romeo and toulo de graffenried", "output": "SELECT SUM(grid) FROM table_name_86 WHERE constructor = \"alfa romeo\" AND driver = \"toulo de graffenried\"" }
### INSTRUCTION What is the D 46 √ when the D 44 √ is ← majority? ### INPUT CREATE TABLE table_name_3 (d_46_√ VARCHAR, d_44_√ VARCHAR) ### OUTPUT SELECT d_46_√ FROM table_name_3 WHERE d_44_√ = "← majority"
{ "input": "CREATE TABLE table_name_3 (d_46_√ VARCHAR, d_44_√ VARCHAR)", "instruction": "What is the D 46 √ when the D 44 √ is ← majority?", "output": "SELECT d_46_√ FROM table_name_3 WHERE d_44_√ = \"← majority\"" }
### INSTRUCTION Who's the Socialist ticket with a Law Preservation ticket of (none), and a Socialist Labor ticket of belle j. rosen? ### INPUT CREATE TABLE table_name_74 (socialist_ticket VARCHAR, law_preservation_ticket VARCHAR, socialist_labor_ticket VARCHAR) ### OUTPUT SELECT socialist_ticket FROM table_name_74 WHERE law_preservation_ticket = "(none)" AND socialist_labor_ticket = "belle j. rosen"
{ "input": "CREATE TABLE table_name_74 (socialist_ticket VARCHAR, law_preservation_ticket VARCHAR, socialist_labor_ticket VARCHAR)", "instruction": "Who's the Socialist ticket with a Law Preservation ticket of (none), and a Socialist Labor ticket of belle j. rosen?", "output": "SELECT socialist_ticket FROM table_name_74 WHERE law_preservation_ticket = \"(none)\" AND socialist_labor_ticket = \"belle j. rosen\"" }
### INSTRUCTION What are the names of countries that have both players with position forward and players with position defender? ### INPUT CREATE TABLE country (Country_name VARCHAR, Country_id VARCHAR); CREATE TABLE match_season (Country VARCHAR, Position VARCHAR) ### OUTPUT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Forward" INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Defender"
{ "input": "CREATE TABLE country (Country_name VARCHAR, Country_id VARCHAR); CREATE TABLE match_season (Country VARCHAR, Position VARCHAR)", "instruction": "What are the names of countries that have both players with position forward and players with position defender?", "output": "SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = \"Forward\" INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = \"Defender\"" }
### INSTRUCTION Who were the original artist(s) on harder to breathe? ### INPUT CREATE TABLE table_28715942_2 (original_artist VARCHAR, track VARCHAR) ### OUTPUT SELECT original_artist FROM table_28715942_2 WHERE track = "Harder To Breathe"
{ "input": "CREATE TABLE table_28715942_2 (original_artist VARCHAR, track VARCHAR)", "instruction": "Who were the original artist(s) on harder to breathe?", "output": "SELECT original_artist FROM table_28715942_2 WHERE track = \"Harder To Breathe\"" }
### INSTRUCTION What is the figure for December 28 for ang tanging ina mo (last na 'to!)? ### INPUT CREATE TABLE table_29217650_1 (december_28 VARCHAR, movies VARCHAR) ### OUTPUT SELECT december_28 FROM table_29217650_1 WHERE movies = "Ang Tanging Ina Mo (Last na 'To!)"
{ "input": "CREATE TABLE table_29217650_1 (december_28 VARCHAR, movies VARCHAR)", "instruction": "What is the figure for December 28 for ang tanging ina mo (last na 'to!)?", "output": "SELECT december_28 FROM table_29217650_1 WHERE movies = \"Ang Tanging Ina Mo (Last na 'To!)\"" }
### INSTRUCTION Which Film has a Result of nominated, and a Year of 2001? ### INPUT CREATE TABLE table_name_67 (film VARCHAR, result VARCHAR, year VARCHAR) ### OUTPUT SELECT film FROM table_name_67 WHERE result = "nominated" AND year = 2001
{ "input": "CREATE TABLE table_name_67 (film VARCHAR, result VARCHAR, year VARCHAR)", "instruction": "Which Film has a Result of nominated, and a Year of 2001?", "output": "SELECT film FROM table_name_67 WHERE result = \"nominated\" AND year = 2001" }
### INSTRUCTION Who was the director of the movie having a release date of 1934-09-15, an MM Series and a production number less than 6494? ### INPUT CREATE TABLE table_name_12 (director VARCHAR, release_date VARCHAR, series VARCHAR, production_num VARCHAR) ### OUTPUT SELECT director FROM table_name_12 WHERE series = "mm" AND production_num < 6494 AND release_date = "1934-09-15"
{ "input": "CREATE TABLE table_name_12 (director VARCHAR, release_date VARCHAR, series VARCHAR, production_num VARCHAR)", "instruction": "Who was the director of the movie having a release date of 1934-09-15, an MM Series and a production number less than 6494?", "output": "SELECT director FROM table_name_12 WHERE series = \"mm\" AND production_num < 6494 AND release_date = \"1934-09-15\"" }
### INSTRUCTION What parish did McCain have 45.37% of the votes? ### INPUT CREATE TABLE table_20722805_1 (parish VARCHAR, mccain_percentage VARCHAR) ### OUTPUT SELECT parish FROM table_20722805_1 WHERE mccain_percentage = "45.37%"
{ "input": "CREATE TABLE table_20722805_1 (parish VARCHAR, mccain_percentage VARCHAR)", "instruction": "What parish did McCain have 45.37% of the votes?", "output": "SELECT parish FROM table_20722805_1 WHERE mccain_percentage = \"45.37%\"" }
### INSTRUCTION What was the race of the jockey in na group in 4th place? ### INPUT CREATE TABLE table_name_15 (race VARCHAR, group VARCHAR, result VARCHAR) ### OUTPUT SELECT race FROM table_name_15 WHERE group = "na" AND result = "4th"
{ "input": "CREATE TABLE table_name_15 (race VARCHAR, group VARCHAR, result VARCHAR)", "instruction": "What was the race of the jockey in na group in 4th place?", "output": "SELECT race FROM table_name_15 WHERE group = \"na\" AND result = \"4th\"" }
### INSTRUCTION Name the number of complement for 4th hanoverian brigade ### INPUT CREATE TABLE table_11793221_4 (complement VARCHAR, unit VARCHAR) ### OUTPUT SELECT COUNT(complement) FROM table_11793221_4 WHERE unit = "4th Hanoverian Brigade"
{ "input": "CREATE TABLE table_11793221_4 (complement VARCHAR, unit VARCHAR)", "instruction": "Name the number of complement for 4th hanoverian brigade", "output": "SELECT COUNT(complement) FROM table_11793221_4 WHERE unit = \"4th Hanoverian Brigade\"" }
### INSTRUCTION What is Mark Joseph Kong's pick? ### INPUT CREATE TABLE table_name_15 (pick INTEGER, player VARCHAR) ### OUTPUT SELECT AVG(pick) FROM table_name_15 WHERE player = "mark joseph kong"
{ "input": "CREATE TABLE table_name_15 (pick INTEGER, player VARCHAR)", "instruction": "What is Mark Joseph Kong's pick?", "output": "SELECT AVG(pick) FROM table_name_15 WHERE player = \"mark joseph kong\"" }
### INSTRUCTION What is the nomination title used for the original film, Monsieur Hawarden? ### INPUT CREATE TABLE table_name_18 (film_title_used_in_nomination VARCHAR, original_title VARCHAR) ### OUTPUT SELECT film_title_used_in_nomination FROM table_name_18 WHERE original_title = "monsieur hawarden"
{ "input": "CREATE TABLE table_name_18 (film_title_used_in_nomination VARCHAR, original_title VARCHAR)", "instruction": "What is the nomination title used for the original film, Monsieur Hawarden?", "output": "SELECT film_title_used_in_nomination FROM table_name_18 WHERE original_title = \"monsieur hawarden\"" }
### INSTRUCTION What position did Co-driver Jackie Oliver finish in the 24 hours of Le Mans? ### INPUT CREATE TABLE table_name_39 (pos VARCHAR, race VARCHAR, co_driver VARCHAR) ### OUTPUT SELECT pos FROM table_name_39 WHERE race = "24 hours of le mans" AND co_driver = "jackie oliver"
{ "input": "CREATE TABLE table_name_39 (pos VARCHAR, race VARCHAR, co_driver VARCHAR)", "instruction": "What position did Co-driver Jackie Oliver finish in the 24 hours of Le Mans?", "output": "SELECT pos FROM table_name_39 WHERE race = \"24 hours of le mans\" AND co_driver = \"jackie oliver\"" }
### INSTRUCTION Name the most stage for alejandro valverde and astana greg henderson ### INPUT CREATE TABLE table_22713796_14 (stage INTEGER, winner VARCHAR, general_classification VARCHAR, team_classification VARCHAR) ### OUTPUT SELECT MAX(stage) FROM table_22713796_14 WHERE general_classification = "Alejandro Valverde" AND team_classification = "Astana" AND winner = "Greg Henderson"
{ "input": "CREATE TABLE table_22713796_14 (stage INTEGER, winner VARCHAR, general_classification VARCHAR, team_classification VARCHAR)", "instruction": "Name the most stage for alejandro valverde and astana greg henderson", "output": "SELECT MAX(stage) FROM table_22713796_14 WHERE general_classification = \"Alejandro Valverde\" AND team_classification = \"Astana\" AND winner = \"Greg Henderson\"" }
### INSTRUCTION What is the note section for the role with a language of hindi and a title of miley naa miley hum? ### INPUT CREATE TABLE table_name_30 (notes VARCHAR, language VARCHAR, title VARCHAR) ### OUTPUT SELECT notes FROM table_name_30 WHERE language = "hindi" AND title = "miley naa miley hum"
{ "input": "CREATE TABLE table_name_30 (notes VARCHAR, language VARCHAR, title VARCHAR)", "instruction": "What is the note section for the role with a language of hindi and a title of miley naa miley hum?", "output": "SELECT notes FROM table_name_30 WHERE language = \"hindi\" AND title = \"miley naa miley hum\"" }
### INSTRUCTION What is the description of the treatment type that costs the least money in total? ### INPUT CREATE TABLE Treatments (treatment_type_code VARCHAR); CREATE TABLE Treatment_types (treatment_type_description VARCHAR, treatment_type_code VARCHAR) ### OUTPUT SELECT T1.treatment_type_description FROM Treatment_types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code GROUP BY T1.treatment_type_code ORDER BY SUM(cost_of_treatment) LIMIT 1
{ "input": "CREATE TABLE Treatments (treatment_type_code VARCHAR); CREATE TABLE Treatment_types (treatment_type_description VARCHAR, treatment_type_code VARCHAR)", "instruction": "What is the description of the treatment type that costs the least money in total?", "output": "SELECT T1.treatment_type_description FROM Treatment_types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code GROUP BY T1.treatment_type_code ORDER BY SUM(cost_of_treatment) LIMIT 1" }
### INSTRUCTION When did Shirley Fry Irvin win the US Open? ### INPUT CREATE TABLE table_2092557_12 (us_open INTEGER, player VARCHAR) ### OUTPUT SELECT MIN(us_open) FROM table_2092557_12 WHERE player = "Shirley Fry Irvin"
{ "input": "CREATE TABLE table_2092557_12 (us_open INTEGER, player VARCHAR)", "instruction": "When did Shirley Fry Irvin win the US Open?", "output": "SELECT MIN(us_open) FROM table_2092557_12 WHERE player = \"Shirley Fry Irvin\"" }
### INSTRUCTION What is the number for years 1985-88 ### INPUT CREATE TABLE table_11545282_18 (no INTEGER, years_for_jazz VARCHAR) ### OUTPUT SELECT MIN(no) FROM table_11545282_18 WHERE years_for_jazz = "1985-88"
{ "input": "CREATE TABLE table_11545282_18 (no INTEGER, years_for_jazz VARCHAR)", "instruction": "What is the number for years 1985-88", "output": "SELECT MIN(no) FROM table_11545282_18 WHERE years_for_jazz = \"1985-88\"" }
### INSTRUCTION What is the average rank of a swimmer in lane 1? ### INPUT CREATE TABLE table_name_79 (rank INTEGER, lane VARCHAR) ### OUTPUT SELECT AVG(rank) FROM table_name_79 WHERE lane = 1
{ "input": "CREATE TABLE table_name_79 (rank INTEGER, lane VARCHAR)", "instruction": "What is the average rank of a swimmer in lane 1?", "output": "SELECT AVG(rank) FROM table_name_79 WHERE lane = 1" }
### INSTRUCTION Which episode has a Challenge Winner of berto? ### INPUT CREATE TABLE table_name_50 (episode VARCHAR, challenge_winner VARCHAR) ### OUTPUT SELECT episode FROM table_name_50 WHERE challenge_winner = "berto"
{ "input": "CREATE TABLE table_name_50 (episode VARCHAR, challenge_winner VARCHAR)", "instruction": "Which episode has a Challenge Winner of berto?", "output": "SELECT episode FROM table_name_50 WHERE challenge_winner = \"berto\"" }
### INSTRUCTION I want to know the average Gold for total smaller 12 and bronze less than 1 and wushu with silver more than 3 ### INPUT CREATE TABLE table_name_2 (gold INTEGER, silver VARCHAR, sport VARCHAR, total VARCHAR, bronze VARCHAR) ### OUTPUT SELECT AVG(gold) FROM table_name_2 WHERE total < 12 AND bronze < 1 AND sport = "wushu" AND silver > 3
{ "input": "CREATE TABLE table_name_2 (gold INTEGER, silver VARCHAR, sport VARCHAR, total VARCHAR, bronze VARCHAR)", "instruction": "I want to know the average Gold for total smaller 12 and bronze less than 1 and wushu with silver more than 3", "output": "SELECT AVG(gold) FROM table_name_2 WHERE total < 12 AND bronze < 1 AND sport = \"wushu\" AND silver > 3" }
### INSTRUCTION Who is the chairman when the current manager is bob peeters? ### INPUT CREATE TABLE table_27374004_2 (chairman VARCHAR, current_manager VARCHAR) ### OUTPUT SELECT chairman FROM table_27374004_2 WHERE current_manager = "Bob Peeters"
{ "input": "CREATE TABLE table_27374004_2 (chairman VARCHAR, current_manager VARCHAR)", "instruction": "Who is the chairman when the current manager is bob peeters?", "output": "SELECT chairman FROM table_27374004_2 WHERE current_manager = \"Bob Peeters\"" }
### INSTRUCTION What is the effective date of the claim that has the largest amount of total settlement? ### INPUT CREATE TABLE settlements (claim_id VARCHAR, settlement_amount INTEGER); CREATE TABLE claims (Effective_Date VARCHAR, claim_id VARCHAR) ### OUTPUT SELECT t1.Effective_Date FROM claims AS t1 JOIN settlements AS t2 ON t1.claim_id = t2.claim_id GROUP BY t1.claim_id ORDER BY SUM(t2.settlement_amount) DESC LIMIT 1
{ "input": "CREATE TABLE settlements (claim_id VARCHAR, settlement_amount INTEGER); CREATE TABLE claims (Effective_Date VARCHAR, claim_id VARCHAR)", "instruction": "What is the effective date of the claim that has the largest amount of total settlement?", "output": "SELECT t1.Effective_Date FROM claims AS t1 JOIN settlements AS t2 ON t1.claim_id = t2.claim_id GROUP BY t1.claim_id ORDER BY SUM(t2.settlement_amount) DESC LIMIT 1" }
### INSTRUCTION Which inhabitants have lega lombarda as the party, with an election greater than 2010? ### INPUT CREATE TABLE table_name_26 (inhabitants VARCHAR, party VARCHAR, election VARCHAR) ### OUTPUT SELECT inhabitants FROM table_name_26 WHERE party = "lega lombarda" AND election > 2010
{ "input": "CREATE TABLE table_name_26 (inhabitants VARCHAR, party VARCHAR, election VARCHAR)", "instruction": "Which inhabitants have lega lombarda as the party, with an election greater than 2010?", "output": "SELECT inhabitants FROM table_name_26 WHERE party = \"lega lombarda\" AND election > 2010" }
### INSTRUCTION What is the Total Tax Revenue that has an n.a. Stamp Duty Reserve Tax in the years 1995-96? ### INPUT CREATE TABLE table_name_75 (over_total_tax_revenue__in__percentage_ VARCHAR, stamp_duty_reserve_tax VARCHAR, year VARCHAR) ### OUTPUT SELECT over_total_tax_revenue__in__percentage_ FROM table_name_75 WHERE stamp_duty_reserve_tax = "n.a." AND year = "1995-96"
{ "input": "CREATE TABLE table_name_75 (over_total_tax_revenue__in__percentage_ VARCHAR, stamp_duty_reserve_tax VARCHAR, year VARCHAR)", "instruction": "What is the Total Tax Revenue that has an n.a. Stamp Duty Reserve Tax in the years 1995-96?", "output": "SELECT over_total_tax_revenue__in__percentage_ FROM table_name_75 WHERE stamp_duty_reserve_tax = \"n.a.\" AND year = \"1995-96\"" }
### INSTRUCTION What is the total losses against 1412, and 10 wins, but draws less than 0? ### INPUT CREATE TABLE table_name_56 (losses INTEGER, draws VARCHAR, against VARCHAR, wins VARCHAR) ### OUTPUT SELECT SUM(losses) FROM table_name_56 WHERE against > 1412 AND wins = 10 AND draws < 0
{ "input": "CREATE TABLE table_name_56 (losses INTEGER, draws VARCHAR, against VARCHAR, wins VARCHAR)", "instruction": "What is the total losses against 1412, and 10 wins, but draws less than 0?", "output": "SELECT SUM(losses) FROM table_name_56 WHERE against > 1412 AND wins = 10 AND draws < 0" }
### INSTRUCTION What is the sum of points values that are associated with 0 losses and more than 8 games? ### INPUT CREATE TABLE table_name_67 (points INTEGER, lost VARCHAR, games VARCHAR) ### OUTPUT SELECT SUM(points) FROM table_name_67 WHERE lost = 0 AND games > 8
{ "input": "CREATE TABLE table_name_67 (points INTEGER, lost VARCHAR, games VARCHAR)", "instruction": "What is the sum of points values that are associated with 0 losses and more than 8 games?", "output": "SELECT SUM(points) FROM table_name_67 WHERE lost = 0 AND games > 8" }
### INSTRUCTION What is the name of the activity that has the most faculty members involved in? ### INPUT CREATE TABLE Faculty_participates_in (actID VARCHAR); CREATE TABLE Activity (activity_name VARCHAR, actID VARCHAR) ### OUTPUT SELECT T1.activity_name FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY COUNT(*) DESC LIMIT 1
{ "input": "CREATE TABLE Faculty_participates_in (actID VARCHAR); CREATE TABLE Activity (activity_name VARCHAR, actID VARCHAR)", "instruction": "What is the name of the activity that has the most faculty members involved in?", "output": "SELECT T1.activity_name FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY COUNT(*) DESC LIMIT 1" }
### INSTRUCTION Matches W-L of 1-2, and a Team of spain had what seeding? ### INPUT CREATE TABLE table_name_41 (seeding VARCHAR, matches_w_l VARCHAR, team VARCHAR) ### OUTPUT SELECT seeding FROM table_name_41 WHERE matches_w_l = "1-2" AND team = "spain"
{ "input": "CREATE TABLE table_name_41 (seeding VARCHAR, matches_w_l VARCHAR, team VARCHAR)", "instruction": "Matches W-L of 1-2, and a Team of spain had what seeding?", "output": "SELECT seeding FROM table_name_41 WHERE matches_w_l = \"1-2\" AND team = \"spain\"" }
### INSTRUCTION What is the sum of Week when there were 67,968 people in attendance? ### INPUT CREATE TABLE table_name_66 (week INTEGER, attendance VARCHAR) ### OUTPUT SELECT SUM(week) FROM table_name_66 WHERE attendance = "67,968"
{ "input": "CREATE TABLE table_name_66 (week INTEGER, attendance VARCHAR)", "instruction": "What is the sum of Week when there were 67,968 people in attendance?", "output": "SELECT SUM(week) FROM table_name_66 WHERE attendance = \"67,968\"" }
### INSTRUCTION Which African countries have a smaller population than that of any country in Asia? ### INPUT CREATE TABLE country (Name VARCHAR, Continent VARCHAR, population INTEGER) ### OUTPUT SELECT Name FROM country WHERE Continent = "Africa" AND population < (SELECT MIN(population) FROM country WHERE Continent = "Asia")
{ "input": "CREATE TABLE country (Name VARCHAR, Continent VARCHAR, population INTEGER)", "instruction": "Which African countries have a smaller population than that of any country in Asia?", "output": "SELECT Name FROM country WHERE Continent = \"Africa\" AND population < (SELECT MIN(population) FROM country WHERE Continent = \"Asia\")" }
### INSTRUCTION What is the average year Rich Beem had a to par less than 17? ### INPUT CREATE TABLE table_name_20 (year_won INTEGER, player VARCHAR, to_par VARCHAR) ### OUTPUT SELECT AVG(year_won) FROM table_name_20 WHERE player = "rich beem" AND to_par < 17
{ "input": "CREATE TABLE table_name_20 (year_won INTEGER, player VARCHAR, to_par VARCHAR)", "instruction": "What is the average year Rich Beem had a to par less than 17?", "output": "SELECT AVG(year_won) FROM table_name_20 WHERE player = \"rich beem\" AND to_par < 17" }
### INSTRUCTION What city is the lamar tower 1, ranked above 5? ### INPUT CREATE TABLE table_name_87 (city VARCHAR, rank VARCHAR, name VARCHAR) ### OUTPUT SELECT city FROM table_name_87 WHERE rank < 5 AND name = "lamar tower 1"
{ "input": "CREATE TABLE table_name_87 (city VARCHAR, rank VARCHAR, name VARCHAR)", "instruction": "What city is the lamar tower 1, ranked above 5?", "output": "SELECT city FROM table_name_87 WHERE rank < 5 AND name = \"lamar tower 1\"" }
### INSTRUCTION What is the highest Number of seasons in Liga MX for Club cruz azul, when their season in the top division is higher than 68? ### INPUT CREATE TABLE table_name_33 (number_of_seasons_in_liga_mx INTEGER, club VARCHAR, number_of_seasons_in_top_division VARCHAR) ### OUTPUT SELECT MAX(number_of_seasons_in_liga_mx) FROM table_name_33 WHERE club = "cruz azul" AND number_of_seasons_in_top_division > 68
{ "input": "CREATE TABLE table_name_33 (number_of_seasons_in_liga_mx INTEGER, club VARCHAR, number_of_seasons_in_top_division VARCHAR)", "instruction": "What is the highest Number of seasons in Liga MX for Club cruz azul, when their season in the top division is higher than 68?", "output": "SELECT MAX(number_of_seasons_in_liga_mx) FROM table_name_33 WHERE club = \"cruz azul\" AND number_of_seasons_in_top_division > 68" }
### INSTRUCTION Who had 0 total votes in the purple team? ### INPUT CREATE TABLE table_name_18 (status VARCHAR, total_votes VARCHAR, couples_team VARCHAR) ### OUTPUT SELECT status FROM table_name_18 WHERE total_votes = "0" AND couples_team = "purple team"
{ "input": "CREATE TABLE table_name_18 (status VARCHAR, total_votes VARCHAR, couples_team VARCHAR)", "instruction": "Who had 0 total votes in the purple team?", "output": "SELECT status FROM table_name_18 WHERE total_votes = \"0\" AND couples_team = \"purple team\"" }
### INSTRUCTION What opposing team has second test as the status? ### INPUT CREATE TABLE table_name_12 (opposing_team VARCHAR, status VARCHAR) ### OUTPUT SELECT opposing_team FROM table_name_12 WHERE status = "second test"
{ "input": "CREATE TABLE table_name_12 (opposing_team VARCHAR, status VARCHAR)", "instruction": "What opposing team has second test as the status?", "output": "SELECT opposing_team FROM table_name_12 WHERE status = \"second test\"" }
### INSTRUCTION In which year did John Force win Funny Car and Mike Dunn win in Top Fuel? ### INPUT CREATE TABLE table_name_65 (year VARCHAR, funny_car VARCHAR, top_fuel VARCHAR) ### OUTPUT SELECT year FROM table_name_65 WHERE funny_car = "john force" AND top_fuel = "mike dunn"
{ "input": "CREATE TABLE table_name_65 (year VARCHAR, funny_car VARCHAR, top_fuel VARCHAR)", "instruction": "In which year did John Force win Funny Car and Mike Dunn win in Top Fuel?", "output": "SELECT year FROM table_name_65 WHERE funny_car = \"john force\" AND top_fuel = \"mike dunn\"" }
### INSTRUCTION What is the lowest enrolled school that was founded in 1992 and joined a conference before 1998? ### INPUT CREATE TABLE table_name_19 (enrollment INTEGER, founded VARCHAR, joined_conference VARCHAR) ### OUTPUT SELECT MIN(enrollment) FROM table_name_19 WHERE founded = "1992" AND joined_conference < 1998
{ "input": "CREATE TABLE table_name_19 (enrollment INTEGER, founded VARCHAR, joined_conference VARCHAR)", "instruction": "What is the lowest enrolled school that was founded in 1992 and joined a conference before 1998?", "output": "SELECT MIN(enrollment) FROM table_name_19 WHERE founded = \"1992\" AND joined_conference < 1998" }
### INSTRUCTION What pick was used to select a Defensive End in round 8? ### INPUT CREATE TABLE table_name_70 (pick INTEGER, position VARCHAR, round VARCHAR) ### OUTPUT SELECT SUM(pick) FROM table_name_70 WHERE position = "defensive end" AND round = 8
{ "input": "CREATE TABLE table_name_70 (pick INTEGER, position VARCHAR, round VARCHAR)", "instruction": "What pick was used to select a Defensive End in round 8?", "output": "SELECT SUM(pick) FROM table_name_70 WHERE position = \"defensive end\" AND round = 8" }
### INSTRUCTION What is the lowest total that has draws less than 2 and wins less than 1, losses bigger than 1 with a goal difference of 1:2 ### INPUT CREATE TABLE table_name_89 (total INTEGER, losses VARCHAR, goal_difference VARCHAR, draws VARCHAR, wins VARCHAR) ### OUTPUT SELECT MIN(total) FROM table_name_89 WHERE draws < 2 AND wins < 1 AND goal_difference = "1:2" AND losses > 1
{ "input": "CREATE TABLE table_name_89 (total INTEGER, losses VARCHAR, goal_difference VARCHAR, draws VARCHAR, wins VARCHAR)", "instruction": "What is the lowest total that has draws less than 2 and wins less than 1, losses bigger than 1 with a goal difference of 1:2", "output": "SELECT MIN(total) FROM table_name_89 WHERE draws < 2 AND wins < 1 AND goal_difference = \"1:2\" AND losses > 1" }
### INSTRUCTION What was the score on 24 February 2013? ### INPUT CREATE TABLE table_name_32 (score VARCHAR, date VARCHAR) ### OUTPUT SELECT score FROM table_name_32 WHERE date = "24 february 2013"
{ "input": "CREATE TABLE table_name_32 (score VARCHAR, date VARCHAR)", "instruction": "What was the score on 24 February 2013?", "output": "SELECT score FROM table_name_32 WHERE date = \"24 february 2013\"" }
### INSTRUCTION What's the total when the champions league was 0, the coppa italia was less than 0, and the Serie A was more than 1? ### INPUT CREATE TABLE table_name_62 (total INTEGER, coppa_italia VARCHAR, champions_league VARCHAR, serie_a VARCHAR) ### OUTPUT SELECT SUM(total) FROM table_name_62 WHERE champions_league = 0 AND serie_a > 1 AND coppa_italia < 0
{ "input": "CREATE TABLE table_name_62 (total INTEGER, coppa_italia VARCHAR, champions_league VARCHAR, serie_a VARCHAR)", "instruction": "What's the total when the champions league was 0, the coppa italia was less than 0, and the Serie A was more than 1?", "output": "SELECT SUM(total) FROM table_name_62 WHERE champions_league = 0 AND serie_a > 1 AND coppa_italia < 0" }
### INSTRUCTION When steve mcclaren is the replacer what is the manner of departure? ### INPUT CREATE TABLE table_24162080_3 (manner_of_departure VARCHAR, replaced_by VARCHAR) ### OUTPUT SELECT manner_of_departure FROM table_24162080_3 WHERE replaced_by = "Steve McClaren"
{ "input": "CREATE TABLE table_24162080_3 (manner_of_departure VARCHAR, replaced_by VARCHAR)", "instruction": "When steve mcclaren is the replacer what is the manner of departure?", "output": "SELECT manner_of_departure FROM table_24162080_3 WHERE replaced_by = \"Steve McClaren\"" }
### INSTRUCTION What was the Director with a Ceremony of 2001? ### INPUT CREATE TABLE table_name_93 (director VARCHAR, year__ceremony_ VARCHAR) ### OUTPUT SELECT director FROM table_name_93 WHERE year__ceremony_ = 2001
{ "input": "CREATE TABLE table_name_93 (director VARCHAR, year__ceremony_ VARCHAR)", "instruction": "What was the Director with a Ceremony of 2001?", "output": "SELECT director FROM table_name_93 WHERE year__ceremony_ = 2001" }
### INSTRUCTION What is the ISIN that has an amount issued of 223,000,000? ### INPUT CREATE TABLE table_21692771_1 (isin VARCHAR, amount_issued_ VARCHAR, € VARCHAR) ### OUTPUT SELECT isin FROM table_21692771_1 WHERE amount_issued_[€] = "223,000,000"
{ "input": "CREATE TABLE table_21692771_1 (isin VARCHAR, amount_issued_ VARCHAR, € VARCHAR)", "instruction": "What is the ISIN that has an amount issued of 223,000,000?", "output": "SELECT isin FROM table_21692771_1 WHERE amount_issued_[€] = \"223,000,000\"" }
### INSTRUCTION Which Pick # has a League from of ontario hockey league, a Nationality of united states, and a Team from of brampton battalion? ### INPUT CREATE TABLE table_name_61 (pick__number VARCHAR, team_from VARCHAR, league_from VARCHAR, nationality VARCHAR) ### OUTPUT SELECT COUNT(pick__number) FROM table_name_61 WHERE league_from = "ontario hockey league" AND nationality = "united states" AND team_from = "brampton battalion"
{ "input": "CREATE TABLE table_name_61 (pick__number VARCHAR, team_from VARCHAR, league_from VARCHAR, nationality VARCHAR)", "instruction": "Which Pick # has a League from of ontario hockey league, a Nationality of united states, and a Team from of brampton battalion?", "output": "SELECT COUNT(pick__number) FROM table_name_61 WHERE league_from = \"ontario hockey league\" AND nationality = \"united states\" AND team_from = \"brampton battalion\"" }
### INSTRUCTION What is the name of the shipping agent of the document with id 2? ### INPUT CREATE TABLE Documents (Id VARCHAR); CREATE TABLE Ref_Shipping_Agents (Id VARCHAR) ### OUTPUT SELECT Ref_Shipping_Agents.shipping_agent_name FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Documents.document_id = 2
{ "input": "CREATE TABLE Documents (Id VARCHAR); CREATE TABLE Ref_Shipping_Agents (Id VARCHAR)", "instruction": "What is the name of the shipping agent of the document with id 2?", "output": "SELECT Ref_Shipping_Agents.shipping_agent_name FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Documents.document_id = 2" }
### INSTRUCTION What is the most recent year that the Mineola Twins was nominated for outstanding actress in a play and a Drama Desk award? ### INPUT CREATE TABLE table_name_54 (year INTEGER, award VARCHAR, nominated_work VARCHAR, category VARCHAR) ### OUTPUT SELECT MAX(year) FROM table_name_54 WHERE nominated_work = "the mineola twins" AND category = "outstanding actress in a play" AND award = "drama desk award"
{ "input": "CREATE TABLE table_name_54 (year INTEGER, award VARCHAR, nominated_work VARCHAR, category VARCHAR)", "instruction": "What is the most recent year that the Mineola Twins was nominated for outstanding actress in a play and a Drama Desk award?", "output": "SELECT MAX(year) FROM table_name_54 WHERE nominated_work = \"the mineola twins\" AND category = \"outstanding actress in a play\" AND award = \"drama desk award\"" }
### INSTRUCTION Show names of shops and the carriers of devices they have in stock. ### INPUT CREATE TABLE shop (Shop_Name VARCHAR, Shop_ID VARCHAR); CREATE TABLE stock (Device_ID VARCHAR, Shop_ID VARCHAR); CREATE TABLE device (Carrier VARCHAR, Device_ID VARCHAR) ### OUTPUT SELECT T3.Shop_Name, T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID
{ "input": "CREATE TABLE shop (Shop_Name VARCHAR, Shop_ID VARCHAR); CREATE TABLE stock (Device_ID VARCHAR, Shop_ID VARCHAR); CREATE TABLE device (Carrier VARCHAR, Device_ID VARCHAR)", "instruction": "Show names of shops and the carriers of devices they have in stock.", "output": "SELECT T3.Shop_Name, T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID" }
### INSTRUCTION What is the venue of the game that was played on 23 October 1966? ### INPUT CREATE TABLE table_name_41 (venue VARCHAR, date VARCHAR) ### OUTPUT SELECT venue FROM table_name_41 WHERE date = "23 october 1966"
{ "input": "CREATE TABLE table_name_41 (venue VARCHAR, date VARCHAR)", "instruction": "What is the venue of the game that was played on 23 October 1966?", "output": "SELECT venue FROM table_name_41 WHERE date = \"23 october 1966\"" }
### INSTRUCTION How many division titles are there when the win pc is .558? ### INPUT CREATE TABLE table_19451173_1 (division_titles VARCHAR, win_pct VARCHAR) ### OUTPUT SELECT division_titles FROM table_19451173_1 WHERE win_pct = ".558"
{ "input": "CREATE TABLE table_19451173_1 (division_titles VARCHAR, win_pct VARCHAR)", "instruction": "How many division titles are there when the win pc is .558?", "output": "SELECT division_titles FROM table_19451173_1 WHERE win_pct = \".558\"" }
### INSTRUCTION What is the date construction is completed in Jo Daviess county? ### INPUT CREATE TABLE table_name_70 (construction_completed VARCHAR, county VARCHAR) ### OUTPUT SELECT construction_completed FROM table_name_70 WHERE county = "jo daviess"
{ "input": "CREATE TABLE table_name_70 (construction_completed VARCHAR, county VARCHAR)", "instruction": "What is the date construction is completed in Jo Daviess county?", "output": "SELECT construction_completed FROM table_name_70 WHERE county = \"jo daviess\"" }
### INSTRUCTION How many people at Arden Street Oval? ### INPUT CREATE TABLE table_name_21 (crowd VARCHAR, venue VARCHAR) ### OUTPUT SELECT COUNT(crowd) FROM table_name_21 WHERE venue = "arden street oval"
{ "input": "CREATE TABLE table_name_21 (crowd VARCHAR, venue VARCHAR)", "instruction": "How many people at Arden Street Oval?", "output": "SELECT COUNT(crowd) FROM table_name_21 WHERE venue = \"arden street oval\"" }
### INSTRUCTION what's the time required for prices to double with highest monthly inflation rate being 29,500% ### INPUT CREATE TABLE table_13681_2 (time_required_for_prices_to_double VARCHAR, highest_monthly_inflation_rate VARCHAR) ### OUTPUT SELECT time_required_for_prices_to_double FROM table_13681_2 WHERE highest_monthly_inflation_rate = "29,500%"
{ "input": "CREATE TABLE table_13681_2 (time_required_for_prices_to_double VARCHAR, highest_monthly_inflation_rate VARCHAR)", "instruction": "what's the time required for prices to double with highest monthly inflation rate being 29,500%", "output": "SELECT time_required_for_prices_to_double FROM table_13681_2 WHERE highest_monthly_inflation_rate = \"29,500%\"" }
### INSTRUCTION Find names of instructors with salary greater than that of some (at least one) instructor in the Biology department. ### INPUT CREATE TABLE instructor (name VARCHAR, salary INTEGER, dept_name VARCHAR) ### OUTPUT SELECT name FROM instructor WHERE salary > (SELECT MIN(salary) FROM instructor WHERE dept_name = 'Biology')
{ "input": "CREATE TABLE instructor (name VARCHAR, salary INTEGER, dept_name VARCHAR)", "instruction": "Find names of instructors with salary greater than that of some (at least one) instructor in the Biology department.", "output": "SELECT name FROM instructor WHERE salary > (SELECT MIN(salary) FROM instructor WHERE dept_name = 'Biology')" }
### INSTRUCTION Find all the ids and dates of the logs for the problem whose id is 10. ### INPUT CREATE TABLE problem_log (problem_log_id VARCHAR, log_entry_date VARCHAR, problem_id VARCHAR) ### OUTPUT SELECT problem_log_id, log_entry_date FROM problem_log WHERE problem_id = 10
{ "input": "CREATE TABLE problem_log (problem_log_id VARCHAR, log_entry_date VARCHAR, problem_id VARCHAR)", "instruction": "Find all the ids and dates of the logs for the problem whose id is 10.", "output": "SELECT problem_log_id, log_entry_date FROM problem_log WHERE problem_id = 10" }
### INSTRUCTION How many points are there with more losses than 16, more goals than 44, and a smaller position than 13? ### INPUT CREATE TABLE table_name_99 (points VARCHAR, position VARCHAR, loses VARCHAR, goals_scored VARCHAR) ### OUTPUT SELECT COUNT(points) FROM table_name_99 WHERE loses > 16 AND goals_scored > 44 AND position < 13
{ "input": "CREATE TABLE table_name_99 (points VARCHAR, position VARCHAR, loses VARCHAR, goals_scored VARCHAR)", "instruction": "How many points are there with more losses than 16, more goals than 44, and a smaller position than 13?", "output": "SELECT COUNT(points) FROM table_name_99 WHERE loses > 16 AND goals_scored > 44 AND position < 13" }
### INSTRUCTION What are the distinct address type codes for all customer addresses? ### INPUT CREATE TABLE customer_addresses (address_type_code VARCHAR) ### OUTPUT SELECT DISTINCT address_type_code FROM customer_addresses
{ "input": "CREATE TABLE customer_addresses (address_type_code VARCHAR)", "instruction": "What are the distinct address type codes for all customer addresses?", "output": "SELECT DISTINCT address_type_code FROM customer_addresses" }
### INSTRUCTION What is Result, when Director is Mirza Idrizović category:articles with hcards? ### INPUT CREATE TABLE table_name_78 (result VARCHAR, director VARCHAR) ### OUTPUT SELECT result FROM table_name_78 WHERE director = "mirza idrizović category:articles with hcards"
{ "input": "CREATE TABLE table_name_78 (result VARCHAR, director VARCHAR)", "instruction": "What is Result, when Director is Mirza Idrizović category:articles with hcards?", "output": "SELECT result FROM table_name_78 WHERE director = \"mirza idrizović category:articles with hcards\"" }
### INSTRUCTION How many different horse-powers does the Cochrane have? ### INPUT CREATE TABLE table_23614702_1 (horse__power VARCHAR, warship VARCHAR) ### OUTPUT SELECT COUNT(horse__power) FROM table_23614702_1 WHERE warship = "Cochrane"
{ "input": "CREATE TABLE table_23614702_1 (horse__power VARCHAR, warship VARCHAR)", "instruction": "How many different horse-powers does the Cochrane have?", "output": "SELECT COUNT(horse__power) FROM table_23614702_1 WHERE warship = \"Cochrane\"" }