sentence
stringlengths
3
347
sql
stringlengths
18
804
What is the percentage of subject who are female used the Vehicle as weapon?
SELECT CAST(SUM(T1.subject_weapon = 'Vehicle') AS REAL) * 100 / COUNT(T1.case_number) FROM incidents T1 INNER JOIN subjects T2 ON T1.case_number = T2.case_number WHERE T2.gender = 'F'
What construction completed on 08/10/2007?
SELECT listed FROM table_name_46 WHERE construction_completed = "08/10/2007"
What is the team's record on februrary 23?
SELECT record FROM table_name_29 WHERE february = 23
How many names in this table?
SELECT count ( Name ) FROM branch
what is the country of support rep id 5
SELECT country from customers where support_rep_id = 5
List the name of all New Zealand umpires.
SELECT T1.Umpire_Name FROM Umpire AS T1 INNER JOIN Country AS T2 ON T1.Umpire_Country = T2.Country_Id WHERE T2.Country_Name = 'New Zealand'
What is the Community Band with a 4BCB Callsign?
SELECT band FROM table_name_95 WHERE purpose = "community" AND callsign = "4bcb"
What is the Hanja/Kanji of the Province with a Korean name of Chungcheong-Bukdo?
SELECT hanja___kanji FROM table_name_5 WHERE korean_name = "chungcheong-bukdo"
what is the city when the country is libya and the iata is ben?
SELECT city FROM table_name_57 WHERE country = "libya" AND iata = "ben"
What was the score of the game when the home was Atlanta?
SELECT score FROM table_name_99 WHERE home = "atlanta"
Give the state and type of term of the legislator with the google entity ID of kg:/m/02pyzk.
SELECT T2.state, T2.type FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.google_entity_id_id = 'kg:/m/02pyzk'
What are the racing teams for which the average finish is 23.3?
SELECT team_s_ FROM table_2190919_1 WHERE avg_finish = "23.3"
What is reserved for Jawad?
SELECT reserved_for___sc___st__none_ FROM table_name_27 WHERE name = "jawad"
Name the US Hot 100 for album of I like you
SELECT us_hot_100 FROM table_name_81 WHERE album = "i like you"
Find the salaries of all distinct instructors that are less than the largest salary.
SELECT DISTINCT salary FROM instructor WHERE salary < (SELECT max(salary) FROM instructor)
What is the most recent year with the Album/Song "the best worst-case scenario"?
SELECT MAX(year) FROM table_name_19 WHERE album___song = "the best worst-case scenario"
What competition did the maccabi haifa fc club play?
SELECT competition FROM table_name_87 WHERE club = "maccabi haifa fc"
What is the Korean dialect with a jeolla RR Romaja?
SELECT korean_dialect FROM table_name_18 WHERE rr_romaja = "jeolla"
When the Mandarins won more than 1 bronze medals, how many gold medals did they win?
SELECT COUNT(gold_medals) FROM table_name_3 WHERE ensemble = "mandarins" AND bronze_medals > 1
What are the different names and ages of every friend of either Dan or alice?
SELECT DISTINCT T1.name , T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' OR T2.friend = 'Alice'
Which finish has 33 as a rank and 200 for laps?
SELECT finish FROM table_name_24 WHERE rank = "33" AND laps = 200
Which Trident version has a Gecko value of 19.0?
SELECT trident FROM table_name_57 WHERE gecko = "19.0"
List the group name has the most downloaded that have released jazz genres from 1982 or later.
SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'jazz' AND T1.groupYear >= 1982 ORDER BY T1.totalSnatched DESC LIMIT 1
How many clubs are located at "HHH"?
SELECT count(*) FROM club WHERE clublocation = "HHH"
In language where Thursday is برس وار bres'var, what is Sunday?
SELECT sunday_surya__the_sun_ FROM table_1277350_3 WHERE thursday_guru__jupiter_ = "برس وار Bres'var"
What percentage of the total prices of all orders are shipped internationally?
SELECT CAST(SUM(CASE WHEN T3.method_name = 'International' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM cust_order AS T1 INNER JOIN order_line AS T2 ON T1.order_id = T2.order_id INNER JOIN shipping_method AS T3 ON T3.method_id = T1.shipping_method_id
What is the name of this restaurant?
SELECT ResName FROM Restaurant JOIN Type_Of_Restaurant ON Restaurant.ResID = Type_Of_Restaurant.ResID JOIN Restaurant_Type ON Type_Of_Restaurant.ResTypeID = Restaurant_Type.ResTypeID GROUP BY Type_Of_Restaurant.ResTypeID HAVING Restaurant_Type.ResTypeName = 'Sandwich'
What is the Enrollment at Whitman College Founded after 1859?
SELECT AVG(enrollment) FROM table_name_6 WHERE institution = "whitman college" AND founded > 1859
where is hte second place winner from united kingdom?
SELECT winner FROM table_1359212_2 WHERE second_place = "United Kingdom"
who is the candidate in district south carolina 2?
SELECT candidates FROM table_1342370_39 WHERE district = "South Carolina 2"
What is From Club, when Player is "Robinho"?
SELECT from_club FROM table_name_80 WHERE player = "robinho"
Which callsign has ERP W of 99 and a frequency of greater than 88.7MHz?
SELECT call_sign FROM table_name_15 WHERE frequency_mhz > 88.7 AND erp_w = 99
what is the course id of English course?
SELECT course_id FROM courses where course_name = "English"
Find the names of all modern rooms with a base price below $160 and two beds.
SELECT roomName FROM Rooms WHERE basePrice < 160 AND beds = 2 AND decor = 'modern';
Which week's game had an attendance of 90,138?
SELECT week FROM table_name_37 WHERE attendance = "90,138"
What was the loss of the Mariners game when they had a record of 22-35?
SELECT loss FROM table_name_96 WHERE record = "22-35"
List all the books published by BBC Audiobooks.
SELECT T1.title FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T2.publisher_name = 'BBC Audiobooks'
In the Central region, where the land area (km 2) is 8,543.2, what was the rainfall by depth (mm/year)?
SELECT rainfall_by_depth__mm_year_ FROM table_25983027_1 WHERE land_area__km_2__ = "8,543.2"
Which Rank has a Reaction time larger than 0.20400000000000001, and a Time larger than 45.56?
SELECT MAX(rank) FROM table_name_98 WHERE react > 0.20400000000000001 AND time > 45.56
List street names in San Francisco city.
SELECT street_name FROM location WHERE city = 'San Francisco'
Great! Can you provide me with the name, location, and product for each enzyme that is associated with the "inhibitor" interaction type?
SELECT DISTINCT T1.name , T1.location , T1.product FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.enzyme_id = T1.id WHERE T2.interaction_type = 'inhibitor'
Can you tell me the lowest Races that has the Team Name of piquet gp, and the Points larger than 24?
SELECT MIN(races) FROM table_name_16 WHERE team_name = "piquet gp" AND points > 24
Which Date has a Score of 6–1 7–6 (8–6)?
SELECT date FROM table_name_11 WHERE score = "6–1 7–6 (8–6)"
What League's Round is Sup and Position is Right Wing?
SELECT college_junior_club_team__league_ FROM table_name_38 WHERE position = "right wing" AND round = "sup"
Which Land (sqmi) has a GEO ID smaller than 3800587900?
SELECT MIN(land___sqmi__) FROM table_name_49 WHERE geo_id < 3800587900
What is the highest number of games tied for teams with under 551 games and a percentage of under 0.5593?
SELECT MAX(tied) FROM table_name_8 WHERE pct < 0.5593 AND lost = 551
What's the Nationality of Round 8 Vancouver Canucks NHL Team of Swift Current Broncos (WHL)?
SELECT nationality FROM table_name_12 WHERE nhl_team = "vancouver canucks" AND college_junior_club_team__league_ = "swift current broncos (whl)" AND round = 8
What is the ISO for South Sudan?
SELECT iso_3166_2_codes FROM table_222771_1 WHERE english_short_name__upper_lower_case_ = "South Sudan"
How many places have yamaha as the machine, and 89.85mph as the speed?
SELECT SUM(place) FROM table_name_30 WHERE machine = "yamaha" AND speed = "89.85mph"
What is the A-league with 39 saves?
SELECT a_league FROM table_name_7 WHERE saves = 39
Which surface do opponents of Thomas Oger Nicolas Tourte have?
SELECT surface FROM table_name_18 WHERE opponents = "thomas oger nicolas tourte"
What are the names of the physician who prescribed the highest dose?
SELECT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician ORDER BY T2.dose DESC LIMIT 1
Which Attendance has a Score of 0:2?
SELECT MAX(attendance) FROM table_name_29 WHERE score = "0:2"
Who is directed by Star Wars? | Did you mean to ask for the name of the director who directed Star Wars? | Yes
SELECT director FROM Movie WHERE title = "Star Wars"
What was the average round when he had a 3-0 record?
SELECT AVG(round) FROM table_name_18 WHERE record = "3-0"
What is the air date of TV series with Episode "A Love of a Lifetime"?
SELECT Air_Date FROM TV_series WHERE Episode = "A Love of a Lifetime";
What is the donation message for donation ID a84dace1ff716f6f0c7af8ef9090a5d5?
SELECT donation_message FROM donations WHERE donationid = 'a84dace1ff716f6f0c7af8ef9090a5d5'
What are all episodes with a viewing figure of 6.72 million?
SELECT episode FROM table_15026994_2 WHERE viewing_figure = "6.72 million"
List the names of teachers in ascending order of age.
SELECT Name FROM teacher ORDER BY Age
How many patients of Irish ethnicity take medication for 'myocardial infarction'?
SELECT COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T2.REASONDESCRIPTION = 'Myocardial Infarction' AND T1.ethnicity = 'irish'
Which week starts on November 23, 1997?
SELECT week FROM table_name_55 WHERE date = "november 23, 1997"
What is the opponent for the date of august 5?
SELECT opponent FROM table_name_75 WHERE date = "august 5"
What are the prices of those?
SELECT Product_Price FROM Products WHERE Product_Type_Code = "Food"
Which Xenon has a Helium of 5.1?
SELECT xenon FROM table_name_29 WHERE helium = "5.1"
How many lakes in the Canary Islands cover an area of over 1000000?
SELECT COUNT(T2.Name) FROM located AS T1 INNER JOIN lake AS T2 ON T1.Lake = T2.Name WHERE T1.Province = 'Canary Islands' AND T2.Area > 1000000
And which of those aircraft won a match?
SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft
What are the names of each of those?
SELECT name,installation_date FROM station WHERE city = "San Jose"
For Chosun University, what was its score on "Influence Rank" in 2015?
SELECT T2.score FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id INNER JOIN university AS T3 ON T3.id = T2.university_id WHERE T3.university_name = 'Chosun University' AND T1.criteria_name = 'Influence Rank' AND T2.year = 2015
WHAT ARE THE LAPS WITH POINTS LARGER THAN 5, WITH FORSYTHE RACING, AND GRID 5?
SELECT MIN(laps) FROM table_name_22 WHERE points > 5 AND team = "forsythe racing" AND grid = 5
What is the name of the most expensive car that was produced by the USA?
SELECT T4.car_name FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country INNER JOIN data AS T4 ON T4.ID = T1.ID WHERE T3.country = 'USA' ORDER BY T1.price DESC LIMIT 1
What are the full names of the course authors who teach the course with the name "advanced database" please?
SELECT T1.personal_name, t1.middle_name, t1.family_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = "advanced database"
list both the countries with mountains height less than 5200 and height more than 5600 in the same table
SELECT Country FROM mountain WHERE Height > 5600 INTERSECT SELECT Country FROM mountain WHERE Height < 5200
WHICH BROWSER IS COMPATIBLE WITH ACCELERATOR 'CPROXY' AFTER YEAR 1998
SELECT T1.name FROM browser AS T1 JOIN accelerator_compatible_browser AS T2 ON T1.id = T2.browser_id JOIN web_client_accelerator AS T3 ON T2.accelerator_id = T3.id WHERE T3.name = 'CProxy' AND T2.compatible_since_year > 1998
What are the award description with Format album?
SELECT award_description_s_ FROM table_name_84 WHERE format_s_ = "album"
What is the largest supplier's account balance?
SELECT MAX(s_acctbal) FROM supplier
What are the "en" methods with solutions from repository "1093"
SELECT DISTINCT T2.id FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.RepoId = 1093 AND T2.Lang = 'en'
what's the mole with winner being frédérique huydts
SELECT the_mole FROM table_13036251_1 WHERE winner = "Frédérique Huydts"
What is average age for different job title?
SELECT avg(age) , job FROM Person GROUP BY job
When the date is July 8, and the score is 8-12, who is the opponent?
SELECT opponent FROM table_name_78 WHERE date = "july 8" AND score = "8-12"
Which team does Andreas Jamtin belong to?
SELECT DISTINCT T1.TEAM FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Andreas Jamtin'
What are the order IDs that have those product IDs?
select T2.order_id from Products as T1 join Order_Items as T2 where T1.product_id = T2.product_id and T1.product_name = 'food'
Name the opponents stanford
SELECT opponents FROM table_21092444_1 WHERE opponent = "Stanford"
List the writers who have written more than one book.
SELECT Writer FROM book GROUP BY Writer HAVING COUNT(*) > 1
For the player who had the most rebounds throughout his allstar appearances, what was his weight and height?
SELECT T1.weight, T1.height FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID ORDER BY T2.rebounds DESC LIMIT 1
What are the names of all cities with more than one airport and how many airports do they have?
SELECT city , count(*) FROM airports GROUP BY city HAVING count(*) > 1
Tell me the command set with FDD capacity of 270kb and sides of ds with #FDD more than 1
SELECT command_set FROM table_name_35 WHERE fdd_capacity__each_ = "270kb" AND sides = "ds" AND _number_fdd > 1
Show the number of document types.
SELECT count(*) FROM Ref_document_types
When was there a game at Kardinia Park?
SELECT date FROM table_name_78 WHERE venue = "kardinia park"
What are the names of players who train between 500 and 1500 hours?
SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500
what is the date when the format is cd (limited edition steel-box) from united kingdom?
SELECT date FROM table_name_16 WHERE format = "cd (limited edition steel-box)" AND country = "united kingdom"
What player was picked for Buffalo Sabres?
SELECT player FROM table_2886617_8 WHERE nhl_team = "Buffalo Sabres"
WHAT ARE THE BYES WITH A DRAWS OF 1, SMW ROVERS, AND WINS LARGER THAN 6?
SELECT AVG(byes) FROM table_name_76 WHERE draws = 1 AND mininera_dfl = "smw rovers" AND wins > 6
What is the average access count of documents?
SELECT avg(access_count) FROM documents
What is the customer ID of America Jaskolski
SELECT Customer_ID FROM customers where Customer_name = 'America Jaskolski'
Which restaurant has highest rating? List the restaurant name and its rating.
SELECT ResName , Rating FROM Restaurant ORDER BY Rating DESC LIMIT 1;
Calculate the average level difference between the Marketing editors hired by the US and non-US publishers?
SELECT (CAST(SUM(CASE WHEN T1.country = 'USA' THEN job_lvl ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.country = 'USA' THEN 1 ELSE 0 END)) - (CAST(SUM(CASE WHEN T1.country != 'USA' THEN job_lvl ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.country != 'USA' THEN 1 ELSE 0 END)) FROM publishers AS T1 INNER JOIN employee AS T2 ON T1.pub_id = T2.pub_id INNER JOIN jobs AS T3 ON T2.job_id = T3.job_id WHERE T3.job_desc = 'Managing Editor'
What is in 2002 has a 2001 score 1–0, and a 2000 of 3–0?
SELECT 2002 FROM table_name_85 WHERE 2001 = "1–0" AND 2000 = "3–0"
What's the lowest team 1 number that had asolo fonte (veneto b) as the Agg.?
SELECT MIN(team_1) FROM table_name_89 WHERE agg = "asolo fonte (veneto b)"
What is the lowest election that has cinisello balsamo as the municipality?
SELECT MIN(election) FROM table_name_4 WHERE municipality = "cinisello balsamo"
When was the incumbent in the Tennessee 4 district first elected?
SELECT first_elected FROM table_1341453_44 WHERE district = "Tennessee 4"