sentence
stringlengths
3
347
sql
stringlengths
18
804
Title of the angry brigade involves which lowest year?
SELECT MIN(year) FROM table_name_49 WHERE title = "the angry brigade"
Find names and ids of all documents with document type code BK.
SELECT document_name , document_id FROM Documents WHERE document_type_code = "BK"
Give the advisor with the most students.
SELECT advisor FROM Student GROUP BY advisor ORDER BY count(*) DESC LIMIT 1
What is the defective year for the regular year of 29 days and month sequence of 2?
SELECT MAX(defective_year) FROM table_28985631_1 WHERE regular_year = "29 days" AND month_sequence = 2
What is the Latin word for the English word bone?
SELECT latin FROM table_name_33 WHERE english = "bone"
In Ascot (UK), what was the result?
SELECT result FROM table_14981555_3 WHERE venue = "Ascot (UK)"
What are the different software platforms for devices, and how many devices have each?
SELECT Software_Platform , COUNT(*) FROM device GROUP BY Software_Platform
How old is dan?
SELECT age FROM Person WHERE name = 'Dan'
What are the teams that played in a match with the point of winning margin of 38 on April 30, 2009?
SELECT T1.Team_Name FROM Team AS T1 INNER JOIN Match AS T2 ON T1.Team_Id = T2.Team_1 WHERE T2.win_margin = 38 AND match_date = '2009-04-30'
Venue of thessaloniki (without participation) had what score?
SELECT score FROM table_name_99 WHERE venue = "thessaloniki (without participation)"
How many times is the postion S?
SELECT COUNT(overall) FROM table_name_4 WHERE position = "s"
Give the different positions of players who play for the country with the capital Dublin.
SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Capital = "Dublin"
What is the highest difference for the team that had less than 0 draws?
SELECT MAX(difference) FROM table_name_98 WHERE drew < 0
Which R.A. (J2000) has a Name of ngc 1543?
SELECT ra___j2000__ FROM table_name_68 WHERE name = "ngc 1543"
what is the score when the competition is 1995 southeast asian games?
SELECT score FROM table_name_1 WHERE competition = "1995 southeast asian games"
What is the name of the singer with the largest net worth?
SELECT Name FROM singer ORDER BY Net_Worth_Millions DESC LIMIT 1
How many points were there in a year earlier than 1977, a Cosworth V8 engine, and an entry from HB Bewaking alarm systems?
SELECT points FROM table_name_68 WHERE year < 1977 AND engine = "cosworth v8" AND entrant = "hb bewaking alarm systems"
what stadium has a prior record of 7th?
SELECT stadium FROM table_name_8 WHERE past_season = "7th"
What are first and last names of all customers?
SELECT customer_first_name , customer_last_name FROM Customers
What was Tim Simpson's place?
SELECT place FROM table_name_94 WHERE player = "tim simpson"
What nation had 1399.3 points?
SELECT nation FROM table_name_35 WHERE points = 1399.3
What is the Record of the Montreal Canadiens Home game on March 23?
SELECT record FROM table_name_38 WHERE home = "montreal canadiens" AND date = "march 23"
What's the number & name for the description peckett 0-4-0st?
SELECT number_ & _name FROM table_name_72 WHERE description = "peckett 0-4-0st"
Show all movie titles, years, and directors, ordered by budget.
SELECT title , YEAR , director FROM movie ORDER BY budget_million
what is the lowest qualifying rank?
SELECT MIN(qualifying_rank) FROM table_13114949_3
Which of the highest drawn has a played less than 10?
SELECT MAX(drawn) FROM table_name_96 WHERE played < 10
What was the highest number of students in attendance for the university of north texas?
SELECT MAX(enrollment) FROM table_28243691_1 WHERE institution = "University of North Texas"
List the authors who do not have submission to any workshop.
SELECT Author FROM submission WHERE Submission_ID NOT IN (SELECT Submission_ID FROM acceptance)
What place has the score of 67-74=141?
SELECT place FROM table_name_2 WHERE score = 67 - 74 = 141
What is the most expensive procedure? | Do you mean the name of the procedure with the highest cost? | Yes.
SELECT name FROM procedures order by cost desc limit 1
How many more "buffets" than "gyms" in Yelp business?
SELECT SUM(CASE WHEN T1.category_name LIKE 'Buffets' THEN 1 ELSE 0 END) - SUM(CASE WHEN T1.category_name LIKE 'Gyms' THEN 1 ELSE 0 END) FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id
What are the average price and score of wines grouped by appelation?
SELECT avg(Price) , avg(Score) , Appelation FROM WINE GROUP BY Appelation
Tell me the first and last name of the student who has the most activities.
SELECT T1.fname , T1.lname FROM Student AS T1 JOIN Participates_in AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY count(*) DESC LIMIT 1
What is average and maximum salary of all employees.
SELECT AVG(salary), MAX(salary) FROM Employee
what is the total number of games played when the goals for is less than 30?
SELECT COUNT(games_played) FROM table_name_8 WHERE goals_for < 30
Give the cities and district names that belong to the country with Hajastan as its local name.
SELECT T2.Name, T2.District FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T1.LocalName = 'Hajastan'
How many ranks have professors
SELECT COUNT ( * ) FROM faculty where rank = "Professor"
what is the reported death date for laura svehaug?
SELECT reported_death_date FROM table_name_97 WHERE name = "laura svehaug"
How many people were in the crowd when Essendon was the home team?
SELECT COUNT(crowd) FROM table_name_78 WHERE home_team = "essendon"
Which locomotives 12" x 17" are both ex-industrial and built by Manning Wardle?
SELECT name FROM table_1157867_2 WHERE notes = "Ex-industrial" AND builder = "Manning Wardle"
What season was an episode directed by wendey stanzler?
SELECT MAX(no_in_season) FROM table_25716399_1 WHERE directed_by = "Wendey Stanzler"
who is the oldest artist? | do you want to show his/her name? | yes
SELECT name FROM artist order by age desc limit 1
and what is the scientist id for project Aerodynamics and Bridge Design
SELECT t2.Scientist FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project WHERE T1.name = 'Aerodynamics and Bridge Design'
If the salary range is 4,000-9,000, what is the Indians %?
SELECT indians FROM table_27257896_2 WHERE salary_range = "4,000-9,000"
Name the ezhavas and syrian christians being 26.2
SELECT ezhavas FROM table_23214055_2 WHERE syrian_christians = "26.2"
Who built the car that ran out of fuel before 28 laps?
SELECT constructor FROM table_name_47 WHERE laps < 28 AND time_retired = "out of fuel"
What is the percentage of students who get a "B" in the course "Computer Network"?
SELECT CAST(SUM(CASE WHEN T1.grade = 'B' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.student_id) FROM registration AS T1 INNER JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.name = 'Computer Network'
Name the number of overall nt points for 248.9
SELECT COUNT(overall_nt_points) FROM table_14407512_24 WHERE points = "248.9"
What is the title of the German film that is originally called Mama, Ich Lebe?
SELECT film_title_used_in_nomination FROM table_name_14 WHERE language = "german" AND original_name = "mama, ich lebe"
Which team has the most Swedish?
SELECT T.TEAM FROM ( SELECT T2.TEAM, COUNT(DISTINCT T1.ELITEID) FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.nation = 'Sweden' GROUP BY T2.TEAM ORDER BY COUNT(DISTINCT T1.ELITEID) DESC LIMIT 1 ) AS T
What's Salem State University's primary conference?
SELECT primary_conference FROM table_1974545_2 WHERE institution = "Salem State University"
How many lessons taught by staff whose first name has letter 'a' in it?
SELECT COUNT(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE "%a%"
Which Opponent has an Attendance of 24,791?
SELECT opponent FROM table_name_94 WHERE attendance = "24,791"
Which 5 players have the highest potential? | Do you want the names of those players? | Yes, please.
SELECT distinct T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id ORDER BY potential DESC LIMIT 5
How many times did Keven Kuhn receive DTaP immunization?
SELECT COUNT(T2.CODE) FROM patients AS T1 INNER JOIN immunizations AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Keven' AND T1.last = 'Kuhn' AND T2.DESCRIPTION = 'DTaP'
What is the PSOE for the Local Elections polling firm?
SELECT psoe FROM table_name_78 WHERE polling_firm = "local elections"
What is the total Launches to date with a Version of 541, and CCBs smaller than 1?
SELECT COUNT(launches_to_date) FROM table_name_8 WHERE version = "541" AND ccbs < 1
What's the highest Year with the Region of Southeast?
SELECT MAX(year) FROM table_name_11 WHERE region = "southeast"
Hmm, can you tell me the color description of the product with the name “catnip”?
SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = "catnip"
How many parties were represented for Charles R. Crisp?
SELECT COUNT(party) FROM table_1342370_10 WHERE incumbent = "Charles R. Crisp"
In what country is Hokkaidō and New Chitose airport located?
SELECT country FROM table_name_55 WHERE province_region = "hokkaidō" AND airport = "new chitose airport"
Which year had the most released films?
SELECT movie_release_year FROM movies GROUP BY movie_release_year ORDER BY COUNT(movie_id) DESC LIMIT 1
Show the distinct venues of debates
SELECT DISTINCT Venue FROM debate
What is the product description of Headset Ball Bearings?
SELECT T1.Description FROM ProductDescription AS T1 INNER JOIN Product AS T2 WHERE T2.Name = 'Headset Ball Bearings' AND T1.productDescriptionID = T2.ProductID
Which Event resulted in a Win for Opponent, Shane Ott?
SELECT event FROM table_name_4 WHERE res = "win" AND opponent = "shane ott"
What is the average Pick when the round was less than 6 for kenneth green?
SELECT AVG(pick) FROM table_name_7 WHERE round < 6 AND player = "kenneth green"
Find the number of routes and airport name for each source airport, order the results by decreasing number of routes.
SELECT count(*) , T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name ORDER BY count(*) DESC
What is the date of the match with a home team of Huddersfield Town and was a replay tie?
SELECT date FROM table_name_93 WHERE tie_no = "replay" AND home_team = "huddersfield town"
Which was the highest crowd drawn by an Away team in Richmond?
SELECT MAX(crowd) FROM table_name_6 WHERE away_team = "richmond"
What was the result when Ray Roberts was elected?
SELECT result FROM table_1341718_44 WHERE incumbent = "Ray Roberts"
What shows for bronze when silver is 1, rank is smaller than 4, and gold is larger than 1?
SELECT SUM(bronze) FROM table_name_8 WHERE silver = 1 AND rank < 4 AND gold > 1
which among them was the biggest?
SELECT * FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T1.Fate Like "%Lost%" order by T2.tonnage desc limit 1
Show the names of schools with a total budget amount greater than 100 or a total endowment greater than 10.
SELECT T2.school_name FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id JOIN endowment AS T3 ON T2.school_id = T3.school_id GROUP BY T2.school_name HAVING sum(T1.budgeted) > 100 OR sum(T3.amount) > 10
What is the status code of the customer with the last name Kohler or first name Marina?
SELECT customer_status_code FROM Customers WHERE first_name = "Marina" OR last_name = "Kohler"
Which school has the highest acc percent score?
SELECT t1.school FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t2.acc_percent DESC LIMIT 1
What are the headquarters and industries of all companies?
SELECT Headquarters , Industry FROM company
Which station that sat 54m above seal level is now Closed?
SELECT station FROM table_name_15 WHERE height_above_sea_level__m_ = "54m" AND "closed" = "closed"
Which Season 1 has a Season 7 of david chilton?
SELECT season_1 FROM table_name_5 WHERE season_7 = "david chilton"
What date has 0-6700-30838-2-9 for a catalog?
SELECT date FROM table_name_88 WHERE catalog = "0-6700-30838-2-9"
Which Location has Floors smaller than 27, and a Building of 150 elgin?
SELECT location FROM table_name_71 WHERE floors < 27 AND building = "150 elgin"
What Round against Aleksander Emelianenko had a time of 5:00?
SELECT round FROM table_name_98 WHERE time = "5:00" AND opponent = "aleksander emelianenko"
How many goals against were scored when the points were smaller than 13, the wins were smaller than 3, and the goals for were smaller than 15?
SELECT SUM(goals_against) FROM table_name_73 WHERE points < 13 AND wins < 3 AND goals_for < 15
what is the surface on july 26, 2010?
SELECT surface FROM table_name_15 WHERE date = "july 26, 2010"
List down the states in 2011 with a national sector average of 20 and below.
SELECT DISTINCT T1.state FROM state_sector_details AS T1 INNER JOIN state_sector_grads AS T2 ON T2.stateid = T1.stateid WHERE T2.year = 2011 AND T1.awards_per_natl_value <= 20
What is the care plan, procedure, medication and the patient's full name for encounter 6f2e3935-b203-493e-a9c0-f23e847b9798?
SELECT DISTINCT T3.DESCRIPTION, T4.DESCRIPTION, T5.DESCRIPTION, T1.first, T1.last FROM patients AS T1 INNER JOIN encounters AS T2 ON T1.patient = T2.PATIENT INNER JOIN careplans AS T3 ON T1.patient = T3.PATIENT INNER JOIN procedures AS T4 ON T1.patient = T4.PATIENT INNER JOIN medications AS T5 ON T1.patient = T5.PATIENT WHERE T2.ID = '6f2e3935-b203-493e-a9c0-f23e847b9798'
Can you tell me the sum of the Pick # that has the CFL Team of edmonton?
SELECT SUM(pick__number) FROM table_name_69 WHERE cfl_team = "edmonton"
How many female athletes are from the Philippines?
SELECT COUNT(T2.person_id) FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.region_name = 'Philippines' AND T3.gender = 'F'
who won the lifetime achievement in the year 1998?
SELECT lifetime_achievement FROM table_name_39 WHERE year = 1998
Name the highest Bronze which has a Gold larger than 2 and a Rank of total?
SELECT MAX(bronze) FROM table_name_70 WHERE gold > 2 AND rank = "total"
What are the names of all instructors in the Comp. Sci. department?
SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.'
How many overs were there in the first innings of match ID "335996"?
SELECT COUNT(Over_Id) FROM Ball_by_Ball WHERE Match_Id = 335996 AND Innings_No = 1
Hi, can I see the list of customers?
Select * from customers
Give the distinct famous release dates for all artists.
SELECT distinct(Famous_Release_date) FROM artist
What is the average Attendance for the final round?
SELECT AVG(attendance) FROM table_name_54 WHERE round = "final"
From 2012 to 2015, how many complaints were submitted via email from female clients?
SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE strftime('%Y', T2.`Date received`) BETWEEN '2012' AND '2015' AND T2.`Submitted via` = 'Email' AND T1.sex = 'Male'
What are the names of all products that are not the most frequently-used maximum page size?
SELECT product FROM product WHERE product != (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY count(*) DESC LIMIT 1)
The game played on 6 December 1986 had what score?
SELECT score FROM table_name_12 WHERE date = "6 december 1986"
What are the names of the movies?
SELECT title FROM Movie
how many million u.s. viewers watched the episode directed by dan lerner?
SELECT us_viewers__million_ FROM table_25997153_1 WHERE directed_by = "Dan Lerner"
When was the game with richmond as Away team?
SELECT date FROM table_name_86 WHERE away_team = "richmond"