inputs
stringlengths
400
1.34k
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Find the capacity and gender type of the dorm whose name has substring ‘Donor’. ### Context: CREATE TABLE dorm (student_capacity VARCHAR, gender VARCHAR, dorm_name VARCHAR) ### Response: ### Response: SELECT student_capacity, gender FROM dorm WHERE dorm_name LIKE '%Donor%'</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Which Home team score had a Home team of Fitzroy? ### Context: CREATE TABLE table_name_13 (home_team VARCHAR) ### Response: ### Response: SELECT home_team AS score FROM table_name_13 WHERE home_team = "fitzroy"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Find the first name of students who have both cat and dog pets . ### Context: CREATE TABLE student (fname VARCHAR, stuid VARCHAR); CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE pets (petid VARCHAR, pettype VARCHAR) ### Response: ### Response: SELECT t1.fname FROM student AS t1 JOIN has_pet AS t2 ON t1.stuid = t2.stuid JOIN pets AS t3 ON t3.petid = t2.petid WHERE t3.pettype = 'cat' INTERSECT SELECT t1.fname FROM student AS t1 JOIN has_pet AS t2 ON t1.stuid = t2.stuid JOIN pets AS t3 ON t3.petid = t2.petid WHERE t3.pettype = 'dog'</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Which Album has a Label of msb 801? ### Context: CREATE TABLE table_name_87 (album VARCHAR, label VARCHAR) ### Response: ### Response: SELECT album FROM table_name_87 WHERE label = "msb 801"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What does the ERP W sum equal for 105.1 fm frequency? ### Context: CREATE TABLE table_name_66 (erp_w INTEGER, frequency_mhz VARCHAR) ### Response: ### Response: SELECT SUM(erp_w) FROM table_name_66 WHERE frequency_mhz = "105.1 fm"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What is Tries Against, when Try Diff is +15? ### Context: CREATE TABLE table_name_34 (tries_against VARCHAR, try_diff VARCHAR) ### Response: ### Response: SELECT tries_against FROM table_name_34 WHERE try_diff = "+15"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: How many series had the chipset of the Intel Centrino Ultimate-N 6300 wireless LAN with the codename Arrandale? ### Context: CREATE TABLE table_199666_1 (chipset VARCHAR, codename VARCHAR, wireless_lan VARCHAR) ### Response: ### Response: SELECT chipset FROM table_199666_1 WHERE codename = "Arrandale" AND wireless_lan = "Intel centrino Ultimate-N 6300"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: How many Lost have a Team of flamengo, and an Against smaller than 5? ### Context: CREATE TABLE table_name_92 (lost VARCHAR, team VARCHAR, against VARCHAR) ### Response: ### Response: SELECT COUNT(lost) FROM table_name_92 WHERE team = "flamengo" AND against < 5</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What rank is the transfer for the milan move in 2000? ### Context: CREATE TABLE table_name_4 (rank INTEGER, moving_to VARCHAR, year VARCHAR) ### Response: ### Response: SELECT AVG(rank) FROM table_name_4 WHERE moving_to = "milan" AND year = 2000</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Total enrollment at the school with the nickname Blue Hens ### Context: CREATE TABLE table_16432543_1 (enrollment VARCHAR, nickname VARCHAR) ### Response: ### Response: SELECT COUNT(enrollment) FROM table_16432543_1 WHERE nickname = "Blue Hens"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Where did the Hanzi of 凤凰卫视电影台 originate? ### Context: CREATE TABLE table_name_62 (origin VARCHAR, hanzi VARCHAR) ### Response: ### Response: SELECT origin FROM table_name_62 WHERE hanzi = "凤凰卫视电影台"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: WHich Proto-Polynesian has a Number of five? ### Context: CREATE TABLE table_name_69 (proto_polynesian VARCHAR, number VARCHAR) ### Response: ### Response: SELECT proto_polynesian FROM table_name_69 WHERE number = "five"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What's the result when the Carolina Panthers were the opponent? ### Context: CREATE TABLE table_name_86 (result VARCHAR, opponent VARCHAR) ### Response: ### Response: SELECT result FROM table_name_86 WHERE opponent = "carolina panthers"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What is the autonomous community with television channels tpa tpa2 rtpa internacional? ### Context: CREATE TABLE table_23143607_1 (autonomous_community VARCHAR, television_channels VARCHAR) ### Response: ### Response: SELECT autonomous_community FROM table_23143607_1 WHERE television_channels = "TPA TPA2 RTPA Internacional"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: what is the lowest geo id? ### Context: CREATE TABLE table_18600760_15 (geo_id INTEGER) ### Response: ### Response: SELECT MIN(geo_id) FROM table_18600760_15</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Name the AEDT Time which has an Away team of collingwood? ### Context: CREATE TABLE table_name_62 (aedt_time VARCHAR, away_team VARCHAR) ### Response: ### Response: SELECT aedt_time FROM table_name_62 WHERE away_team = "collingwood"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Name the 2013 club which has a Name of ana grbac category:articles with hcards? ### Context: CREATE TABLE table_name_62 (name VARCHAR) ### Response: ### Response: SELECT 2013 AS _club FROM table_name_62 WHERE name = "ana grbac category:articles with hcards"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: How many locations have been used for ballparks named Memorial Stadium? ### Context: CREATE TABLE table_1987995_5 (location VARCHAR, ballpark VARCHAR) ### Response: ### Response: SELECT COUNT(location) FROM table_1987995_5 WHERE ballpark = "Memorial Stadium"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Which student's age is older than 18 and is majoring in 600? List each student's first and last name. ### Context: CREATE TABLE Student (Fname VARCHAR, Lname VARCHAR, Age VARCHAR, Major VARCHAR) ### Response: ### Response: SELECT Fname, Lname FROM Student WHERE Age > 18 AND Major = 600</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: On September 10 during Strikeforce: Heavyweight Grand Prix Semifinals, what was the PPV buyrate? ### Context: CREATE TABLE table_name_77 (ppv_buyrate VARCHAR, date VARCHAR, event VARCHAR) ### Response: ### Response: SELECT ppv_buyrate FROM table_name_77 WHERE date = "september 10" AND event = "strikeforce: heavyweight grand prix semifinals"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What is the Highest finish with a Most recent finish that was 2nd? ### Context: CREATE TABLE table_name_48 (highest_finish VARCHAR, most_recent_finish VARCHAR) ### Response: ### Response: SELECT highest_finish FROM table_name_48 WHERE most_recent_finish = "2nd"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What is the record when the method is decision and the location is Martigues, France? ### Context: CREATE TABLE table_name_86 (record VARCHAR, method VARCHAR, location VARCHAR) ### Response: ### Response: SELECT record FROM table_name_86 WHERE method = "decision" AND location = "martigues, france"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Count the number of rooms that are not in the Lamberton building. ### Context: CREATE TABLE classroom (building VARCHAR) ### Response: ### Response: SELECT COUNT(*) FROM classroom WHERE building <> 'Lamberton'</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What is the highest week that was played against the Minnesota Vikings? ### Context: CREATE TABLE table_name_5 (week INTEGER, opponent VARCHAR) ### Response: ### Response: SELECT MAX(week) FROM table_name_5 WHERE opponent = "minnesota vikings"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Incumbent Deborah Pryce was a member of what party? ### Context: CREATE TABLE table_1341395_36 (party VARCHAR, incumbent VARCHAR) ### Response: ### Response: SELECT party FROM table_1341395_36 WHERE incumbent = "Deborah Pryce"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What is the average medal total of the country who had 0 silver medals and participated in less than 15 games? ### Context: CREATE TABLE table_name_41 (total INTEGER, games VARCHAR, silver VARCHAR) ### Response: ### Response: SELECT AVG(total) FROM table_name_41 WHERE games < 15 AND silver < 0</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: How many paper types did Ian Drolet design stamps on? ### Context: CREATE TABLE table_11900773_6 (paper_type VARCHAR, design VARCHAR) ### Response: ### Response: SELECT COUNT(paper_type) FROM table_11900773_6 WHERE design = "Ian Drolet"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: When was the successor seated when the district was California 10th? ### Context: CREATE TABLE table_1134091_4 (date_successor_seated VARCHAR, district VARCHAR) ### Response: ### Response: SELECT date_successor_seated FROM table_1134091_4 WHERE district = "California 10th"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: On which team was Robbie Earle the captain? ### Context: CREATE TABLE table_name_5 (team VARCHAR, captain VARCHAR) ### Response: ### Response: SELECT team FROM table_name_5 WHERE captain = "robbie earle"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What time in office does the U.S. Navy have? ### Context: CREATE TABLE table_name_59 (time_in_office VARCHAR, branch VARCHAR) ### Response: ### Response: SELECT time_in_office FROM table_name_59 WHERE branch = "u.s. navy"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Who was the opponent with attendance at 64,002? ### Context: CREATE TABLE table_name_87 (opponent VARCHAR, attendance VARCHAR) ### Response: ### Response: SELECT opponent FROM table_name_87 WHERE attendance = "64,002"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What is the name of the party called name? ### Context: CREATE TABLE table_name_45 (party VARCHAR) ### Response: ### Response: SELECT party FROM table_name_45 WHERE "name" = "name"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: what is the name of the episode which the production code is 62015-08-162 ### Context: CREATE TABLE table_21313498_1 (title VARCHAR, production_code VARCHAR) ### Response: ### Response: SELECT title FROM table_21313498_1 WHERE production_code = "62015-08-162"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Who were the opponents during week 14? ### Context: CREATE TABLE table_name_53 (opponent VARCHAR, week VARCHAR) ### Response: ### Response: SELECT opponent FROM table_name_53 WHERE week = 14</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Which club is associated with Hafiz Abu Sujad? ### Context: CREATE TABLE table_name_80 (club VARCHAR, name VARCHAR) ### Response: ### Response: SELECT club FROM table_name_80 WHERE name = "hafiz abu sujad"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Show times of elimination of wrestlers with days held more than 50. ### Context: CREATE TABLE wrestler (Wrestler_ID VARCHAR, Days_held INTEGER); CREATE TABLE elimination (Time VARCHAR, Wrestler_ID VARCHAR) ### Response: ### Response: SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID WHERE T2.Days_held > 50</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What are the shipping agent names? ### Context: CREATE TABLE Ref_Shipping_Agents (shipping_agent_name VARCHAR) ### Response: ### Response: SELECT shipping_agent_name FROM Ref_Shipping_Agents</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What is the election year when the # of candidates nominated was 262? ### Context: CREATE TABLE table_123462_2 (election VARCHAR, _number_of_candidates_nominated VARCHAR) ### Response: ### Response: SELECT COUNT(election) FROM table_123462_2 WHERE _number_of_candidates_nominated = 262</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What is the largest number in attendance at H venue opposing Liverpool with a result of D? ### Context: CREATE TABLE table_name_40 (attendance INTEGER, opponents VARCHAR, venue VARCHAR, result VARCHAR) ### Response: ### Response: SELECT MAX(attendance) FROM table_name_40 WHERE venue = "h" AND result = "d" AND opponents = "liverpool"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What is the status of the pterosaur named Cathayopterus? ### Context: CREATE TABLE table_name_40 (status VARCHAR, name VARCHAR) ### Response: ### Response: SELECT status FROM table_name_40 WHERE name = "cathayopterus"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: When did Jeremy Kagan's episode first air? ### Context: CREATE TABLE table_23279434_1 (original_air_date VARCHAR, directed_by VARCHAR) ### Response: ### Response: SELECT original_air_date FROM table_23279434_1 WHERE directed_by = "Jeremy Kagan"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: How many average total matches have league cup as the competition, with a draw greater than 0? ### Context: CREATE TABLE table_name_34 (total_matches INTEGER, competition VARCHAR, draw VARCHAR) ### Response: ### Response: SELECT AVG(total_matches) FROM table_name_34 WHERE competition = "league cup" AND draw > 0</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What was the score of the game that home team birmingham city played? ### Context: CREATE TABLE table_name_84 (score VARCHAR, home_team VARCHAR) ### Response: ### Response: SELECT score FROM table_name_84 WHERE home_team = "birmingham city"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What school is in hillsboro city? ### Context: CREATE TABLE table_name_53 (school VARCHAR, city VARCHAR) ### Response: ### Response: SELECT school FROM table_name_53 WHERE city = "hillsboro"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Which surface has a Score of 6–4, 6–2? ### Context: CREATE TABLE table_name_45 (surface VARCHAR, score VARCHAR) ### Response: ### Response: SELECT surface FROM table_name_45 WHERE score = "6–4, 6–2"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What is the pick with Dean Sears and round larger than 6? ### Context: CREATE TABLE table_name_61 (pick INTEGER, round VARCHAR, player VARCHAR) ### Response: ### Response: SELECT MIN(pick) FROM table_name_61 WHERE round > 6 AND player = "dean sears"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What is the title and credits of the course that is taught in the largest classroom (with the highest capacity)? ### Context: CREATE TABLE SECTION (course_id VARCHAR, building VARCHAR, room_number VARCHAR); CREATE TABLE course (title VARCHAR, credits VARCHAR, course_id VARCHAR); CREATE TABLE classroom (capacity INTEGER, building VARCHAR, room_number VARCHAR); CREATE TABLE classroom (capacity INTEGER) ### Response: ### Response: SELECT T3.title, T3.credits FROM classroom AS T1 JOIN SECTION AS T2 ON T1.building = T2.building AND T1.room_number = T2.room_number JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T1.capacity = (SELECT MAX(capacity) FROM classroom)</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: In what format was the release from the Nebt068 catalog on April 11, 2005 in? ### Context: CREATE TABLE table_name_62 (format VARCHAR, date VARCHAR, catalog VARCHAR) ### Response: ### Response: SELECT format FROM table_name_62 WHERE date = "april 11, 2005" AND catalog = "nebt068"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: On which date did Geelong play at home? ### Context: CREATE TABLE table_name_74 (date VARCHAR, home_team VARCHAR) ### Response: ### Response: SELECT date FROM table_name_74 WHERE home_team = "geelong"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What is the record when jameer nelson (19) had the high points? ### Context: CREATE TABLE table_27700530_10 (record VARCHAR, high_points VARCHAR) ### Response: ### Response: SELECT record FROM table_27700530_10 WHERE high_points = "Jameer Nelson (19)"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What is the season # for a teleplay by Richard Price and the director is Steve Shill? ### Context: CREATE TABLE table_14346950_1 (season__number VARCHAR, teleplay_by VARCHAR, directed_by VARCHAR) ### Response: ### Response: SELECT season__number FROM table_14346950_1 WHERE teleplay_by = "Richard Price" AND directed_by = "Steve Shill"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What is the total number of postseason games that team Boston Red Stockings participated in? ### Context: CREATE TABLE postseason (team_id_winner VARCHAR, team_id_loser VARCHAR); CREATE TABLE team (team_id_br VARCHAR, name VARCHAR) ### Response: ### Response: SELECT COUNT(*) FROM (SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' UNION SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings')</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What is the name of the Leading scorer when the Score was 89–102? ### Context: CREATE TABLE table_name_59 (leading_scorer VARCHAR, score VARCHAR) ### Response: ### Response: SELECT leading_scorer FROM table_name_59 WHERE score = "89–102"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Which Name has a Type of loan, and a Moving to of apollon kalamaria? ### Context: CREATE TABLE table_name_97 (name VARCHAR, type VARCHAR, moving_to VARCHAR) ### Response: ### Response: SELECT name FROM table_name_97 WHERE type = "loan" AND moving_to = "apollon kalamaria"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What was the nationality of the player ranking 3? ### Context: CREATE TABLE table_name_13 (nationality VARCHAR, ranking VARCHAR) ### Response: ### Response: SELECT nationality FROM table_name_13 WHERE ranking = "3"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What is the average rank of an athlete that holds a time higher than 53.38? ### Context: CREATE TABLE table_name_76 (rank INTEGER, time INTEGER) ### Response: ### Response: SELECT AVG(rank) FROM table_name_76 WHERE time > 53.38</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: How many airlines are from USA? ### Context: CREATE TABLE AIRLINES (Country VARCHAR) ### Response: ### Response: SELECT COUNT(*) FROM AIRLINES WHERE Country = "USA"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Who was the draft pick that went to college at Oral Roberts? ### Context: CREATE TABLE table_name_44 (player VARCHAR, college VARCHAR) ### Response: ### Response: SELECT player FROM table_name_44 WHERE college = "oral roberts"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Which 2005 has a 1999 of 0–0? ### Context: CREATE TABLE table_name_37 (Id VARCHAR) ### Response: ### Response: SELECT 2005 FROM table_name_37 WHERE 1999 = "0–0"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Name the record for l 106–116 (ot) ### Context: CREATE TABLE table_23285849_8 (record VARCHAR, score VARCHAR) ### Response: ### Response: SELECT record FROM table_23285849_8 WHERE score = "L 106–116 (OT)"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: I want the total number of Grids for heinz-harald frentzen ### Context: CREATE TABLE table_name_10 (grid VARCHAR, driver VARCHAR) ### Response: ### Response: SELECT COUNT(grid) FROM table_name_10 WHERE driver = "heinz-harald frentzen"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: how many points scored by sportivo luqueño ### Context: CREATE TABLE table_16788123_5 (points VARCHAR, team VARCHAR) ### Response: ### Response: SELECT COUNT(points) FROM table_16788123_5 WHERE team = "Sportivo Luqueño"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What rounds did Phoenix International Raceway host? ### Context: CREATE TABLE table_22669816_1 (rnd VARCHAR, track VARCHAR) ### Response: ### Response: SELECT rnd FROM table_22669816_1 WHERE track = "Phoenix International Raceway"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Party of republican, and a District of 7th is what elected? ### Context: CREATE TABLE table_name_81 (elected VARCHAR, party VARCHAR, district VARCHAR) ### Response: ### Response: SELECT elected FROM table_name_81 WHERE party = "republican" AND district = "7th"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: what is the number of area where the county is marsabit? ### Context: CREATE TABLE table_1404486_1 (area__km_2__ VARCHAR, county VARCHAR) ### Response: ### Response: SELECT COUNT(area__km_2__) FROM table_1404486_1 WHERE county = "Marsabit"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Which decile features Mayfield School? ### Context: CREATE TABLE table_name_90 (decile VARCHAR, name VARCHAR) ### Response: ### Response: SELECT decile FROM table_name_90 WHERE name = "mayfield school"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Who is the builder of Pennant d03? ### Context: CREATE TABLE table_name_43 (builder VARCHAR, pennant_number VARCHAR) ### Response: ### Response: SELECT builder FROM table_name_43 WHERE pennant_number = "d03"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Find the official names of cities with population bigger than 1500 or smaller than 500. ### Context: CREATE TABLE city (Official_Name VARCHAR, Population VARCHAR) ### Response: ### Response: SELECT Official_Name FROM city WHERE Population > 1500 OR Population < 500</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: what's the tries against with try bonus being 10 ### Context: CREATE TABLE table_13940275_5 (tries_against VARCHAR, try_bonus VARCHAR) ### Response: ### Response: SELECT tries_against FROM table_13940275_5 WHERE try_bonus = "10"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Where is the headquarters of the place whose abbreviation is hy? ### Context: CREATE TABLE table_1610301_1 (headquarters VARCHAR, code VARCHAR) ### Response: ### Response: SELECT headquarters FROM table_1610301_1 WHERE code = "HY"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: How many viewers (in millions) watched the episode written by deidre shaw? ### Context: CREATE TABLE table_22951088_3 (us_viewers__in_millions_ VARCHAR, written_by VARCHAR) ### Response: ### Response: SELECT us_viewers__in_millions_ FROM table_22951088_3 WHERE written_by = "Deidre Shaw"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Which episodes did Nelson McCormick direct? ### Context: CREATE TABLE table_17355820_1 (written_by VARCHAR, directed_by VARCHAR) ### Response: ### Response: SELECT written_by FROM table_17355820_1 WHERE directed_by = "Nelson McCormick"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What is the lowest money ($) that has t8 as the place, with a to par greater than 19? ### Context: CREATE TABLE table_name_75 (money___ INTEGER, place VARCHAR, to_par VARCHAR) ### Response: ### Response: SELECT MIN(money___) AS $__ FROM table_name_75 WHERE place = "t8" AND to_par > 19</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: what tournament happened on march 27, 2006? ### Context: CREATE TABLE table_name_34 (tournament VARCHAR, date VARCHAR) ### Response: ### Response: SELECT tournament FROM table_name_34 WHERE date = "march 27, 2006"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What was the score when Arsenal was the away team? ### Context: CREATE TABLE table_name_49 (score VARCHAR, away_team VARCHAR) ### Response: ### Response: SELECT score FROM table_name_49 WHERE away_team = "arsenal"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Which Athlete has a Rank larger than 1, and a Lane larger than 7, and a Nationality of china? ### Context: CREATE TABLE table_name_97 (athlete VARCHAR, nationality VARCHAR, rank VARCHAR, lane VARCHAR) ### Response: ### Response: SELECT athlete FROM table_name_97 WHERE rank > 1 AND lane > 7 AND nationality = "china"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Name the games w-1 for cliff richey ### Context: CREATE TABLE table_23145653_1 (games_w_l VARCHAR, player VARCHAR) ### Response: ### Response: SELECT games_w_l FROM table_23145653_1 WHERE player = "Cliff Richey"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Who is the winner with an elapsed time of 12 h 42 min? ### Context: CREATE TABLE table_22050544_1 (winner VARCHAR, elapsed_time VARCHAR) ### Response: ### Response: SELECT winner FROM table_22050544_1 WHERE elapsed_time = "12 h 42 min"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: An artist of the Beatles with an issue date(s) of 19 September has what as the listed weeks on top? ### Context: CREATE TABLE table_name_26 (weeks_on_top VARCHAR, artist VARCHAR, issue_date_s_ VARCHAR) ### Response: ### Response: SELECT weeks_on_top FROM table_name_26 WHERE artist = "the beatles" AND issue_date_s_ = "19 september"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: When 25 are willing to take risks, what is the experts view? ### Context: CREATE TABLE table_1855342_5 (experts_view INTEGER, willing_to_take_risks VARCHAR) ### Response: ### Response: SELECT MIN(experts_view) FROM table_1855342_5 WHERE willing_to_take_risks = 25</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What is the highest First Elected, when Party is "Republican", and when District is "Louisiana 7"? ### Context: CREATE TABLE table_name_48 (first_elected INTEGER, party VARCHAR, district VARCHAR) ### Response: ### Response: SELECT MAX(first_elected) FROM table_name_48 WHERE party = "republican" AND district = "louisiana 7"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Name the number of ranks for south korea ### Context: CREATE TABLE table_14752049_5 (rank VARCHAR, country VARCHAR) ### Response: ### Response: SELECT COUNT(rank) FROM table_14752049_5 WHERE country = "South Korea"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: How many Wins have Winnings of $184,190, and a Top 10 larger than 1? ### Context: CREATE TABLE table_name_8 (wins VARCHAR, winnings VARCHAR, top_10 VARCHAR) ### Response: ### Response: SELECT COUNT(wins) FROM table_name_8 WHERE winnings = "$184,190" AND top_10 > 1</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What is the 2011 when the 2007 is a, and the 2012 is sf? ### Context: CREATE TABLE table_name_58 (Id VARCHAR) ### Response: ### Response: SELECT 2011 FROM table_name_58 WHERE 2007 = "a" AND 2012 = "sf"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Which Game is the highest one that has a Score of 3–2? ### Context: CREATE TABLE table_name_92 (game INTEGER, score VARCHAR) ### Response: ### Response: SELECT MAX(game) FROM table_name_92 WHERE score = "3–2"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: How many laps did gunnar nilsson drive? ### Context: CREATE TABLE table_name_69 (laps INTEGER, driver VARCHAR) ### Response: ### Response: SELECT SUM(laps) FROM table_name_69 WHERE driver = "gunnar nilsson"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Where is Jeff Lebo's hometown? ### Context: CREATE TABLE table_name_45 (hometown VARCHAR, player VARCHAR) ### Response: ### Response: SELECT hometown FROM table_name_45 WHERE player = "jeff lebo"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Which ride opened after the 2000 Peeking Heights? ### Context: CREATE TABLE table_name_32 (type VARCHAR, opened_in VARCHAR, ride_name VARCHAR) ### Response: ### Response: SELECT type FROM table_name_32 WHERE opened_in > 2000 AND ride_name = "peeking heights"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Which round had Michael Schumacher in the pole position, David Coulthard with the fastest lap, and McLaren - Mercedes as the winning constructor? ### Context: CREATE TABLE table_1132600_3 (round VARCHAR, winning_constructor VARCHAR, pole_position VARCHAR, fastest_lap VARCHAR) ### Response: ### Response: SELECT COUNT(round) FROM table_1132600_3 WHERE pole_position = "Michael Schumacher" AND fastest_lap = "David Coulthard" AND winning_constructor = "McLaren - Mercedes"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What is the purpose of Long Shot? ### Context: CREATE TABLE table_name_91 (purpose VARCHAR, name VARCHAR) ### Response: ### Response: SELECT purpose FROM table_name_91 WHERE name = "long shot"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: How many against when losses are 11 and wins are fewer than 5? ### Context: CREATE TABLE table_name_24 (against INTEGER, losses VARCHAR, wins VARCHAR) ### Response: ### Response: SELECT AVG(against) FROM table_name_24 WHERE losses = 11 AND wins < 5</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What is the score if Millwall is the Home Team? ### Context: CREATE TABLE table_name_18 (score VARCHAR, home_team VARCHAR) ### Response: ### Response: SELECT score FROM table_name_18 WHERE home_team = "millwall"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What's the total that the position is less than 1? ### Context: CREATE TABLE table_name_31 (total INTEGER, position INTEGER) ### Response: ### Response: SELECT MIN(total) FROM table_name_31 WHERE position < 1</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What is the free of Apolline Dreyfuss & Lila Meesseman-Bakir, when the total was larger than 90.333? ### Context: CREATE TABLE table_name_87 (free INTEGER, athlete VARCHAR, total VARCHAR) ### Response: ### Response: SELECT MIN(free) FROM table_name_87 WHERE athlete = "apolline dreyfuss & lila meesseman-bakir" AND total > 90.333</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What is the result F_A on 17 December 2002? ### Context: CREATE TABLE table_name_60 (result_f_a VARCHAR, date VARCHAR) ### Response: ### Response: SELECT result_f_a FROM table_name_60 WHERE date = "17 december 2002"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: When was Color of green last issued? ### Context: CREATE TABLE table_name_26 (first_issued INTEGER, color VARCHAR) ### Response: ### Response: SELECT MAX(first_issued) FROM table_name_26 WHERE color = "green"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What's Bulgaria's lane? ### Context: CREATE TABLE table_name_19 (lane INTEGER, nationality VARCHAR) ### Response: ### Response: SELECT AVG(lane) FROM table_name_19 WHERE nationality = "bulgaria"</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: How many total wins are associated with events with 1 top-10? ### Context: CREATE TABLE table_name_63 (wins INTEGER, top_10 VARCHAR) ### Response: ### Response: SELECT SUM(wins) FROM table_name_63 WHERE top_10 = 1</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: Find the total number of matches. ### Context: CREATE TABLE matches (Id VARCHAR) ### Response: ### Response: SELECT COUNT(*) FROM matches</s>
<s>### Instruction: You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. ### Dialect: sqlite ### Input: What's the mountains classification when the points classification is Alessandro Petacchi and the general classification is Danilo Di Luca? ### Context: CREATE TABLE table_name_26 (mountains_classification VARCHAR, points_classification VARCHAR, general_classification VARCHAR) ### Response: ### Response: SELECT mountains_classification FROM table_name_26 WHERE points_classification = "alessandro petacchi" AND general_classification = "danilo di luca"</s>