text
stringlengths 147
1.06k
| source
dict |
---|---|
### INSTRUCTION
Are the customers holding coupons with amount 500 bad or good?
### INPUT
CREATE TABLE discount_coupons (coupon_id VARCHAR, coupon_amount VARCHAR); CREATE TABLE customers (good_or_bad_customer VARCHAR, coupon_id VARCHAR)
### OUTPUT
SELECT T1.good_or_bad_customer FROM customers AS T1 JOIN discount_coupons AS T2 ON T1.coupon_id = T2.coupon_id WHERE T2.coupon_amount = 500 | {
"input": "CREATE TABLE discount_coupons (coupon_id VARCHAR, coupon_amount VARCHAR); CREATE TABLE customers (good_or_bad_customer VARCHAR, coupon_id VARCHAR)",
"instruction": "Are the customers holding coupons with amount 500 bad or good?",
"output": "SELECT T1.good_or_bad_customer FROM customers AS T1 JOIN discount_coupons AS T2 ON T1.coupon_id = T2.coupon_id WHERE T2.coupon_amount = 500"
} |
### INSTRUCTION
What was the team from Austria when the Netherlands sent Brunssum/Schinnen LL Brunssum and Belgium sent Shape and Waterloo LL Brussels?
### INPUT
CREATE TABLE table_28562675_3 (austria VARCHAR, netherlands VARCHAR, belgium VARCHAR)
### OUTPUT
SELECT austria FROM table_28562675_3 WHERE netherlands = "Brunssum/Schinnen LL Brunssum" AND belgium = "SHAPE and Waterloo LL Brussels" | {
"input": "CREATE TABLE table_28562675_3 (austria VARCHAR, netherlands VARCHAR, belgium VARCHAR)",
"instruction": "What was the team from Austria when the Netherlands sent Brunssum/Schinnen LL Brunssum and Belgium sent Shape and Waterloo LL Brussels?",
"output": "SELECT austria FROM table_28562675_3 WHERE netherlands = \"Brunssum/Schinnen LL Brunssum\" AND belgium = \"SHAPE and Waterloo LL Brussels\""
} |
### INSTRUCTION
what is the date when the venue is gold coast convention centre?
### INPUT
CREATE TABLE table_name_70 (date VARCHAR, venue VARCHAR)
### OUTPUT
SELECT date FROM table_name_70 WHERE venue = "gold coast convention centre" | {
"input": "CREATE TABLE table_name_70 (date VARCHAR, venue VARCHAR)",
"instruction": "what is the date when the venue is gold coast convention centre?",
"output": "SELECT date FROM table_name_70 WHERE venue = \"gold coast convention centre\""
} |
### INSTRUCTION
Who was the participant or recipient for the Best Female Actor?
### INPUT
CREATE TABLE table_26282750_1 (participants_recipients VARCHAR, category VARCHAR)
### OUTPUT
SELECT participants_recipients FROM table_26282750_1 WHERE category = "Best Female Actor" | {
"input": "CREATE TABLE table_26282750_1 (participants_recipients VARCHAR, category VARCHAR)",
"instruction": "Who was the participant or recipient for the Best Female Actor?",
"output": "SELECT participants_recipients FROM table_26282750_1 WHERE category = \"Best Female Actor\""
} |
### INSTRUCTION
Which Production in 2009 had a Result of Nominated at the Helpmann awards Award Ceremony?
### INPUT
CREATE TABLE table_name_67 (production VARCHAR, award_ceremony VARCHAR, result VARCHAR, year VARCHAR)
### OUTPUT
SELECT production FROM table_name_67 WHERE result = "nominated" AND year = 2009 AND award_ceremony = "helpmann awards" | {
"input": "CREATE TABLE table_name_67 (production VARCHAR, award_ceremony VARCHAR, result VARCHAR, year VARCHAR)",
"instruction": "Which Production in 2009 had a Result of Nominated at the Helpmann awards Award Ceremony?",
"output": "SELECT production FROM table_name_67 WHERE result = \"nominated\" AND year = 2009 AND award_ceremony = \"helpmann awards\""
} |
### INSTRUCTION
Where is the home ground for the club coached by nick pantsaras and founded before 1946?
### INPUT
CREATE TABLE table_name_48 (home_ground VARCHAR, founded VARCHAR, coach VARCHAR)
### OUTPUT
SELECT home_ground FROM table_name_48 WHERE founded < 1946 AND coach = "nick pantsaras" | {
"input": "CREATE TABLE table_name_48 (home_ground VARCHAR, founded VARCHAR, coach VARCHAR)",
"instruction": "Where is the home ground for the club coached by nick pantsaras and founded before 1946?",
"output": "SELECT home_ground FROM table_name_48 WHERE founded < 1946 AND coach = \"nick pantsaras\""
} |
### INSTRUCTION
Name the population density people where population % eu for 1.7%
### INPUT
CREATE TABLE table_1606824_1 (pop_density_people_km_2 VARCHAR, population__percentage_of_eu VARCHAR)
### OUTPUT
SELECT COUNT(pop_density_people_km_2) FROM table_1606824_1 WHERE population__percentage_of_eu = "1.7%" | {
"input": "CREATE TABLE table_1606824_1 (pop_density_people_km_2 VARCHAR, population__percentage_of_eu VARCHAR)",
"instruction": "Name the population density people where population % eu for 1.7%",
"output": "SELECT COUNT(pop_density_people_km_2) FROM table_1606824_1 WHERE population__percentage_of_eu = \"1.7%\""
} |
### INSTRUCTION
Find the emails of customers who has filed a complaints of the product with the most complaints.
### INPUT
CREATE TABLE customers (email_address VARCHAR, customer_id VARCHAR); CREATE TABLE complaints (customer_id VARCHAR)
### OUTPUT
SELECT t1.email_address FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_id ORDER BY COUNT(*) LIMIT 1 | {
"input": "CREATE TABLE customers (email_address VARCHAR, customer_id VARCHAR); CREATE TABLE complaints (customer_id VARCHAR)",
"instruction": "Find the emails of customers who has filed a complaints of the product with the most complaints.",
"output": "SELECT t1.email_address FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_id ORDER BY COUNT(*) LIMIT 1"
} |
### INSTRUCTION
What is the sum of balls faced associated with a strike rate over 48.28, 3 innings, and an average under 5?
### INPUT
CREATE TABLE table_name_99 (balls_faced INTEGER, average VARCHAR, sr VARCHAR, innings VARCHAR)
### OUTPUT
SELECT SUM(balls_faced) FROM table_name_99 WHERE sr > 48.28 AND innings = 3 AND average < 5 | {
"input": "CREATE TABLE table_name_99 (balls_faced INTEGER, average VARCHAR, sr VARCHAR, innings VARCHAR)",
"instruction": "What is the sum of balls faced associated with a strike rate over 48.28, 3 innings, and an average under 5?",
"output": "SELECT SUM(balls_faced) FROM table_name_99 WHERE sr > 48.28 AND innings = 3 AND average < 5"
} |
### INSTRUCTION
List the number of locations for the team known as the billikens.
### INPUT
CREATE TABLE table_2419754_1 (location VARCHAR, nickname VARCHAR)
### OUTPUT
SELECT COUNT(location) FROM table_2419754_1 WHERE nickname = "Billikens" | {
"input": "CREATE TABLE table_2419754_1 (location VARCHAR, nickname VARCHAR)",
"instruction": "List the number of locations for the team known as the billikens.",
"output": "SELECT COUNT(location) FROM table_2419754_1 WHERE nickname = \"Billikens\""
} |
### INSTRUCTION
What is the highest value for 1970, when the value for 1960 is less than 61.9, when the value for 1980 is less than 3.8, when the value for 1990 is 3.3, and when the value for 2000 is greater than 3.2?
### INPUT
CREATE TABLE table_name_81 (Id VARCHAR)
### OUTPUT
SELECT MAX(1970) FROM table_name_81 WHERE 1960 < 61.9 AND 1980 < 3.8 AND 1990 = 3.3 AND 2000 > 3.2 | {
"input": "CREATE TABLE table_name_81 (Id VARCHAR)",
"instruction": "What is the highest value for 1970, when the value for 1960 is less than 61.9, when the value for 1980 is less than 3.8, when the value for 1990 is 3.3, and when the value for 2000 is greater than 3.2?",
"output": "SELECT MAX(1970) FROM table_name_81 WHERE 1960 < 61.9 AND 1980 < 3.8 AND 1990 = 3.3 AND 2000 > 3.2"
} |
### INSTRUCTION
Which acquisition via has a position of forward and is on the state school or club?
### INPUT
CREATE TABLE table_name_79 (acquisition_via VARCHAR, position VARCHAR, school_club_team VARCHAR)
### OUTPUT
SELECT acquisition_via FROM table_name_79 WHERE position = "forward" AND school_club_team = "state" | {
"input": "CREATE TABLE table_name_79 (acquisition_via VARCHAR, position VARCHAR, school_club_team VARCHAR)",
"instruction": "Which acquisition via has a position of forward and is on the state school or club?",
"output": "SELECT acquisition_via FROM table_name_79 WHERE position = \"forward\" AND school_club_team = \"state\""
} |
### INSTRUCTION
who had all the high rebounds when high assists is by dwyane wade (9)
### INPUT
CREATE TABLE table_13762472_4 (high_rebounds VARCHAR, high_assists VARCHAR)
### OUTPUT
SELECT high_rebounds FROM table_13762472_4 WHERE high_assists = "Dwyane Wade (9)" | {
"input": "CREATE TABLE table_13762472_4 (high_rebounds VARCHAR, high_assists VARCHAR)",
"instruction": "who had all the high rebounds when high assists is by dwyane wade (9)",
"output": "SELECT high_rebounds FROM table_13762472_4 WHERE high_assists = \"Dwyane Wade (9)\""
} |
### INSTRUCTION
What were the results of the mens open when the womens 40 was Sydney Scorpions defeated Hunter Hornets?
### INPUT
CREATE TABLE table_16724844_1 (mens_open VARCHAR, womens_40 VARCHAR)
### OUTPUT
SELECT mens_open FROM table_16724844_1 WHERE womens_40 = "Sydney Scorpions defeated Hunter Hornets" | {
"input": "CREATE TABLE table_16724844_1 (mens_open VARCHAR, womens_40 VARCHAR)",
"instruction": "What were the results of the mens open when the womens 40 was Sydney Scorpions defeated Hunter Hornets?",
"output": "SELECT mens_open FROM table_16724844_1 WHERE womens_40 = \"Sydney Scorpions defeated Hunter Hornets\""
} |
### INSTRUCTION
After 1986, how many Wins did Lucky Strike Yamaha Team with less than 6 Points have?
### INPUT
CREATE TABLE table_name_51 (wins INTEGER, points VARCHAR, year VARCHAR, team VARCHAR)
### OUTPUT
SELECT MIN(wins) FROM table_name_51 WHERE year > 1986 AND team = "lucky strike yamaha" AND points < 6 | {
"input": "CREATE TABLE table_name_51 (wins INTEGER, points VARCHAR, year VARCHAR, team VARCHAR)",
"instruction": "After 1986, how many Wins did Lucky Strike Yamaha Team with less than 6 Points have?",
"output": "SELECT MIN(wins) FROM table_name_51 WHERE year > 1986 AND team = \"lucky strike yamaha\" AND points < 6"
} |
### INSTRUCTION
What is the party of the representative that has the smallest number of votes.
### INPUT
CREATE TABLE representative (Party VARCHAR, Representative_ID VARCHAR); CREATE TABLE election (Representative_ID VARCHAR)
### OUTPUT
SELECT T2.Party FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes LIMIT 1 | {
"input": "CREATE TABLE representative (Party VARCHAR, Representative_ID VARCHAR); CREATE TABLE election (Representative_ID VARCHAR)",
"instruction": "What is the party of the representative that has the smallest number of votes.",
"output": "SELECT T2.Party FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes LIMIT 1"
} |
### INSTRUCTION
Name the catalog for alfa records and cd format
### INPUT
CREATE TABLE table_name_84 (catalog VARCHAR, label VARCHAR, format VARCHAR)
### OUTPUT
SELECT catalog FROM table_name_84 WHERE label = "alfa records" AND format = "cd" | {
"input": "CREATE TABLE table_name_84 (catalog VARCHAR, label VARCHAR, format VARCHAR)",
"instruction": "Name the catalog for alfa records and cd format",
"output": "SELECT catalog FROM table_name_84 WHERE label = \"alfa records\" AND format = \"cd\""
} |
### INSTRUCTION
What group had 29 studio albums?
### INPUT
CREATE TABLE table_19439814_1 (girl_group VARCHAR, studio_albums VARCHAR)
### OUTPUT
SELECT girl_group FROM table_19439814_1 WHERE studio_albums = 29 | {
"input": "CREATE TABLE table_19439814_1 (girl_group VARCHAR, studio_albums VARCHAR)",
"instruction": "What group had 29 studio albums?",
"output": "SELECT girl_group FROM table_19439814_1 WHERE studio_albums = 29"
} |
### INSTRUCTION
What is every code and location where the launch site condition and owner is obliterated?
### INPUT
CREATE TABLE table_22282917_26 (code_ VARCHAR, _location VARCHAR, launch_site_condition_owner VARCHAR)
### OUTPUT
SELECT code_ & _location FROM table_22282917_26 WHERE launch_site_condition_owner = "Obliterated" | {
"input": "CREATE TABLE table_22282917_26 (code_ VARCHAR, _location VARCHAR, launch_site_condition_owner VARCHAR)",
"instruction": "What is every code and location where the launch site condition and owner is obliterated?",
"output": "SELECT code_ & _location FROM table_22282917_26 WHERE launch_site_condition_owner = \"Obliterated\""
} |
### INSTRUCTION
What were all the points for Tonyrefail RFC?
### INPUT
CREATE TABLE table_13564637_5 (points_for VARCHAR, club VARCHAR)
### OUTPUT
SELECT points_for FROM table_13564637_5 WHERE club = "Tonyrefail RFC" | {
"input": "CREATE TABLE table_13564637_5 (points_for VARCHAR, club VARCHAR)",
"instruction": "What were all the points for Tonyrefail RFC?",
"output": "SELECT points_for FROM table_13564637_5 WHERE club = \"Tonyrefail RFC\""
} |
### INSTRUCTION
What is the total quantity of products purchased by "Rodrick Heaney"?
### INPUT
CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE order_items (order_quantity INTEGER, order_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR)
### OUTPUT
SELECT SUM(t3.order_quantity) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = "Rodrick Heaney" | {
"input": "CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE order_items (order_quantity INTEGER, order_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR)",
"instruction": "What is the total quantity of products purchased by \"Rodrick Heaney\"?",
"output": "SELECT SUM(t3.order_quantity) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = \"Rodrick Heaney\""
} |
### INSTRUCTION
What is the position of the player whose college is Western Kentucky?
### INPUT
CREATE TABLE table_14650162_1 (position VARCHAR, college VARCHAR)
### OUTPUT
SELECT position FROM table_14650162_1 WHERE college = "Western Kentucky" | {
"input": "CREATE TABLE table_14650162_1 (position VARCHAR, college VARCHAR)",
"instruction": "What is the position of the player whose college is Western Kentucky?",
"output": "SELECT position FROM table_14650162_1 WHERE college = \"Western Kentucky\""
} |
### INSTRUCTION
what's the incumbent with result being new seat republican gain
### INPUT
CREATE TABLE table_1342256_6 (incumbent VARCHAR, result VARCHAR)
### OUTPUT
SELECT incumbent FROM table_1342256_6 WHERE result = "New seat Republican gain" | {
"input": "CREATE TABLE table_1342256_6 (incumbent VARCHAR, result VARCHAR)",
"instruction": "what's the incumbent with result being new seat republican gain",
"output": "SELECT incumbent FROM table_1342256_6 WHERE result = \"New seat Republican gain\""
} |
### INSTRUCTION
Who drove the fastest lap at the Tenneco Automotive Grand Prix of Detroit?
### INPUT
CREATE TABLE table_11056278_3 (fastest_lap VARCHAR, race_name VARCHAR)
### OUTPUT
SELECT fastest_lap FROM table_11056278_3 WHERE race_name = "Tenneco Automotive Grand Prix of Detroit" | {
"input": "CREATE TABLE table_11056278_3 (fastest_lap VARCHAR, race_name VARCHAR)",
"instruction": "Who drove the fastest lap at the Tenneco Automotive Grand Prix of Detroit?",
"output": "SELECT fastest_lap FROM table_11056278_3 WHERE race_name = \"Tenneco Automotive Grand Prix of Detroit\""
} |
### INSTRUCTION
What is the class of the qb, Josh Riddell?
### INPUT
CREATE TABLE table_name_45 (class VARCHAR, position VARCHAR, name VARCHAR)
### OUTPUT
SELECT class FROM table_name_45 WHERE position = "qb" AND name = "josh riddell" | {
"input": "CREATE TABLE table_name_45 (class VARCHAR, position VARCHAR, name VARCHAR)",
"instruction": "What is the class of the qb, Josh Riddell?",
"output": "SELECT class FROM table_name_45 WHERE position = \"qb\" AND name = \"josh riddell\""
} |
### INSTRUCTION
What is the lowest round Trinity school was drafted with an overall higher than 21?
### INPUT
CREATE TABLE table_name_89 (round INTEGER, school_club_team VARCHAR, overall VARCHAR)
### OUTPUT
SELECT MIN(round) FROM table_name_89 WHERE school_club_team = "trinity" AND overall < 21 | {
"input": "CREATE TABLE table_name_89 (round INTEGER, school_club_team VARCHAR, overall VARCHAR)",
"instruction": "What is the lowest round Trinity school was drafted with an overall higher than 21?",
"output": "SELECT MIN(round) FROM table_name_89 WHERE school_club_team = \"trinity\" AND overall < 21"
} |
### INSTRUCTION
What Score has a Date of 11 september 2010?
### INPUT
CREATE TABLE table_name_25 (score VARCHAR, date VARCHAR)
### OUTPUT
SELECT score FROM table_name_25 WHERE date = "11 september 2010" | {
"input": "CREATE TABLE table_name_25 (score VARCHAR, date VARCHAR)",
"instruction": "What Score has a Date of 11 september 2010?",
"output": "SELECT score FROM table_name_25 WHERE date = \"11 september 2010\""
} |
### INSTRUCTION
Which title aired on 18 dec 2006- 10 feb 2007?
### INPUT
CREATE TABLE table_name_67 (english_title__chinese_title_ VARCHAR, airing_date VARCHAR)
### OUTPUT
SELECT english_title__chinese_title_ FROM table_name_67 WHERE airing_date = "18 dec 2006- 10 feb 2007" | {
"input": "CREATE TABLE table_name_67 (english_title__chinese_title_ VARCHAR, airing_date VARCHAR)",
"instruction": "Which title aired on 18 dec 2006- 10 feb 2007?",
"output": "SELECT english_title__chinese_title_ FROM table_name_67 WHERE airing_date = \"18 dec 2006- 10 feb 2007\""
} |
### INSTRUCTION
What was the airdate of the episode that was directed by giancarlo volpe and written by is john o'bryan?
### INPUT
CREATE TABLE table_14562722_1 (original_air_date VARCHAR, directed_by VARCHAR, written_by VARCHAR)
### OUTPUT
SELECT original_air_date FROM table_14562722_1 WHERE directed_by = "Giancarlo Volpe" AND written_by = "John O'Bryan" | {
"input": "CREATE TABLE table_14562722_1 (original_air_date VARCHAR, directed_by VARCHAR, written_by VARCHAR)",
"instruction": "What was the airdate of the episode that was directed by giancarlo volpe and written by is john o'bryan?",
"output": "SELECT original_air_date FROM table_14562722_1 WHERE directed_by = \"Giancarlo Volpe\" AND written_by = \"John O'Bryan\""
} |
### INSTRUCTION
What was the location that had an accident by the F-27-600RF aircraft with tail number 6O-SAZ?
### INPUT
CREATE TABLE table_name_42 (location VARCHAR, aircraft VARCHAR, tail_number VARCHAR)
### OUTPUT
SELECT location FROM table_name_42 WHERE aircraft = "f-27-600rf" AND tail_number = "6o-saz" | {
"input": "CREATE TABLE table_name_42 (location VARCHAR, aircraft VARCHAR, tail_number VARCHAR)",
"instruction": "What was the location that had an accident by the F-27-600RF aircraft with tail number 6O-SAZ?",
"output": "SELECT location FROM table_name_42 WHERE aircraft = \"f-27-600rf\" AND tail_number = \"6o-saz\""
} |
### INSTRUCTION
Who won the FIS Nordic World Ski Championships in 1972?
### INPUT
CREATE TABLE table_name_4 (winner VARCHAR, fis_nordic_world_ski_championships VARCHAR)
### OUTPUT
SELECT winner FROM table_name_4 WHERE fis_nordic_world_ski_championships = "1972" | {
"input": "CREATE TABLE table_name_4 (winner VARCHAR, fis_nordic_world_ski_championships VARCHAR)",
"instruction": "Who won the FIS Nordic World Ski Championships in 1972?",
"output": "SELECT winner FROM table_name_4 WHERE fis_nordic_world_ski_championships = \"1972\""
} |
### INSTRUCTION
What is the womens singles of marcus ellis gabrielle white?
### INPUT
CREATE TABLE table_12104319_1 (womens_singles VARCHAR, mixed_doubles VARCHAR)
### OUTPUT
SELECT womens_singles FROM table_12104319_1 WHERE mixed_doubles = "Marcus Ellis Gabrielle White" | {
"input": "CREATE TABLE table_12104319_1 (womens_singles VARCHAR, mixed_doubles VARCHAR)",
"instruction": "What is the womens singles of marcus ellis gabrielle white?",
"output": "SELECT womens_singles FROM table_12104319_1 WHERE mixed_doubles = \"Marcus Ellis Gabrielle White\""
} |
### INSTRUCTION
When did Linda Smith visit Subway?
### INPUT
CREATE TABLE Restaurant (TIME VARCHAR); CREATE TABLE Visits_Restaurant (TIME VARCHAR); CREATE TABLE Student (TIME VARCHAR)
### OUTPUT
SELECT TIME FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID WHERE Student.Fname = "Linda" AND Student.Lname = "Smith" AND Restaurant.ResName = "Subway" | {
"input": "CREATE TABLE Restaurant (TIME VARCHAR); CREATE TABLE Visits_Restaurant (TIME VARCHAR); CREATE TABLE Student (TIME VARCHAR)",
"instruction": "When did Linda Smith visit Subway?",
"output": "SELECT TIME FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID WHERE Student.Fname = \"Linda\" AND Student.Lname = \"Smith\" AND Restaurant.ResName = \"Subway\""
} |
### INSTRUCTION
Show all company names and headquarters in the descending order of market value.
### INPUT
CREATE TABLE company (company VARCHAR, headquarters VARCHAR, market_value VARCHAR)
### OUTPUT
SELECT company, headquarters FROM company ORDER BY market_value DESC | {
"input": "CREATE TABLE company (company VARCHAR, headquarters VARCHAR, market_value VARCHAR)",
"instruction": "Show all company names and headquarters in the descending order of market value.",
"output": "SELECT company, headquarters FROM company ORDER BY market_value DESC"
} |
### INSTRUCTION
List the name and date the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta'
### INPUT
CREATE TABLE ship (lost_in_battle VARCHAR, name VARCHAR); CREATE TABLE battle (name VARCHAR, date VARCHAR, id VARCHAR)
### OUTPUT
SELECT T1.name, T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'Lettice' INTERSECT SELECT T1.name, T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'HMS Atalanta' | {
"input": "CREATE TABLE ship (lost_in_battle VARCHAR, name VARCHAR); CREATE TABLE battle (name VARCHAR, date VARCHAR, id VARCHAR)",
"instruction": "List the name and date the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta'",
"output": "SELECT T1.name, T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'Lettice' INTERSECT SELECT T1.name, T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'HMS Atalanta'"
} |
### INSTRUCTION
Which treasurer has a President of sebastian ihler?
### INPUT
CREATE TABLE table_name_74 (treasurer VARCHAR, president VARCHAR)
### OUTPUT
SELECT treasurer FROM table_name_74 WHERE president = "sebastian ihler" | {
"input": "CREATE TABLE table_name_74 (treasurer VARCHAR, president VARCHAR)",
"instruction": "Which treasurer has a President of sebastian ihler?",
"output": "SELECT treasurer FROM table_name_74 WHERE president = \"sebastian ihler\""
} |
### INSTRUCTION
What is the acronym used for Beirut Arab University?
### INPUT
CREATE TABLE table_1160660_1 (acronym VARCHAR, university_name VARCHAR)
### OUTPUT
SELECT acronym FROM table_1160660_1 WHERE university_name = "Beirut Arab University" | {
"input": "CREATE TABLE table_1160660_1 (acronym VARCHAR, university_name VARCHAR)",
"instruction": "What is the acronym used for Beirut Arab University?",
"output": "SELECT acronym FROM table_1160660_1 WHERE university_name = \"Beirut Arab University\""
} |
### INSTRUCTION
What was the number of season number entries that had US Viewers of 12.30 million?
### INPUT
CREATE TABLE table_21781578_2 (season_no VARCHAR, us_viewers__millions_ VARCHAR)
### OUTPUT
SELECT COUNT(season_no) FROM table_21781578_2 WHERE us_viewers__millions_ = "12.30" | {
"input": "CREATE TABLE table_21781578_2 (season_no VARCHAR, us_viewers__millions_ VARCHAR)",
"instruction": "What was the number of season number entries that had US Viewers of 12.30 million?",
"output": "SELECT COUNT(season_no) FROM table_21781578_2 WHERE us_viewers__millions_ = \"12.30\""
} |
### INSTRUCTION
What is the document type name for the document with name "How to read a book"?
### INPUT
CREATE TABLE Ref_document_types (document_type_name VARCHAR, document_type_code VARCHAR); CREATE TABLE All_documents (document_type_code VARCHAR, document_name VARCHAR)
### OUTPUT
SELECT T2.document_type_name FROM All_documents AS T1 JOIN Ref_document_types AS T2 ON T1.document_type_code = T2.document_type_code WHERE T1.document_name = "How to read a book" | {
"input": "CREATE TABLE Ref_document_types (document_type_name VARCHAR, document_type_code VARCHAR); CREATE TABLE All_documents (document_type_code VARCHAR, document_name VARCHAR)",
"instruction": "What is the document type name for the document with name \"How to read a book\"?",
"output": "SELECT T2.document_type_name FROM All_documents AS T1 JOIN Ref_document_types AS T2 ON T1.document_type_code = T2.document_type_code WHERE T1.document_name = \"How to read a book\""
} |
### INSTRUCTION
Which time has a Rank larger than 3, and a Name of andrey kapralov?
### INPUT
CREATE TABLE table_name_31 (time VARCHAR, rank VARCHAR, name VARCHAR)
### OUTPUT
SELECT time FROM table_name_31 WHERE rank > 3 AND name = "andrey kapralov" | {
"input": "CREATE TABLE table_name_31 (time VARCHAR, rank VARCHAR, name VARCHAR)",
"instruction": "Which time has a Rank larger than 3, and a Name of andrey kapralov?",
"output": "SELECT time FROM table_name_31 WHERE rank > 3 AND name = \"andrey kapralov\""
} |
### INSTRUCTION
What are the birth date and birth place of the body builder with the highest total points?
### INPUT
CREATE TABLE body_builder (People_ID VARCHAR, Total VARCHAR); CREATE TABLE people (Birth_Date VARCHAR, Birth_Place VARCHAR, People_ID VARCHAR)
### OUTPUT
SELECT T2.Birth_Date, T2.Birth_Place FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC LIMIT 1 | {
"input": "CREATE TABLE body_builder (People_ID VARCHAR, Total VARCHAR); CREATE TABLE people (Birth_Date VARCHAR, Birth_Place VARCHAR, People_ID VARCHAR)",
"instruction": "What are the birth date and birth place of the body builder with the highest total points?",
"output": "SELECT T2.Birth_Date, T2.Birth_Place FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC LIMIT 1"
} |
### INSTRUCTION
What is the covalent (single bond) value of sodium?
### INPUT
CREATE TABLE table_name_21 (covalent__single_bond_ VARCHAR, name VARCHAR)
### OUTPUT
SELECT covalent__single_bond_ FROM table_name_21 WHERE name = "sodium" | {
"input": "CREATE TABLE table_name_21 (covalent__single_bond_ VARCHAR, name VARCHAR)",
"instruction": "What is the covalent (single bond) value of sodium?",
"output": "SELECT covalent__single_bond_ FROM table_name_21 WHERE name = \"sodium\""
} |
### INSTRUCTION
What is the evening gown number when the average is more than 8.984 in Louisiana and the preliminary is more than 8.597?
### INPUT
CREATE TABLE table_name_60 (evening_gown VARCHAR, preliminary VARCHAR, average VARCHAR, country VARCHAR)
### OUTPUT
SELECT COUNT(evening_gown) FROM table_name_60 WHERE average > 8.984 AND country = "louisiana" AND preliminary > 8.597 | {
"input": "CREATE TABLE table_name_60 (evening_gown VARCHAR, preliminary VARCHAR, average VARCHAR, country VARCHAR)",
"instruction": "What is the evening gown number when the average is more than 8.984 in Louisiana and the preliminary is more than 8.597?",
"output": "SELECT COUNT(evening_gown) FROM table_name_60 WHERE average > 8.984 AND country = \"louisiana\" AND preliminary > 8.597"
} |
### INSTRUCTION
Which the highest Bronze of czech republic with a Total smaller than 4?
### INPUT
CREATE TABLE table_name_63 (bronze INTEGER, nation VARCHAR, total VARCHAR)
### OUTPUT
SELECT MAX(bronze) FROM table_name_63 WHERE nation = "czech republic" AND total < 4 | {
"input": "CREATE TABLE table_name_63 (bronze INTEGER, nation VARCHAR, total VARCHAR)",
"instruction": "Which the highest Bronze of czech republic with a Total smaller than 4?",
"output": "SELECT MAX(bronze) FROM table_name_63 WHERE nation = \"czech republic\" AND total < 4"
} |
### INSTRUCTION
When did the United Kingdom format a stereo LP?
### INPUT
CREATE TABLE table_name_29 (date VARCHAR, region VARCHAR, format VARCHAR)
### OUTPUT
SELECT date FROM table_name_29 WHERE region = "united kingdom" AND format = "stereo lp" | {
"input": "CREATE TABLE table_name_29 (date VARCHAR, region VARCHAR, format VARCHAR)",
"instruction": "When did the United Kingdom format a stereo LP?",
"output": "SELECT date FROM table_name_29 WHERE region = \"united kingdom\" AND format = \"stereo lp\""
} |
### INSTRUCTION
What is the Original Title, when Director is "Ting Shan-Si", and when Film Title Used In Nomination is "The 800 Heroes"?
### INPUT
CREATE TABLE table_name_73 (original_title VARCHAR, director VARCHAR, film_title_used_in_nomination VARCHAR)
### OUTPUT
SELECT original_title FROM table_name_73 WHERE director = "ting shan-si" AND film_title_used_in_nomination = "the 800 heroes" | {
"input": "CREATE TABLE table_name_73 (original_title VARCHAR, director VARCHAR, film_title_used_in_nomination VARCHAR)",
"instruction": "What is the Original Title, when Director is \"Ting Shan-Si\", and when Film Title Used In Nomination is \"The 800 Heroes\"?",
"output": "SELECT original_title FROM table_name_73 WHERE director = \"ting shan-si\" AND film_title_used_in_nomination = \"the 800 heroes\""
} |
### INSTRUCTION
display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara.
### INPUT
CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, hire_date VARCHAR, department_id VARCHAR)
### OUTPUT
SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = "Clara") | {
"input": "CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, hire_date VARCHAR, department_id VARCHAR)",
"instruction": "display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara.",
"output": "SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = \"Clara\")"
} |
### INSTRUCTION
What city has a Result of brisbane broncos def. halifax blue sox?
### INPUT
CREATE TABLE table_name_22 (city VARCHAR, result VARCHAR)
### OUTPUT
SELECT city FROM table_name_22 WHERE result = "brisbane broncos def. halifax blue sox" | {
"input": "CREATE TABLE table_name_22 (city VARCHAR, result VARCHAR)",
"instruction": "What city has a Result of brisbane broncos def. halifax blue sox?",
"output": "SELECT city FROM table_name_22 WHERE result = \"brisbane broncos def. halifax blue sox\""
} |
### INSTRUCTION
What was the ticket price on September 16, 1986?
### INPUT
CREATE TABLE table_name_56 (ticket_price_s_ VARCHAR, date_s_ VARCHAR)
### OUTPUT
SELECT ticket_price_s_ FROM table_name_56 WHERE date_s_ = "september 16, 1986" | {
"input": "CREATE TABLE table_name_56 (ticket_price_s_ VARCHAR, date_s_ VARCHAR)",
"instruction": "What was the ticket price on September 16, 1986?",
"output": "SELECT ticket_price_s_ FROM table_name_56 WHERE date_s_ = \"september 16, 1986\""
} |
### INSTRUCTION
What is the content of la7 television service?
### INPUT
CREATE TABLE table_15887683_1 (content VARCHAR, television_service VARCHAR)
### OUTPUT
SELECT content FROM table_15887683_1 WHERE television_service = "LA7" | {
"input": "CREATE TABLE table_15887683_1 (content VARCHAR, television_service VARCHAR)",
"instruction": "What is the content of la7 television service?",
"output": "SELECT content FROM table_15887683_1 WHERE television_service = \"LA7\""
} |
### INSTRUCTION
Name the sydney with perth of no, adelaide of no with melbourne of yes and gold coast of yes
### INPUT
CREATE TABLE table_name_53 (sydney VARCHAR, gold_coast VARCHAR, melbourne VARCHAR, perth VARCHAR, adelaide VARCHAR)
### OUTPUT
SELECT sydney FROM table_name_53 WHERE perth = "no" AND adelaide = "no" AND melbourne = "yes" AND gold_coast = "yes" | {
"input": "CREATE TABLE table_name_53 (sydney VARCHAR, gold_coast VARCHAR, melbourne VARCHAR, perth VARCHAR, adelaide VARCHAR)",
"instruction": "Name the sydney with perth of no, adelaide of no with melbourne of yes and gold coast of yes",
"output": "SELECT sydney FROM table_name_53 WHERE perth = \"no\" AND adelaide = \"no\" AND melbourne = \"yes\" AND gold_coast = \"yes\""
} |
### INSTRUCTION
What was the Population (2011) when the Population (2006) was less than 7083, and the Population density less than 342.8, and the Change (%) of 5, and an Area (km²) larger than 4.5?
### INPUT
CREATE TABLE table_name_2 (population__2011_ VARCHAR, area__km²_ VARCHAR, change___percentage_ VARCHAR, population__2006_ VARCHAR, population_density VARCHAR)
### OUTPUT
SELECT COUNT(population__2011_) FROM table_name_2 WHERE population__2006_ < 7083 AND population_density < 342.8 AND change___percentage_ = 5 AND area__km²_ > 4.5 | {
"input": "CREATE TABLE table_name_2 (population__2011_ VARCHAR, area__km²_ VARCHAR, change___percentage_ VARCHAR, population__2006_ VARCHAR, population_density VARCHAR)",
"instruction": "What was the Population (2011) when the Population (2006) was less than 7083, and the Population density less than 342.8, and the Change (%) of 5, and an Area (km²) larger than 4.5?",
"output": "SELECT COUNT(population__2011_) FROM table_name_2 WHERE population__2006_ < 7083 AND population_density < 342.8 AND change___percentage_ = 5 AND area__km²_ > 4.5"
} |
### INSTRUCTION
How many bids were there for the .500 win percentage in the Ohio Valley conference?
### INPUT
CREATE TABLE table_name_7 (_number_of_bids INTEGER, win__percentage VARCHAR, conference VARCHAR)
### OUTPUT
SELECT SUM(_number_of_bids) FROM table_name_7 WHERE win__percentage = ".500" AND conference = "ohio valley" | {
"input": "CREATE TABLE table_name_7 (_number_of_bids INTEGER, win__percentage VARCHAR, conference VARCHAR)",
"instruction": "How many bids were there for the .500 win percentage in the Ohio Valley conference?",
"output": "SELECT SUM(_number_of_bids) FROM table_name_7 WHERE win__percentage = \".500\" AND conference = \"ohio valley\""
} |
### INSTRUCTION
Who is the person that has no friend?
### INPUT
CREATE TABLE PersonFriend (name VARCHAR); CREATE TABLE person (name VARCHAR)
### OUTPUT
SELECT name FROM person EXCEPT SELECT name FROM PersonFriend | {
"input": "CREATE TABLE PersonFriend (name VARCHAR); CREATE TABLE person (name VARCHAR)",
"instruction": "Who is the person that has no friend?",
"output": "SELECT name FROM person EXCEPT SELECT name FROM PersonFriend"
} |
### INSTRUCTION
what's the earliest year that the wimbledon opponent was zheng jie?
### INPUT
CREATE TABLE table_name_50 (year INTEGER, event VARCHAR, opponent VARCHAR)
### OUTPUT
SELECT MIN(year) FROM table_name_50 WHERE event = "wimbledon" AND opponent = "zheng jie" | {
"input": "CREATE TABLE table_name_50 (year INTEGER, event VARCHAR, opponent VARCHAR)",
"instruction": "what's the earliest year that the wimbledon opponent was zheng jie?",
"output": "SELECT MIN(year) FROM table_name_50 WHERE event = \"wimbledon\" AND opponent = \"zheng jie\""
} |
### INSTRUCTION
Which Venue has a Result of 5-1, and a Score of 1-0?
### INPUT
CREATE TABLE table_name_72 (venue VARCHAR, result VARCHAR, score VARCHAR)
### OUTPUT
SELECT venue FROM table_name_72 WHERE result = "5-1" AND score = "1-0" | {
"input": "CREATE TABLE table_name_72 (venue VARCHAR, result VARCHAR, score VARCHAR)",
"instruction": "Which Venue has a Result of 5-1, and a Score of 1-0?",
"output": "SELECT venue FROM table_name_72 WHERE result = \"5-1\" AND score = \"1-0\""
} |
### INSTRUCTION
how many population estimate 2005 are for majene?
### INPUT
CREATE TABLE table_name_86 (population_estimate_2005 VARCHAR, capital VARCHAR)
### OUTPUT
SELECT COUNT(population_estimate_2005) FROM table_name_86 WHERE capital = "majene" | {
"input": "CREATE TABLE table_name_86 (population_estimate_2005 VARCHAR, capital VARCHAR)",
"instruction": "how many population estimate 2005 are for majene?",
"output": "SELECT COUNT(population_estimate_2005) FROM table_name_86 WHERE capital = \"majene\""
} |
### INSTRUCTION
What are average launches with 0 failures, rocket of Soyuz, and less than 12 successes?
### INPUT
CREATE TABLE table_name_3 (launches INTEGER, successes VARCHAR, failures VARCHAR, rocket VARCHAR)
### OUTPUT
SELECT AVG(launches) FROM table_name_3 WHERE failures = 0 AND rocket = "soyuz" AND successes < 12 | {
"input": "CREATE TABLE table_name_3 (launches INTEGER, successes VARCHAR, failures VARCHAR, rocket VARCHAR)",
"instruction": "What are average launches with 0 failures, rocket of Soyuz, and less than 12 successes?",
"output": "SELECT AVG(launches) FROM table_name_3 WHERE failures = 0 AND rocket = \"soyuz\" AND successes < 12"
} |
### INSTRUCTION
Who won the points classifications in the stage where Matteo Priamo was the winner?
### INPUT
CREATE TABLE table_14710984_2 (points_classification VARCHAR, winner VARCHAR)
### OUTPUT
SELECT COUNT(points_classification) FROM table_14710984_2 WHERE winner = "Matteo Priamo" | {
"input": "CREATE TABLE table_14710984_2 (points_classification VARCHAR, winner VARCHAR)",
"instruction": "Who won the points classifications in the stage where Matteo Priamo was the winner?",
"output": "SELECT COUNT(points_classification) FROM table_14710984_2 WHERE winner = \"Matteo Priamo\""
} |
### INSTRUCTION
What grand prixs did Daijiro Hiura win?
### INPUT
CREATE TABLE table_18303274_1 (grand_prix VARCHAR, race_winner VARCHAR)
### OUTPUT
SELECT grand_prix FROM table_18303274_1 WHERE race_winner = "Daijiro Hiura" | {
"input": "CREATE TABLE table_18303274_1 (grand_prix VARCHAR, race_winner VARCHAR)",
"instruction": "What grand prixs did Daijiro Hiura win? ",
"output": "SELECT grand_prix FROM table_18303274_1 WHERE race_winner = \"Daijiro Hiura\""
} |
### INSTRUCTION
What is the Date of attack of the ship with iron ore sunk by u-101 *?
### INPUT
CREATE TABLE table_name_39 (date_of_attack VARCHAR, fate VARCHAR, cargo VARCHAR)
### OUTPUT
SELECT date_of_attack FROM table_name_39 WHERE fate = "sunk by u-101 *" AND cargo = "iron ore" | {
"input": "CREATE TABLE table_name_39 (date_of_attack VARCHAR, fate VARCHAR, cargo VARCHAR)",
"instruction": "What is the Date of attack of the ship with iron ore sunk by u-101 *?",
"output": "SELECT date_of_attack FROM table_name_39 WHERE fate = \"sunk by u-101 *\" AND cargo = \"iron ore\""
} |
### INSTRUCTION
How many specimens does the SANT institution have?
### INPUT
CREATE TABLE table_name_1 (no_specimens INTEGER, abbr VARCHAR)
### OUTPUT
SELECT SUM(no_specimens) FROM table_name_1 WHERE abbr = "sant" | {
"input": "CREATE TABLE table_name_1 (no_specimens INTEGER, abbr VARCHAR)",
"instruction": "How many specimens does the SANT institution have?",
"output": "SELECT SUM(no_specimens) FROM table_name_1 WHERE abbr = \"sant\""
} |
### INSTRUCTION
Please list the years of film market estimations when the market is in country "Japan" in descending order.
### INPUT
CREATE TABLE film_market_estimation (Year VARCHAR, Market_ID VARCHAR); CREATE TABLE market (Market_ID VARCHAR, Country VARCHAR)
### OUTPUT
SELECT T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T2.Country = "Japan" ORDER BY T1.Year DESC | {
"input": "CREATE TABLE film_market_estimation (Year VARCHAR, Market_ID VARCHAR); CREATE TABLE market (Market_ID VARCHAR, Country VARCHAR)",
"instruction": "Please list the years of film market estimations when the market is in country \"Japan\" in descending order.",
"output": "SELECT T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T2.Country = \"Japan\" ORDER BY T1.Year DESC"
} |
### INSTRUCTION
What is the name of the young rider classification when Paolo Tiralongo won?
### INPUT
CREATE TABLE table_28538368_2 (young_rider_classification VARCHAR, winner VARCHAR)
### OUTPUT
SELECT young_rider_classification FROM table_28538368_2 WHERE winner = "Paolo Tiralongo" | {
"input": "CREATE TABLE table_28538368_2 (young_rider_classification VARCHAR, winner VARCHAR)",
"instruction": "What is the name of the young rider classification when Paolo Tiralongo won?",
"output": "SELECT young_rider_classification FROM table_28538368_2 WHERE winner = \"Paolo Tiralongo\""
} |
### INSTRUCTION
What school/club did gerald wilkins attend?
### INPUT
CREATE TABLE table_name_24 (school_club_team VARCHAR, player VARCHAR)
### OUTPUT
SELECT school_club_team FROM table_name_24 WHERE player = "gerald wilkins" | {
"input": "CREATE TABLE table_name_24 (school_club_team VARCHAR, player VARCHAR)",
"instruction": "What school/club did gerald wilkins attend?",
"output": "SELECT school_club_team FROM table_name_24 WHERE player = \"gerald wilkins\""
} |
### INSTRUCTION
What is the number in attendance at Dowdy-Ficklen stadium • Greenville, NC, and the opponent was Ohio?
### INPUT
CREATE TABLE table_name_63 (attendance VARCHAR, site VARCHAR, opponent VARCHAR)
### OUTPUT
SELECT attendance FROM table_name_63 WHERE site = "dowdy-ficklen stadium • greenville, nc" AND opponent = "ohio" | {
"input": "CREATE TABLE table_name_63 (attendance VARCHAR, site VARCHAR, opponent VARCHAR)",
"instruction": "What is the number in attendance at Dowdy-Ficklen stadium • Greenville, NC, and the opponent was Ohio?",
"output": "SELECT attendance FROM table_name_63 WHERE site = \"dowdy-ficklen stadium • greenville, nc\" AND opponent = \"ohio\""
} |
### INSTRUCTION
Who was the composer of ain shams?
### INPUT
CREATE TABLE table_28005100_1 (composer VARCHAR, title VARCHAR)
### OUTPUT
SELECT composer FROM table_28005100_1 WHERE title = "Ain Shams" | {
"input": "CREATE TABLE table_28005100_1 (composer VARCHAR, title VARCHAR)",
"instruction": "Who was the composer of ain shams?",
"output": "SELECT composer FROM table_28005100_1 WHERE title = \"Ain Shams\""
} |
### INSTRUCTION
List the names of aircrafts and that won matches at least twice.
### INPUT
CREATE TABLE MATCH (Winning_Aircraft VARCHAR); CREATE TABLE aircraft (Aircraft VARCHAR, Aircraft_ID VARCHAR)
### OUTPUT
SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*) >= 2 | {
"input": "CREATE TABLE MATCH (Winning_Aircraft VARCHAR); CREATE TABLE aircraft (Aircraft VARCHAR, Aircraft_ID VARCHAR)",
"instruction": "List the names of aircrafts and that won matches at least twice.",
"output": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*) >= 2"
} |
### INSTRUCTION
Show names of technicians and series of machines they are assigned to repair.
### INPUT
CREATE TABLE machine (Machine_series VARCHAR, machine_id VARCHAR); CREATE TABLE repair_assignment (machine_id VARCHAR, technician_ID VARCHAR); CREATE TABLE technician (Name VARCHAR, technician_ID VARCHAR)
### OUTPUT
SELECT T3.Name, T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID | {
"input": "CREATE TABLE machine (Machine_series VARCHAR, machine_id VARCHAR); CREATE TABLE repair_assignment (machine_id VARCHAR, technician_ID VARCHAR); CREATE TABLE technician (Name VARCHAR, technician_ID VARCHAR)",
"instruction": "Show names of technicians and series of machines they are assigned to repair.",
"output": "SELECT T3.Name, T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID"
} |
### INSTRUCTION
what is the maximum tonnage where date entered service is 25 march 1986
### INPUT
CREATE TABLE table_11662133_3 (tonnage INTEGER, date_entered_service VARCHAR)
### OUTPUT
SELECT MAX(tonnage) FROM table_11662133_3 WHERE date_entered_service = "25 March 1986" | {
"input": "CREATE TABLE table_11662133_3 (tonnage INTEGER, date_entered_service VARCHAR)",
"instruction": "what is the maximum tonnage where date entered service is 25 march 1986 ",
"output": "SELECT MAX(tonnage) FROM table_11662133_3 WHERE date_entered_service = \"25 March 1986\""
} |
### INSTRUCTION
which episode was Transmitted on friday if the episode of "515 the adventures of tintin" was transmitted on monday?
### INPUT
CREATE TABLE table_18173916_8 (friday VARCHAR, monday VARCHAR)
### OUTPUT
SELECT friday FROM table_18173916_8 WHERE monday = "515 The Adventures of Tintin" | {
"input": "CREATE TABLE table_18173916_8 (friday VARCHAR, monday VARCHAR)",
"instruction": "which episode was Transmitted on friday if the episode of \"515 the adventures of tintin\" was transmitted on monday? ",
"output": "SELECT friday FROM table_18173916_8 WHERE monday = \"515 The Adventures of Tintin\""
} |
### INSTRUCTION
What is the birth place for someone elevated by Lucius III, and has the Cardinalatial title of Deacon of S. Giorgio in Velabro?
### INPUT
CREATE TABLE table_name_65 (place_of_birth VARCHAR, elevator VARCHAR, cardinalatial_title VARCHAR)
### OUTPUT
SELECT place_of_birth FROM table_name_65 WHERE elevator = "lucius iii" AND cardinalatial_title = "deacon of s. giorgio in velabro" | {
"input": "CREATE TABLE table_name_65 (place_of_birth VARCHAR, elevator VARCHAR, cardinalatial_title VARCHAR)",
"instruction": "What is the birth place for someone elevated by Lucius III, and has the Cardinalatial title of Deacon of S. Giorgio in Velabro?",
"output": "SELECT place_of_birth FROM table_name_65 WHERE elevator = \"lucius iii\" AND cardinalatial_title = \"deacon of s. giorgio in velabro\""
} |
### INSTRUCTION
who is the runner-up when the winning score is −16 (68-70-65-65=268)?
### INPUT
CREATE TABLE table_name_26 (runner_up VARCHAR, winning_score VARCHAR)
### OUTPUT
SELECT runner_up FROM table_name_26 WHERE winning_score = −16(68 - 70 - 65 - 65 = 268) | {
"input": "CREATE TABLE table_name_26 (runner_up VARCHAR, winning_score VARCHAR)",
"instruction": "who is the runner-up when the winning score is −16 (68-70-65-65=268)?",
"output": "SELECT runner_up FROM table_name_26 WHERE winning_score = −16(68 - 70 - 65 - 65 = 268)"
} |
### INSTRUCTION
Name the venue for eng by 6 wkts
### INPUT
CREATE TABLE table_name_46 (venue VARCHAR, result VARCHAR)
### OUTPUT
SELECT venue FROM table_name_46 WHERE result = "eng by 6 wkts" | {
"input": "CREATE TABLE table_name_46 (venue VARCHAR, result VARCHAR)",
"instruction": "Name the venue for eng by 6 wkts",
"output": "SELECT venue FROM table_name_46 WHERE result = \"eng by 6 wkts\""
} |
### INSTRUCTION
How many number of WJC Jews in the Los Angeles Metro Area has a ARDA rank of more than 2?
### INPUT
CREATE TABLE table_name_73 (number_of_jews__wjc_ INTEGER, metro_area VARCHAR, rank__arda_ VARCHAR)
### OUTPUT
SELECT SUM(number_of_jews__wjc_) FROM table_name_73 WHERE metro_area = "los angeles" AND rank__arda_ > 2 | {
"input": "CREATE TABLE table_name_73 (number_of_jews__wjc_ INTEGER, metro_area VARCHAR, rank__arda_ VARCHAR)",
"instruction": "How many number of WJC Jews in the Los Angeles Metro Area has a ARDA rank of more than 2?",
"output": "SELECT SUM(number_of_jews__wjc_) FROM table_name_73 WHERE metro_area = \"los angeles\" AND rank__arda_ > 2"
} |
### INSTRUCTION
Which are the car makers which produce at least 2 models and more than 3 car makers ? List the id and the maker .
### INPUT
CREATE TABLE car_makers (id VARCHAR, maker VARCHAR); CREATE TABLE model_list (maker VARCHAR, model VARCHAR); CREATE TABLE car_names (model VARCHAR)
### OUTPUT
SELECT t1.id, t1.maker FROM car_makers AS t1 JOIN model_list AS t2 ON t1.id = t2.maker GROUP BY t1.id HAVING COUNT(*) >= 2 INTERSECT SELECT t1.id, t1.maker FROM car_makers AS t1 JOIN model_list AS t2 ON t1.id = t2.maker JOIN car_names AS t3 ON t2.model = t3.model GROUP BY t1.id HAVING COUNT(*) > 3 | {
"input": "CREATE TABLE car_makers (id VARCHAR, maker VARCHAR); CREATE TABLE model_list (maker VARCHAR, model VARCHAR); CREATE TABLE car_names (model VARCHAR)",
"instruction": "Which are the car makers which produce at least 2 models and more than 3 car makers ? List the id and the maker .",
"output": "SELECT t1.id, t1.maker FROM car_makers AS t1 JOIN model_list AS t2 ON t1.id = t2.maker GROUP BY t1.id HAVING COUNT(*) >= 2 INTERSECT SELECT t1.id, t1.maker FROM car_makers AS t1 JOIN model_list AS t2 ON t1.id = t2.maker JOIN car_names AS t3 ON t2.model = t3.model GROUP BY t1.id HAVING COUNT(*) > 3"
} |
### INSTRUCTION
What is the name of each course and the corresponding number of student enrollment?
### INPUT
CREATE TABLE Courses (course_name VARCHAR, course_id VARCHAR); CREATE TABLE Student_Course_Enrolment (course_id VARCHAR)
### OUTPUT
SELECT T1.course_name, COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name | {
"input": "CREATE TABLE Courses (course_name VARCHAR, course_id VARCHAR); CREATE TABLE Student_Course_Enrolment (course_id VARCHAR)",
"instruction": "What is the name of each course and the corresponding number of student enrollment?",
"output": "SELECT T1.course_name, COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name"
} |
### INSTRUCTION
What's the size of Centerville in 89 Wayne county with an IHSAA class of AA in the year before 1974?
### INPUT
CREATE TABLE table_name_61 (size VARCHAR, school VARCHAR, _number___county VARCHAR, year_joined VARCHAR, ihsaa_class VARCHAR)
### OUTPUT
SELECT size FROM table_name_61 WHERE year_joined < 1974 AND ihsaa_class = "aa" AND _number___county = "89 wayne" AND school = "centerville" | {
"input": "CREATE TABLE table_name_61 (size VARCHAR, school VARCHAR, _number___county VARCHAR, year_joined VARCHAR, ihsaa_class VARCHAR)",
"instruction": "What's the size of Centerville in 89 Wayne county with an IHSAA class of AA in the year before 1974?",
"output": "SELECT size FROM table_name_61 WHERE year_joined < 1974 AND ihsaa_class = \"aa\" AND _number___county = \"89 wayne\" AND school = \"centerville\""
} |
### INSTRUCTION
How many players are from Sioux City, Iowa?
### INPUT
CREATE TABLE table_14342367_13 (player VARCHAR, hometown VARCHAR)
### OUTPUT
SELECT COUNT(player) FROM table_14342367_13 WHERE hometown = "Sioux City, Iowa" | {
"input": "CREATE TABLE table_14342367_13 (player VARCHAR, hometown VARCHAR)",
"instruction": "How many players are from Sioux City, Iowa?",
"output": "SELECT COUNT(player) FROM table_14342367_13 WHERE hometown = \"Sioux City, Iowa\""
} |
### INSTRUCTION
What is Left Office, when Party is "UDC", and when Took Office is "11 June 2001"?
### INPUT
CREATE TABLE table_name_16 (left_office VARCHAR, party VARCHAR, took_office VARCHAR)
### OUTPUT
SELECT left_office FROM table_name_16 WHERE party = "udc" AND took_office = "11 june 2001" | {
"input": "CREATE TABLE table_name_16 (left_office VARCHAR, party VARCHAR, took_office VARCHAR)",
"instruction": "What is Left Office, when Party is \"UDC\", and when Took Office is \"11 June 2001\"?",
"output": "SELECT left_office FROM table_name_16 WHERE party = \"udc\" AND took_office = \"11 june 2001\""
} |
### INSTRUCTION
When did the 113 episode air?
### INPUT
CREATE TABLE table_10718631_2 (original_air_date VARCHAR, no_in_series VARCHAR)
### OUTPUT
SELECT original_air_date FROM table_10718631_2 WHERE no_in_series = 113 | {
"input": "CREATE TABLE table_10718631_2 (original_air_date VARCHAR, no_in_series VARCHAR)",
"instruction": "When did the 113 episode air?",
"output": "SELECT original_air_date FROM table_10718631_2 WHERE no_in_series = 113"
} |
### INSTRUCTION
What is the broadcast date where Jason's team is Rhod Gilbert and Shappi Khorsandi?
### INPUT
CREATE TABLE table_23292220_8 (first_broadcast VARCHAR, jasons_team VARCHAR)
### OUTPUT
SELECT first_broadcast FROM table_23292220_8 WHERE jasons_team = "Rhod Gilbert and Shappi Khorsandi" | {
"input": "CREATE TABLE table_23292220_8 (first_broadcast VARCHAR, jasons_team VARCHAR)",
"instruction": "What is the broadcast date where Jason's team is Rhod Gilbert and Shappi Khorsandi?",
"output": "SELECT first_broadcast FROM table_23292220_8 WHERE jasons_team = \"Rhod Gilbert and Shappi Khorsandi\""
} |
### INSTRUCTION
What is the highest Game, when High Assists is "Hedo Türkoğlu (7)"?
### INPUT
CREATE TABLE table_name_86 (game INTEGER, high_assists VARCHAR)
### OUTPUT
SELECT MAX(game) FROM table_name_86 WHERE high_assists = "hedo türkoğlu (7)" | {
"input": "CREATE TABLE table_name_86 (game INTEGER, high_assists VARCHAR)",
"instruction": "What is the highest Game, when High Assists is \"Hedo Türkoğlu (7)\"?",
"output": "SELECT MAX(game) FROM table_name_86 WHERE high_assists = \"hedo türkoğlu (7)\""
} |
### INSTRUCTION
Find the name and gender of the candidate who got the highest support rate.
### INPUT
CREATE TABLE candidate (people_id VARCHAR, support_rate VARCHAR); CREATE TABLE people (name VARCHAR, sex VARCHAR, people_id VARCHAR)
### OUTPUT
SELECT t1.name, t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id ORDER BY t2.support_rate DESC LIMIT 1 | {
"input": "CREATE TABLE candidate (people_id VARCHAR, support_rate VARCHAR); CREATE TABLE people (name VARCHAR, sex VARCHAR, people_id VARCHAR)",
"instruction": "Find the name and gender of the candidate who got the highest support rate.",
"output": "SELECT t1.name, t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id ORDER BY t2.support_rate DESC LIMIT 1"
} |
### INSTRUCTION
Which record has 5:00 as the time, jess liaudin as the opponent for the location of england?
### INPUT
CREATE TABLE table_name_49 (record VARCHAR, location VARCHAR, time VARCHAR, opponent VARCHAR)
### OUTPUT
SELECT record FROM table_name_49 WHERE time = "5:00" AND opponent = "jess liaudin" AND location = "england" | {
"input": "CREATE TABLE table_name_49 (record VARCHAR, location VARCHAR, time VARCHAR, opponent VARCHAR)",
"instruction": "Which record has 5:00 as the time, jess liaudin as the opponent for the location of england?",
"output": "SELECT record FROM table_name_49 WHERE time = \"5:00\" AND opponent = \"jess liaudin\" AND location = \"england\""
} |
### INSTRUCTION
What is the year leicester was established?
### INPUT
CREATE TABLE table_142950_1 (established INTEGER, location VARCHAR)
### OUTPUT
SELECT MAX(established) FROM table_142950_1 WHERE location = "Leicester" | {
"input": "CREATE TABLE table_142950_1 (established INTEGER, location VARCHAR)",
"instruction": "What is the year leicester was established?",
"output": "SELECT MAX(established) FROM table_142950_1 WHERE location = \"Leicester\""
} |
### INSTRUCTION
What is NiCd, when Type is "Capacity under 500mA constant Drain"?
### INPUT
CREATE TABLE table_name_23 (nicd VARCHAR, type VARCHAR)
### OUTPUT
SELECT nicd FROM table_name_23 WHERE type = "capacity under 500ma constant drain" | {
"input": "CREATE TABLE table_name_23 (nicd VARCHAR, type VARCHAR)",
"instruction": "What is NiCd, when Type is \"Capacity under 500mA constant Drain\"?",
"output": "SELECT nicd FROM table_name_23 WHERE type = \"capacity under 500ma constant drain\""
} |
### INSTRUCTION
Name the year that Birds of a feather category for most popular actress was nominated
### INPUT
CREATE TABLE table_name_57 (year INTEGER, category VARCHAR, nominated_for VARCHAR)
### OUTPUT
SELECT AVG(year) FROM table_name_57 WHERE category = "most popular actress" AND nominated_for = "birds of a feather" | {
"input": "CREATE TABLE table_name_57 (year INTEGER, category VARCHAR, nominated_for VARCHAR)",
"instruction": "Name the year that Birds of a feather category for most popular actress was nominated",
"output": "SELECT AVG(year) FROM table_name_57 WHERE category = \"most popular actress\" AND nominated_for = \"birds of a feather\""
} |
### INSTRUCTION
Find the physicians who are trained in a procedure that costs more than 5000.
### INPUT
CREATE TABLE trained_in (physician VARCHAR, treatment VARCHAR); CREATE TABLE physician (name VARCHAR, employeeid VARCHAR); CREATE TABLE procedures (code VARCHAR, cost INTEGER)
### OUTPUT
SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T3.cost > 5000 | {
"input": "CREATE TABLE trained_in (physician VARCHAR, treatment VARCHAR); CREATE TABLE physician (name VARCHAR, employeeid VARCHAR); CREATE TABLE procedures (code VARCHAR, cost INTEGER)",
"instruction": "Find the physicians who are trained in a procedure that costs more than 5000.",
"output": "SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T3.cost > 5000"
} |
### INSTRUCTION
What is Zamri Hassan's lowest Malaysia Cup when there were an FA Cup of 0?
### INPUT
CREATE TABLE table_name_74 (malaysia_cup INTEGER, player VARCHAR, fa_cup VARCHAR)
### OUTPUT
SELECT MIN(malaysia_cup) FROM table_name_74 WHERE player = "zamri hassan" AND fa_cup < 0 | {
"input": "CREATE TABLE table_name_74 (malaysia_cup INTEGER, player VARCHAR, fa_cup VARCHAR)",
"instruction": "What is Zamri Hassan's lowest Malaysia Cup when there were an FA Cup of 0?",
"output": "SELECT MIN(malaysia_cup) FROM table_name_74 WHERE player = \"zamri hassan\" AND fa_cup < 0"
} |
### INSTRUCTION
What score did Australia get?
### INPUT
CREATE TABLE table_name_85 (score VARCHAR, country VARCHAR)
### OUTPUT
SELECT score FROM table_name_85 WHERE country = "australia" | {
"input": "CREATE TABLE table_name_85 (score VARCHAR, country VARCHAR)",
"instruction": "What score did Australia get?",
"output": "SELECT score FROM table_name_85 WHERE country = \"australia\""
} |
### INSTRUCTION
Which Player has a To par of 12, and a Country of fiji?
### INPUT
CREATE TABLE table_name_21 (player VARCHAR, to_par VARCHAR, country VARCHAR)
### OUTPUT
SELECT player FROM table_name_21 WHERE to_par = 12 AND country = "fiji" | {
"input": "CREATE TABLE table_name_21 (player VARCHAR, to_par VARCHAR, country VARCHAR)",
"instruction": "Which Player has a To par of 12, and a Country of fiji?",
"output": "SELECT player FROM table_name_21 WHERE to_par = 12 AND country = \"fiji\""
} |
### INSTRUCTION
List the themes of parties in ascending order of number of hosts.
### INPUT
CREATE TABLE party (Party_Theme VARCHAR, Number_of_hosts VARCHAR)
### OUTPUT
SELECT Party_Theme FROM party ORDER BY Number_of_hosts | {
"input": "CREATE TABLE party (Party_Theme VARCHAR, Number_of_hosts VARCHAR)",
"instruction": "List the themes of parties in ascending order of number of hosts.",
"output": "SELECT Party_Theme FROM party ORDER BY Number_of_hosts"
} |
### INSTRUCTION
What is the location attendance of the game with A. Horford (10) as the highest rebounds and J. Johnson (21) as the highest points?
### INPUT
CREATE TABLE table_name_49 (location_attendance VARCHAR, high_rebounds VARCHAR, high_points VARCHAR)
### OUTPUT
SELECT location_attendance FROM table_name_49 WHERE high_rebounds = "a. horford (10)" AND high_points = "j. johnson (21)" | {
"input": "CREATE TABLE table_name_49 (location_attendance VARCHAR, high_rebounds VARCHAR, high_points VARCHAR)",
"instruction": "What is the location attendance of the game with A. Horford (10) as the highest rebounds and J. Johnson (21) as the highest points?",
"output": "SELECT location_attendance FROM table_name_49 WHERE high_rebounds = \"a. horford (10)\" AND high_points = \"j. johnson (21)\""
} |
### INSTRUCTION
What is the date of vacancy when the date of appointment is 28 november 2007 and replaced by is alex mcleish?
### INPUT
CREATE TABLE table_10592536_8 (date_of_vacancy VARCHAR, date_of_appointment VARCHAR, replaced_by VARCHAR)
### OUTPUT
SELECT date_of_vacancy FROM table_10592536_8 WHERE date_of_appointment = "28 November 2007" AND replaced_by = "Alex McLeish" | {
"input": "CREATE TABLE table_10592536_8 (date_of_vacancy VARCHAR, date_of_appointment VARCHAR, replaced_by VARCHAR)",
"instruction": "What is the date of vacancy when the date of appointment is 28 november 2007 and replaced by is alex mcleish?",
"output": "SELECT date_of_vacancy FROM table_10592536_8 WHERE date_of_appointment = \"28 November 2007\" AND replaced_by = \"Alex McLeish\""
} |
### INSTRUCTION
What date did Sigurd Rushfeldt score less than 2 points in the UEFA Euro 2004 qualifying competition?
### INPUT
CREATE TABLE table_name_24 (date VARCHAR, scored VARCHAR, competition VARCHAR)
### OUTPUT
SELECT date FROM table_name_24 WHERE scored < 2 AND competition = "uefa euro 2004 qualifying" | {
"input": "CREATE TABLE table_name_24 (date VARCHAR, scored VARCHAR, competition VARCHAR)",
"instruction": "What date did Sigurd Rushfeldt score less than 2 points in the UEFA Euro 2004 qualifying competition?",
"output": "SELECT date FROM table_name_24 WHERE scored < 2 AND competition = \"uefa euro 2004 qualifying\""
} |
### INSTRUCTION
What is the score when the to par was –5, for Peter Jacobsen?
### INPUT
CREATE TABLE table_name_9 (score INTEGER, to_par VARCHAR, player VARCHAR)
### OUTPUT
SELECT SUM(score) FROM table_name_9 WHERE to_par = "–5" AND player = "peter jacobsen" | {
"input": "CREATE TABLE table_name_9 (score INTEGER, to_par VARCHAR, player VARCHAR)",
"instruction": "What is the score when the to par was –5, for Peter Jacobsen?",
"output": "SELECT SUM(score) FROM table_name_9 WHERE to_par = \"–5\" AND player = \"peter jacobsen\""
} |
### INSTRUCTION
How many golden tickets for the georgia international convention center?
### INPUT
CREATE TABLE table_name_85 (golden_tickets INTEGER, callback_venue VARCHAR)
### OUTPUT
SELECT SUM(golden_tickets) FROM table_name_85 WHERE callback_venue = "georgia international convention center" | {
"input": "CREATE TABLE table_name_85 (golden_tickets INTEGER, callback_venue VARCHAR)",
"instruction": "How many golden tickets for the georgia international convention center?",
"output": "SELECT SUM(golden_tickets) FROM table_name_85 WHERE callback_venue = \"georgia international convention center\""
} |
### INSTRUCTION
Who won the regular season when Missouri Valley Conference took place?
### INPUT
CREATE TABLE table_22779004_1 (regular_season_winner VARCHAR, conference VARCHAR)
### OUTPUT
SELECT regular_season_winner FROM table_22779004_1 WHERE conference = "Missouri Valley conference" | {
"input": "CREATE TABLE table_22779004_1 (regular_season_winner VARCHAR, conference VARCHAR)",
"instruction": "Who won the regular season when Missouri Valley Conference took place?",
"output": "SELECT regular_season_winner FROM table_22779004_1 WHERE conference = \"Missouri Valley conference\""
} |
### INSTRUCTION
List the names of the schools without any endowment.
### INPUT
CREATE TABLE endowment (school_name VARCHAR, school_id VARCHAR); CREATE TABLE school (school_name VARCHAR, school_id VARCHAR)
### OUTPUT
SELECT school_name FROM school WHERE NOT school_id IN (SELECT school_id FROM endowment) | {
"input": "CREATE TABLE endowment (school_name VARCHAR, school_id VARCHAR); CREATE TABLE school (school_name VARCHAR, school_id VARCHAR)",
"instruction": "List the names of the schools without any endowment.",
"output": "SELECT school_name FROM school WHERE NOT school_id IN (SELECT school_id FROM endowment)"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.