sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What is the Date with a Score with 86–108? | SELECT date FROM table_name_7 WHERE score = "86–108" |
Show the denomination shared by schools founded before 1890 and schools founded after 1900 | SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900; |
What Version has a Title of alarm clock? | SELECT version FROM table_name_77 WHERE title = "alarm clock" |
What is the result for the Outer Critics Circle award earlier than 2004? | SELECT result FROM table_name_6 WHERE award = "outer critics circle award" AND year < 2004 |
I want the total number of Laps for time/retired for + 4 Laps and grid more than 20 | SELECT COUNT(laps) FROM table_name_32 WHERE time_retired = "+ 4 laps" AND grid > 20 |
What was the max points you when when you place 9th? | SELECT MAX(points) FROM table_17289224_1 WHERE final_placing = "9th" |
On which date was the match in Manama, Bahrain? | SELECT date FROM table_name_63 WHERE venue = "manama, bahrain" |
How many orders placed were with more than 5 product quantities? | SELECT SUM(IIF(`Order Quantity` > 5, 1, 0)) FROM `Sales Orders` |
What are the names of players whose training hours is between 500 and 1500? | SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500 |
Find the titles of all movies that have no ratings. | SELECT title FROM Movie WHERE mID NOT IN (SELECT mID FROM Rating) |
Find the ids of reviewers who didn't only give 4 star. | SELECT rID FROM Rating WHERE stars != 4 |
How many orders with a quantity greater than 5 have been shipped by the fastest delivery method? | SELECT COUNT(DISTINCT `Order ID`) FROM central_superstore WHERE Quantity > 5 AND `Ship Mode` = 'First Class' |
How many businesses in AZ state have the beer_and_wine attribute? | SELECT COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.business_id WHERE T2.attribute_value LIKE 'beer_and_wine' AND T1.state LIKE 'AZ' |
What is the winner for Virginia? | SELECT winner FROM table_name_99 WHERE location = "virginia" |
What are the names for the top three branches with most number of membership? | SELECT name FROM branch ORDER BY membership_amount DESC LIMIT 3 |
What player has a To Par of +1 with a score of 71-67-73=211? | SELECT player FROM table_name_89 WHERE to_par = "+1" AND score = 71 - 67 - 73 = 211 |
Please list the texts of all the tweets that are not in English. | SELECT text FROM twitter WHERE Lang != 'en' |
What is the average price for wines not produced in Sonoma county? | SELECT avg(price) FROM wine WHERE Appelation NOT IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma') |
How many type of governments are in Africa? | SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent = "Africa" |
What is the population of the district with the least population? | SELECT SUM(population) FROM Community_Area GROUP BY side ORDER BY SUM(population) LIMIT 1 |
Name the country for 11,891 area | SELECT country FROM table_160510_5 WHERE area = "11,891" |
What was the To par when the place was 4? | SELECT to_par FROM table_name_60 WHERE place = "4" |
What is the Martin McGuinness with a David Norris that is 10.3%? | SELECT martin_mcguinness FROM table_name_16 WHERE david_norris = "10.3%" |
To which menu does the menu page image ID5189412 belong? Please give its name. | SELECT T1.name FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id WHERE T2.image_id = 5189412 |
Find the id of instructors who didn't teach any courses? | SELECT id FROM instructor EXCEPT SELECT id FROM teaches |
what are the companies that produce the most expensive furniture | Do you mean the names of manufacturers that produce the most expensive furniture? | yes, the names of the company that produces the most expensive furniture | SELECT t1.name FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id ORDER BY t2.Price_in_Dollar DESC LIMIT 1 |
What's the smallest react of Zimbabwe, ranked after 1 in a lane after 3 and a time less than 20.3? | SELECT MIN(react) FROM table_name_90 WHERE lane > 3 AND time < 20.3 AND nationality = "zimbabwe" AND rank > 1 |
What is the total number of Total, when To Par is "7"? | SELECT COUNT(total) FROM table_name_50 WHERE to_par = 7 |
Find the name of instructor who is the advisor of the student who has the highest number of total credits. | SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id ORDER BY T3.tot_cred DESC LIMIT 1 |
What is the name of the game in which the oldest Olympian has ever participated? | SELECT T1.games_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id ORDER BY T2.age LIMIT 1 |
How many wins did Glenelg FL of bahgallah have when there were more than 3 byes? | SELECT COUNT(wins) FROM table_name_93 WHERE glenelg_fl = "bahgallah" AND byes > 3 |
What were the high points on september 9? | SELECT high_points FROM table_name_16 WHERE date = "september 9" |
What are the names of teams that do no have match season record? | SELECT Name FROM team WHERE Team_id NOT IN (SELECT Team FROM match_season) |
What position had a debut in round 6? | SELECT position FROM table_name_66 WHERE debut = "round 6" |
What Player is from the west Division and the Team of special teams and is from the School Toledo Western Michigan? | SELECT player FROM table_name_21 WHERE division = "west" AND team = "special teams" AND school = "toledo western michigan" |
What was the result of the game against the Miami Dolphins held at the Riverfront Stadium? | SELECT result FROM table_name_46 WHERE location = "riverfront stadium" AND opponent = "miami dolphins" |
What are the different names of mountains ascended by climbers from the country of West Germany? | SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T1.Country = "West Germany" |
How many teachers does the student named CHRISSY NABOZNY have? | SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "CHRISSY" AND T1.lastname = "NABOZNY" |
Performer 1 of greg proops, and a Performer 3 of ryan stiles, and a Date of 25 august 1995 is which average episode? | SELECT AVG(episode) FROM table_name_74 WHERE performer_1 = "greg proops" AND performer_3 = "ryan stiles" AND date = "25 august 1995" |
Which class has a city of Richmond, Virginia? | SELECT class FROM table_name_20 WHERE city_of_license = "richmond, virginia" |
What are the names of wines whose production year are before the year of all wines by Brander winery? | SELECT Name FROM WINE WHERE YEAR < (SELECT MIN(YEAR) FROM WINE WHERE Winery = "Brander") |
what is the name of the party with region ID 3 | SELECT party_name FROM party WHERE Region_id = 3 |
Who are the technicians? | SELECT Name FROM technician |
Who is the employee with the highest salary? Specify his/her full name. | SELECT firstname, lastname FROM employee WHERE CAST(REPLACE(SUBSTR(salary, 4), ',', '') AS REAL) = ( SELECT MAX(CAST(REPLACE(SUBSTR(salary, 4), ',', '') AS REAL)) FROM employee ) |
Which Blagojevich (D) has a Source of zogby/wsj, and a Topinka (R) of 33.2%? | SELECT blagojevich__d_ FROM table_name_5 WHERE source = "zogby/wsj" AND topinka__r_ = "33.2%" |
In which city is the sea whose depth is 4232 meters less than that of the Bay of Bengal? | SELECT T2.City FROM sea AS T1 INNER JOIN located AS T2 ON T1.Name = T2.Sea INNER JOIN city AS T3 ON T3.Name = T2.City WHERE ( SELECT Depth FROM sea WHERE Name LIKE '%Bengal%' ) - T1.Depth = 4235 |
What are the descriptions of the courses with name "database"? | SELECT course_description FROM COURSES WHERE course_name = "database" |
Which District has a Result of Re-elected and a First Elected of 1898? | SELECT district FROM table_name_95 WHERE result = "re-elected" AND first_elected = 1898 |
Who is the away team at junction oval? | SELECT away_team FROM table_name_74 WHERE venue = "junction oval" |
Among all shipments delivered by Sue Newel, identify the percentage of shipments that were placed by Autoware Inc. | SELECT CAST(SUM(CASE WHEN T3.cust_name = 'Autoware Inc' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) AS per FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id INNER JOIN customer AS T3 ON T3.cust_id = T1.cust_id WHERE T2.first_name = 'Sue' AND T2.last_name = 'Newell' |
Who was the coach who had 215 losses? | SELECT coach FROM table_name_33 WHERE losses = 215 |
Which shipping agent shipped the most documents? List the shipping agent name and the number of documents. | SELECT Ref_Shipping_Agents.shipping_agent_name , count(Documents.document_id) FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code GROUP BY Ref_Shipping_Agents.shipping_agent_code ORDER BY count(Documents.document_id) DESC LIMIT 1; |
How many different kinds of reports are there for races that Juan Manuel Fangio won? | SELECT COUNT(report) FROM table_1140111_5 WHERE winning_driver = "Juan Manuel Fangio" |
What are the titles of papers published by "Jeremy Gibbons"? | SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = "Jeremy" AND t1.lname = "Gibbons" |
How many game types do you have? | SELECT count ( distinct gtype ) FROM Video_games |
What years did Troy Hudson play for the Jazz? | SELECT years_for_jazz FROM table_name_29 WHERE player = "troy hudson" |
What is the full name of the conference in which the paper "2004 YD5" was published? | SELECT T1.FullName FROM Conference AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.ConferenceId WHERE T2.Title = '2004 YD5' |
Who was the constructor of the car that Jan Lammers made 7-14 rounds in? | SELECT constructor FROM table_name_25 WHERE driver = "jan lammers" AND rounds = "7-14" |
What are the locations that have both tracks with more than 90000 seats, and tracks with fewer than 70000 seats? | SELECT LOCATION FROM track WHERE seating > 90000 INTERSECT SELECT LOCATION FROM track WHERE seating < 70000 |
who is the the winning driver with pole position being paul tracy and race name being miller genuine draft 200 | SELECT winning_driver FROM table_14638077_2 WHERE pole_position = "Paul Tracy" AND race_name = "Miller Genuine Draft 200" |
What are the building short name of building id 133? | SELECT building_short_name FROM Apartment_Buildings WHERE building_id = 133 |
Find the number of distinct projects. | SELECT count(DISTINCT name) FROM projects |
Among highest quality user of under ID 100, mention compliment type which got highest compliment number and user's followers. | SELECT T1.compliment_type, T3.user_fans FROM Compliments AS T1 INNER JOIN Users_Compliments AS T2 ON T1.compliment_id = T2.compliment_id INNER JOIN Users AS T3 ON T2.user_id = T3.user_id WHERE T2.number_of_compliments = 'Uber' AND T2.user_id < 100 |
what's the date of birth with end of term being 5july1978 | SELECT date_of_birth FROM table_12134383_1 WHERE end_of_term = "5July1978" |
Where is the headquarters of the company general electric? | SELECT Headquarters FROM company where Company = "General Electric" |
Return the hispanic percentage for cities in which the black percentage is greater than 10. | SELECT Hispanic FROM city WHERE Black > 10 |
How many different professors are there? | SELECT count ( distinct EMP_NUM ) FROM employee where EMP_JOBCODE = 'PROF' |
Who was the opponent when the H/A was H and the scorer was Ferguson? | SELECT opponents FROM table_name_14 WHERE h___a = "h" AND scorers = "ferguson" |
What was the date when the attendance was n/a and the Man of the Match was unknown? | SELECT date FROM table_name_32 WHERE attendance = "n/a" AND man_of_the_match = "unknown" |
Who is the author of the publication named 'Real-Time Automata'? | SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'Real-Time Automata' |
Name of the capitals of the countries that have less than 99.95% less population than the country that has the most population. | SELECT Capital FROM country WHERE Population <= ( SELECT MAX(Population) - MAX(Population) * 0.9995 FROM country ) |
What is the highest Purse for aug 3–5? | SELECT MAX(purse__) AS $_ FROM table_name_80 WHERE dates = "aug 3–5" |
Who is the winning driver of the race with no race as the winning manufacturer? | SELECT winning_driver FROM table_name_66 WHERE winning_manufacturer = "no race" |
Who won the tournament for Australia in the year when Byron Nelson was Honoree? | SELECT player FROM table_1515346_2 WHERE country = "Australia" AND honoree_s_ = "Byron Nelson" |
What are the names of the tourist attractions Vincent and Marcelle visit? | SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Vincent" INTERSECT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Marcelle" |
What are the codes of template types that have fewer than 3 templates? | SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING count(*) < 3 |
What is the home team of the game with tie number 34? | SELECT home_team FROM table_name_76 WHERE tie_no = "34" |
What was the largest crowd at the Brunswick Street Oval? | SELECT MAX(crowd) FROM table_name_75 WHERE venue = "brunswick street oval" |
How many wins in 1992? | SELECT wins FROM table_name_52 WHERE year = 1992 |
list out the names | SELECT Name FROM city |
Which player has an A-League of 150 (4)? | SELECT name FROM table_name_40 WHERE a_league = "150 (4)" |
Who was the original artist of the Top 12 Men theme? | SELECT original_artist FROM table_27614707_1 WHERE theme = "Top 12 Men" |
What is the nationality of the player from the University of Michigan (NCAA)? | SELECT nationality FROM table_1965650_11 WHERE college_junior_club_team = "University of Michigan (NCAA)" |
What tie no has Watford as the date? | SELECT tie_no FROM table_name_92 WHERE date = "watford" |
Find all the albums in 2012. | SELECT * FROM Albums WHERE YEAR = 2012 |
Show cinema name, film title, date, and price for each record in schedule. | SELECT T3.name , T2.title , T1.date , T1.price FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id JOIN cinema AS T3 ON T1.cinema_id = T3.cinema_id |
For each bed type, find the average base price of different bed type. | SELECT bedType , avg(basePrice) FROM Rooms GROUP BY bedType; |
Which Production Technician has the highest pay rate? | SELECT T1.BusinessEntityID FROM Employee AS T1 INNER JOIN EmployeePayHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.JobTitle LIKE 'Production Technician%' ORDER BY T2.Rate DESC LIMIT 1 |
In 2020, what were the total orders of all stores in Maricopa County? | SELECT SUM(CASE WHEN T2.County = 'Maricopa County' AND OrderDate LIKE '%/%/20' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID |
What are the different states that have students trying out? | SELECT DISTINCT state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName |
When was the match with a result of sa by 10 wkts? | SELECT date FROM table_name_23 WHERE result = "sa by 10 wkts" |
Could you tell me when those departments were founded, and display the name next to each founding year? | SELECT Creation, Name FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id WHERE T2.temporary_acting = 'Yes' |
When was the game with a record of 9-3? | SELECT date FROM table_name_65 WHERE record = "9-3" |
Can you please show me the names of all male architects by their names lexicographically? | SELECT name FROM architect WHERE gender = 'male' ORDER BY name |
For the professor who is working with Harrietta Lydford, how is his popularity? | SELECT T1.popularity FROM prof AS T1 INNER JOIN RA AS T2 ON T1.prof_id = T2.prof_id INNER JOIN student AS T3 ON T2.student_id = T3.student_id WHERE T3.f_name = 'Harrietta' AND T3.l_name = 'Lydford' |
What is the strongs transliteration of the hebrew word יוֹחָנָן? | SELECT strongs_transliteration FROM table_1242447_1 WHERE hebrew_word = "יוֹחָנָן" |
What are the names for tracks without a race in class 'GT'. | SELECT name FROM track EXCEPT SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id WHERE T1.class = 'GT' |
Who are the mens singles and womens singles with sun yu? | SELECT mens_singles FROM table_13553701_1 WHERE womens_singles = "Sun Yu" |
How many disabled students have never been absent from school? | SELECT COUNT(T1.name) FROM longest_absense_from_school AS T1 INNER JOIN disabled AS T2 ON T1.`name` = T2.`name` WHERE T1.`month` = 0 |
What's the name of train number 15647/48? | SELECT train_name FROM table_12095519_1 WHERE train_no = "15647/48" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.