sentence
stringlengths
3
347
sql
stringlengths
18
804
List point level of inspections with no fine.
SELECT DISTINCT T1.point_level FROM inspection_point AS T1 INNER JOIN violation AS T2 ON T1.point_id = T2.point_id WHERE T2.fine = 0
What is the chassis for offy engine and 25th finish?
SELECT chassis FROM table_name_12 WHERE engine = "offy" AND finish = "25th"
List all the country in East Asia & Pacific region that have more than 2000000 urban population in 1970.
SELECT DISTINCT T1.CountryCode FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Year = 1970 AND T1.Region = 'East Asia & Pacific' AND T2.Value > 2000000 AND t2.indicatorname = 'Urban population'
Name the capacity for the torque of n·m (lb·ft) @4150
SELECT capacity FROM table_name_90 WHERE torque__nm__rpm = "n·m (lb·ft) @4150"
What are the first names and offices of history professors who don't have Ph.D.s?
SELECT T2.emp_fname , T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T1.dept_code = T3.dept_code WHERE T3.dept_name = 'History' AND T1.prof_high_degree ! = 'Ph.D.'
List the name, origin and owner of each program.
SELECT name , origin , OWNER FROM program
What was the distance of the race on saturday, august 23?
SELECT distance FROM table_name_59 WHERE date = "saturday, august 23"
Who was the lead envoy of the congratulation mission in 1718 with the Ryūkyūan King shō kei?
SELECT lead_envoy FROM table_name_10 WHERE ryūkyūan_king = "shō kei" AND mission_type = "congratulation" AND year = 1718
Among the businesses with a category of Local Services, what is the percentage of the business with less than 3 stars?
SELECT CAST(SUM(CASE WHEN T1.stars < 3 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.stars) AS "percentage" FROM Business AS T1 INNER JOIN Business_Categories ON T1.business_id = Business_Categories.business_id INNER JOIN Categories AS T3 ON Business_Categories.category_id = T3.category_id WHERE T3.category_name LIKE 'Local Services'
What are the average prices of hotels grouped by their pet policy.
SELECT pets_allowed_yn , avg(price_range) FROM HOTELS GROUP BY pets_allowed_yn
How many viewers were there for the premier with 34
SELECT hk_viewers FROM table_10942714_1 WHERE premiere = 34
When the percent is larger than 0.685, what is the average number of points scored?
SELECT AVG(points) FROM table_name_61 WHERE pct__percentage > 0.685
Which Name has a Date of 11 june 1940?
SELECT name FROM table_name_95 WHERE date = "11 june 1940"
What game in February 10, 2009 has the most points and a game number larger than 54?
SELECT MAX(points) FROM table_name_27 WHERE date = "february 10, 2009" AND game > 54
What college has pick 45
SELECT college FROM table_name_33 WHERE pick = 45
What was the score of the game at the Broadmoor Arena?
SELECT score FROM table_name_38 WHERE arena = "broadmoor arena"
What is the Catalog with a Format of lp, a Country of us, a Label of sundazed, and a Date of 2006?
SELECT catalog FROM table_name_46 WHERE format = "lp" AND country = "us" AND label = "sundazed" AND date = "2006"
Who is the lead on the Europe team that has a Liudmila Privivkova as the skip?
SELECT lead FROM table_name_18 WHERE team = "europe" AND skip = "liudmila privivkova"
Which Wins has a Tournament of totals, and a Cuts made larger than 42?
SELECT AVG(wins) FROM table_name_2 WHERE tournament = "totals" AND cuts_made > 42
what is the number of weekly rank where the total is 1980000?
SELECT COUNT(weekly_rank) FROM table_17004367_3 WHERE total = 1980000
What is the construction of Olivier Panis' car that retired due to a collision?
SELECT constructor FROM table_name_23 WHERE time_retired = "collision" AND driver = "olivier panis"
What is draft detail of the document with id 7?
SELECT draft_details FROM Document_Drafts WHERE document_id = 7;
What is the minimum pick that drafted Pat Shires, with a round greater than 29 and an overall greater than 328?
SELECT MIN(pick) FROM table_name_87 WHERE overall > 328 AND name = "pat shires" AND round > 29
What is the entry for Upper index Kcal/ Nm 3 for the row with an entry that has a Lower index MJ/ Nm 3 larger than 47.91, for propylene, and an Upper index MJ/ Nm 3 larger than 77.04?
SELECT SUM(upper_index_kcal__nm_3) FROM table_name_1 WHERE lower_index_mj__nm_3 > 47.91 AND fuel_gas = "propylene" AND upper_index_mj__nm_3 > 77.04
What nation has a total less than 2, silver of 1 and bronze less than 1?
SELECT nation FROM table_name_32 WHERE total < 2 AND bronze < 1 AND silver = 1
What is the label for catalogue 7200222?
SELECT label FROM table_name_77 WHERE catalogue = "7200222"
Which Floors have a Pinnacle height ft (m) of 1,136 (346), and a Pinn Rank larger than 4?
SELECT AVG(floors) FROM table_name_9 WHERE pinnacle_height_ft__m_ = "1,136 (346)" AND pinn_rank > 4
How much does the cheapest Hard drive go for? | 240 is the price of the cheapest product whose name is Hard drive | and what of the cheapest memory?
SELECT price FROM Products where Name = 'Memory' order by price limit 1
Name the number of total votes for # of seats won being 30
SELECT _number_of_total_votes FROM table_19283982_4 WHERE _number_of_seats_won = 30
Among the devices on which an event happened on 2016/5/1, how many of them are used by a male user?
SELECT COUNT(T1.device_id) FROM events AS T1 INNER JOIN gender_age AS T2 ON T1.device_id = T2.device_id WHERE T1.timestamp = '2016-05-01' AND T2.gender = 'M'
Which Date has an Opponent of @ mariners, and a Loss of hernández (0-1)?
SELECT date FROM table_name_25 WHERE opponent = "@ mariners" AND loss = "hernández (0-1)"
Which course has more teachers, course no.16 or course no.18?
SELECT course_id FROM taughtBy WHERE course_id = 11 OR course_id = 18 GROUP BY course_id ORDER BY COUNT(course_id) DESC LIMIT 1
what's the win with points for being 376
SELECT won FROM table_12828723_3 WHERE points_for = "376"
Which Weight has a Power of kw (hp) at 1,800rpm, and a Name of 9 nc?
SELECT weight FROM table_name_98 WHERE power = "kw (hp) at 1,800rpm" AND name = "9 nc"
What is the rank for Denmark?
SELECT COUNT(rank) FROM table_name_33 WHERE nationality = "denmark"
Find the last name of the staff whose email address contains "wrau".
SELECT last_name FROM staff WHERE email_address LIKE "%wrau%"
Find all the songs whose name contains the word "the".
SELECT title FROM songs WHERE title LIKE '% the %'
Name the total number of 2010 for when 2009 is less than 14, 2008 is less than 15 and 2005 is 3
SELECT COUNT(2010) FROM table_name_85 WHERE 2009 < 14 AND 2008 < 15 AND 2005 = 3
What are the venues of all the matches? Sort them in the descending order of match date.
SELECT venue FROM MATCH ORDER BY date DESC
How many songs has Enrique recorded?
SELECT count ( * ) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.artist_name = "Enrique"
What zip codes have a station with a max temperature greater than or equal to 80 and when did it reach that temperature?
SELECT date , zip_code FROM weather WHERE max_temperature_f >= 80
What is IATA, when ICAO is "VHHH"?
SELECT iata FROM table_name_8 WHERE icao = "vhhh"
What are the names of the heads who are born outside the California state?
SELECT name FROM head WHERE born_state != 'California'
Which Record label has a Title of 诀别诗?
SELECT record_label FROM table_name_46 WHERE title = "诀别诗"
List the population density per kilometer for the city of calintaan?
SELECT pop_density__per_km²_ FROM table_261951_1 WHERE municipality = "Calintaan"
List the name of staff who has been assigned multiple jobs.
SELECT T1.staff_name FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id GROUP BY T2.staff_id HAVING COUNT (*) > 1
List down all of the product names that were placed by sales person with id 10.
SELECT DISTINCT T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.SalesPersonID = 10
How many authors are there?
SELECT count ( distinct authID ) fROM Authorship
Find the name of different colleges involved in the tryout in alphabetical order.
SELECT DISTINCT cName FROM tryout ORDER BY cName
Show names of ships involved in a mission launched after 1928.
SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T1.Launched_Year > 1928
What is the name of the golfer that has the score of 73-65=138?
SELECT player FROM table_name_81 WHERE score = 73 - 65 = 138
WHAT IS THE FLOOR NUMBERS WITH 01.0 10 light street?
SELECT SUM(floors) FROM table_name_57 WHERE street_address = "01.0 10 light street"
What is the H/A on 5 August 1990?
SELECT h___a FROM table_name_46 WHERE date = "5 august 1990"
List all the order dates for the customer named "Adrian Kunzelmann".
SELECT T3.order_date FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id INNER JOIN cust_order AS T3 ON T3.order_id = T2.order_id INNER JOIN customer AS T4 ON T4.customer_id = T3.customer_id WHERE T4.first_name = 'Adrian' AND T4.last_name = 'Kunzelmann'
How many models do not have the wifi function?
SELECT COUNT(*) FROM chip_model WHERE wifi = 'No'
Find the last names of teachers who are not involved in any detention.
SELECT last_name FROM Teachers EXCEPT SELECT T1.last_name FROM Teachers AS T1 JOIN Detention AS T2 ON T1.teacher_id = T2.teacher_id
Give the names of nations that speak both English and French.
SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "French"
Show the location codes and the number of documents in each location.
SELECT location_code , count(*) FROM Document_locations GROUP BY location_code
Which Engine has a Year that's Larger than 2006 and Power of BHP (KW)?
SELECT engine FROM table_name_8 WHERE year > 2006 AND power = "bhp (kw)"
What are the names of the races held after 2017 in Spain?
SELECT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = "Spain" AND T1.year > 2017
What is the language used most often in the songs?
SELECT languages FROM song GROUP BY languages ORDER BY COUNT(*) DESC LIMIT 1
What is the average number for Northgate which commenced its construction before 1951?
SELECT AVG(number_on_map) FROM table_name_42 WHERE name = "northgate" AND construction_commenced < 1951
State all the district that Benjamin Contee has served before.
SELECT T2.district FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.first_name = 'Benjamin' AND T1.last_name = 'Contee'
What are the names of all instructors with names that include "dar"?
SELECT name FROM instructor WHERE name LIKE '%dar%'
Name the maximum points for libertad
SELECT MAX(points) FROM table_18607260_6 WHERE team = "Libertad"
What name has the highest salary?
SELECT name FROM Employee order by salary desc limit 1
How many games do not have any sales in Europe?
SELECT COUNT(*) FROM region_sales AS T1 INNER JOIN region AS T2 ON T1.region_id = T2.id WHERE T2.region_name = 'Europe' AND T1.num_sales = 0
can you please tell me how many managers Scotland has?
SELECT count ( * ) FROM manager WHERE Country = 'Scotland'
Please List out the Actors name?
SELECT Name FROM actor
Who is the advisor of student with ID 1004?
SELECT Advisor FROM Student WHERE StuID = 1004
How many transactions do we have?
SELECT count(*) FROM Financial_transactions
What is the lowest draws that have losses greater than 0, an against less than 1728, melton as the ballarat fl, and byes less than 2?
SELECT MIN(draws) FROM table_name_66 WHERE losses > 0 AND against < 1728 AND ballarat_fl = "melton" AND byes < 2
What is the name of the product that was ordered recently by Darren Powers?
SELECT T3.`Product Name` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T1.`Customer Name` = 'Darren Powers' ORDER BY T2.`Order Date` DESC LIMIT 1
What is the gayndah when perry is 304?
SELECT MAX(gayndah) FROM table_12526990_1 WHERE perry = 304
What place had 14:11.15 as the performance?
SELECT place FROM table_name_33 WHERE performance = "14:11.15"
what is the lowest position when points is more than 11, name is ea schongau and lost is less than 3?
SELECT MIN(position) FROM table_name_47 WHERE points > 11 AND name = "ea schongau" AND lost < 3
What did United States place when the player was Raymond Floyd?
SELECT place FROM table_name_84 WHERE country = "united states" AND player = "raymond floyd"
What is the Higgins with a Scallon that is 2%?
SELECT higgins FROM table_name_35 WHERE scallon = "2%"
Please list the first names of the players with the most personal fouls in the 'NBL' league.
SELECT T1.firstName FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T2.lgID = 'NBL' GROUP BY T1.playerID, T1.firstName ORDER BY COUNT(PF) DESC LIMIT 1
What are the last names of students studying major 50?
SELECT LName FROM STUDENT WHERE Major = 50
How many US events did jason bennett win?
SELECT AVG(events_won__us_series_) FROM table_name_83 WHERE name = "jason bennett"
When do all the researcher role staff start to work, and when do they stop working?
SELECT date_from , date_to FROM Project_Staff WHERE role_code = 'researcher'
Find the name of the campuses that is in Northridge, Los Angeles or in San Francisco, San Francisco.
SELECT campus FROM campuses WHERE LOCATION = "Northridge" AND county = "Los Angeles" UNION SELECT campus FROM campuses WHERE LOCATION = "San Francisco" AND county = "San Francisco"
Please list the nick names of the coaches who are from the USA and have taught the Buffalo Sabres.
SELECT DISTINCT nameNick FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.name = 'Buffalo Sabres' AND T3.birthCountry = 'USA'
Who was the cyclist from Belgium?
SELECT cyclist FROM table_name_85 WHERE nation = "belgium"
What is the name of the perpetrator with the biggest weight.
SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Weight DESC LIMIT 1
What is the party of these 4 drivers?
SELECT party FROM driver WHERE home_city = 'Hartford' AND age > 40
Can you list the composer who wrote the most rock genre songs?
SELECT composer FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = "Rock" group by composer order by count ( * ) desc limit 1
How many times is married non sales employees against single non-sales employees?
SELECT CAST(SUM(CASE WHEN T1.MaritalStatus = 'M' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN T1.MaritalStatus = 'S' THEN 1 ELSE 0 END) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.PersonType = 'EM'
Among the players born in Whitestone, how many of them have won the MVP?
SELECT COUNT(DISTINCT T1.playerID) FROM players AS T1 INNER JOIN awards_players AS T2 ON T1.playerID = T2.playerID WHERE T2.award = 'Most Valuable Player' AND T1.birthCity = 'Houston'
What dorm id have the amenity id 904?
SELECT T2.dormid FROM has_amenity AS T2 where T2.amenid = 904
How many years did he finish in 59th?
SELECT COUNT(avg_start) FROM table_1637041_2 WHERE position = "59th"
Where else is TMobile active?
SELECT T2.district FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID = T3.Phone_ID where T3.carrier = "TMobile" and T2.district ! = "Alberta"
Name the total number of air dates for 102 episode
SELECT COUNT(original_air_date) FROM table_15584067_7 WHERE no_in_series = "102"
To whom does Steve Patterson report? Please give his or her full name.
SELECT t2.firstName, t2.lastName FROM employees AS t1 INNER JOIN employees AS t2 ON t2.employeeNumber = t1.reportsTo WHERE t1.firstName = 'Steve' AND t1.lastName = 'Patterson'
What is the building for the r90 pennant?
SELECT builder FROM table_name_16 WHERE pennant = "r90"
What are the full names and salaries for any employees earning less than 6000?
SELECT first_name , last_name , salary FROM employees WHERE salary < 6000
what is the country name? | what did you want to konw the country name ?give more info about this question | what are the country names which has both roller coasters with speed higher than 60 and roller coasters with speed lower than 55?
SELECT T1.name FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID WHERE T2.speed > 60 INTERSECT SELECT T1.name FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID WHERE T2.speed < 55
Which had an attendance of larger than 33,435?
SELECT result FROM table_name_26 WHERE attendance > 33 OFFSET 435
what is the city of south california
SELECT city from Addresses where state_province_county = "SouthCarolina"