sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What are the names of all campuses located at Chico? | SELECT campus FROM campuses WHERE LOCATION = "Chico" |
What is the WIAA classification of Oakland Alternative High School? | SELECT wiaa_classification FROM table_1414702_3 WHERE high_school = "Oakland Alternative" |
When the person died May 22, 1895 is the reason for vacancy what is the district? | SELECT district FROM table_2417445_4 WHERE reason_for_vacancy = "Died May 22, 1895" |
show me the types of competition that have atleast five competition of that type | SELECT Competition_type FROM competition GROUP BY Competition_type HAVING COUNT ( * ) > = 5 |
find the name of all departments that do actually have one or more employees assigned to them. | SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id |
List the date of each treatment, together with the first name of the professional who operated it. | SELECT T1.date_of_treatment , T2.first_name FROM Treatments AS T1 JOIN Professionals AS T2 ON T1.professional_id = T2.professional_id |
What is Jockey, when Horse is "Eight Belles"? | SELECT jockey FROM table_name_74 WHERE horse = "eight belles" |
Which Pick has a College of ohio state? | SELECT MIN(pick) FROM table_name_22 WHERE college = "ohio state" |
Baldwin Locomotive Works, also with works number 40864, is listed as what number? | SELECT number FROM table_name_2 WHERE builder = "baldwin locomotive works" AND works_number = 40864 |
List the total points of gymnasts in descending order of floor exercise points. | SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points DESC |
Which player finished t35? | SELECT player FROM table_name_89 WHERE finish = "t35" |
What was the Result on November 9, 1958? | SELECT result FROM table_name_77 WHERE date = "november 9, 1958" |
What event had a prize of €900,000? | SELECT event FROM table_name_80 WHERE prize = "€900,000" |
What is the average Total, when Gold is less than 0? | SELECT AVG(total) FROM table_name_12 WHERE gold < 0 |
What is the name of the district with the highest number of domestic violence cases? | SELECT T2.district_name FROM Crime AS T1 INNER JOIN District AS T2 ON T1.district_no = T2.district_no WHERE T1.domestic = 'TRUE' GROUP BY T2.district_name ORDER BY COUNT(T1.district_no) DESC LIMIT 1 |
How many ships are there? | SELECT count ( * ) FROM ship |
What is the quantity when the DRG was E 62 01–E 62 05? | SELECT COUNT(quantity) FROM table_name_93 WHERE drg_number_s_ = "e 62 01–e 62 05" |
What is the average grid with more than 23 laps? | SELECT AVG(grid) FROM table_name_78 WHERE laps > 23 |
Find the maximum price of wines from the appelations in Central Coast area and produced before the year of 2005. | SELECT max(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = "Central Coast" AND T2.year < 2005 |
What distinct accelerator names are compatible with the browswers that have market share higher than 15? | SELECT DISTINCT T1.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T3.market_share > 15; |
When 7th bw attached to 43rd sw is the unit what is the b-52 model? | SELECT b_52_model FROM table_18933037_3 WHERE unit = "7th BW attached to 43rd SW" |
list Project codes, names, and hours worked by scientist by ssn and name | SELECT T3.Code , T3.Name , T3.Hours FROM Scientists AS T1 JOIN AssignedTo AS T2 ON T1.SSN = T2.Scientist JOIN Projects AS T3 ON T2.Project = T3.Code ORDER BY T1.SSN |
Can you list all apartment IDs with "Flat" as the apartment type? | SELECT apt_id FROM Apartments WHERE apt_type_code = 'Flat' |
What is the number of Population 2001 Census that has 476,815 in Population 1991 Census? | SELECT SUM(population_2001_census) FROM table_name_10 WHERE population_1991_census = 476 OFFSET 815 |
When the mark is 7.35, what's the lowest Lane found? | SELECT MIN(lane) FROM table_name_32 WHERE mark = "7.35" |
What pick number did the linebacker from the denver broncos get? | SELECT pick FROM table_name_34 WHERE position = "linebacker" AND team = "denver broncos" |
What were the laps of aprilia with a grid of 10? | SELECT laps FROM table_name_72 WHERE manufacturer = "aprilia" AND grid = 10 |
What is the truck's model year used to ship the ship ID 1245? | SELECT T1.model_year FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id WHERE T2.ship_id = '1245' |
What game has 2 points? | SELECT MAX(games) FROM table_name_58 WHERE points = 2 |
By what percentage is the average salary of Trainees higher than the minimum salary of this postion? | SELECT 100 * (AVG(CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) - CAST(REPLACE(SUBSTR(T2.minsalary, 4), ',', '') AS REAL)) / CAST(REPLACE(SUBSTR(T2.minsalary, 4), ',', '') AS REAL) AS per FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T2.positiontitle = 'Trainee' |
How many cabins were built in the time between 1967-1987? | SELECT built FROM table_name_51 WHERE period = "1967-1987" |
Show the zip code of the county with name "Howard". | SELECT Zip_code FROM county WHERE County_name = "Howard" |
How many times was incumbent onzlee ware elected? | SELECT COUNT(elected) FROM table_13618584_2 WHERE incumbent = "Onzlee Ware" |
Name the performance order for 2.15% | SELECT performance_order FROM table_26267849_11 WHERE percentage_of_votes = "2.15%" |
How many customers in total? | SELECT count(*) FROM Customers; |
What degree does the professor of account hold? | SELECT T3.prof_high_degree FROM professor AS T3 JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Accounting' |
What is the minimum number of opponents? | SELECT MIN(opponents) FROM table_18847692_2 |
If the equation is (10 times 1) + 3, what is the 2nd throw? | SELECT MAX(2 AS nd_throw) FROM table_17265535_6 WHERE equation = "(10 times 1) + 3" |
what is the country for geoff ogilvy? | SELECT country FROM table_name_88 WHERE player = "geoff ogilvy" |
What is the date of appointment for the date of vacancy of 22 august 2010? | SELECT date_of_appointment FROM table_26976615_3 WHERE date_of_vacancy = "22 August 2010" |
Which Venue has a Score of 0:0, a Season larger than 2010, and a Team 1 of t&t hanoi? | SELECT venue FROM table_name_39 WHERE score = "0:0" AND season > 2010 AND team_1 = "t&t hanoi" |
Can you list the cities of these students? | Do you want both the cities and the first names of the students? | Yes. Can you please provide both simultaneously? | SELECT DISTINCT T1.city_code, T1.fname FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.stuid = T2.stuid WHERE T2.Allergy = "Milk" |
How many ranks are higher than lane 4 from Great Britain, raced by Margaretha Pedder? | SELECT COUNT(rank) FROM table_name_83 WHERE lane > 4 AND nationality = "great britain" AND name = "margaretha pedder" |
What is the low number of top 25s in an event with over 15 appearances? | SELECT MIN(top_25) FROM table_name_42 WHERE events > 15 |
Can you tell me the Game that has the Opponent of miami heat? | SELECT game FROM table_name_19 WHERE opponent = "miami heat" |
What is the number of technicians? | SELECT count(*) FROM technician |
What Function (figure) has Serial number AF 934103? | SELECT function__figure_ FROM table_name_95 WHERE serial_number = "af 934103" |
Show the names of all the clients with no booking. | SELECT Customer_Name FROM Clients EXCEPT SELECT T2.Customer_Name FROM Bookings AS T1 JOIN Clients AS T2 ON T1.Customer_ID = T2.Client_ID |
What is the first name of the aldermen of wards with more than 50,000 inhabitants? | SELECT alderman_first_name FROM Ward WHERE Population > 50000 |
What shows for gold when the rank is less than 3, and silver less than 1? | SELECT SUM(gold) FROM table_name_62 WHERE rank < 3 AND silver < 1 |
What company constructed the vehicle when the driver shows as not held? | SELECT constructor FROM table_name_61 WHERE driver = "not held" |
What was the total score for january 18? | SELECT COUNT(score) FROM table_22883210_7 WHERE date = "January 18" |
What home team has had a crowd bigger than 20,000? | SELECT home_team FROM table_name_95 WHERE crowd > 20 OFFSET 000 |
Name the high rebounds for american airlines center | SELECT high_rebounds FROM table_22879323_9 WHERE location_attendance = "American Airlines Center" |
What bike has 26 as the grid? | SELECT bike FROM table_name_20 WHERE grid = 26 |
What place is Scott McCarron in? | SELECT place FROM table_name_4 WHERE player = "scott mccarron" |
What language is the book Miss Macintosh, My Darling in? | SELECT language FROM table_name_17 WHERE book_title = "miss macintosh, my darling" |
What is the name of the product with the highest price? | SELECT Product_Name FROM Products ORDER BY Product_Price DESC LIMIT 1 |
How many airports are there per city in the United States? Order the cities by decreasing number of airports. | SELECT count(*) , city FROM airports WHERE country = 'United States' GROUP BY city ORDER BY count(*) DESC |
What are the main places for the streymoy region with an area of larger than 6.1? | SELECT main_places FROM table_name_91 WHERE regions = "streymoy" AND area > 6.1 |
What is the max training hours of all players, please? | SELECT max ( HS ) FROM Player |
Name the october when the september is dalene kurtis | SELECT october FROM table_name_47 WHERE september = "dalene kurtis" |
What construction completed is named nelson tunnel/commodore waste rock? | SELECT construction_completed FROM table_name_76 WHERE name = "nelson tunnel/commodore waste rock" |
What is the total when the score of set 1 was 15–11? | SELECT total FROM table_name_68 WHERE set_1 = "15–11" |
What teak was Brady Browne drafted onto? | SELECT cfl_team FROM table_16575609_5 WHERE player = "Brady Browne" |
What place did Fred Couples finish in? | SELECT place FROM table_name_84 WHERE player = "fred couples" |
Show the location code, the starting date and ending data in that location for all the documents. | SELECT location_code, date_in_location_from, date_in_locaton_to FROM Document_locations |
What is the highest # Of Constituency Votes, when Election is before 1976, when Leader is Eisaku Satō, and when # Of Candidates is less than 328? | SELECT MAX(_number_of_constituency_votes) FROM table_name_18 WHERE election < 1976 AND leader = "eisaku satō" AND _number_of_candidates < 328 |
How many bronzes have a Total of 9? | SELECT SUM(bronze) FROM table_name_68 WHERE total = 9 |
What was the French title of the story published in 1968? | SELECT french_title FROM table_23963073_1 WHERE date_of_publication = 1968 |
What is the time of Yuliya Yefimova? | SELECT time FROM table_name_53 WHERE name = "yuliya yefimova" |
What is the average pages per minute color? | SELECT avg(pages_per_minute_color) FROM product |
Who won in 1979 with +8 to par? | SELECT player FROM table_name_46 WHERE to_par = "+8" AND year_s__won = "1979" |
What are the different types of transactions? | SELECT DISTINCT transaction_type FROM Financial_Transactions |
What is the total of pick numbers with a Reg GP larger than 0? | SELECT COUNT(pick__number) FROM table_name_80 WHERE reg_gp > 0 |
What was the value in 2011 for United States? | SELECT 2011 FROM table_name_95 WHERE country = "united states" |
What is the smallest diameter for Eirene Tholus? | SELECT MIN(diameter__km_) FROM table_name_97 WHERE name = "eirene tholus" |
How many likes does Kyle have? | SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = "Kyle" |
Provide the ID of the university with the highest percentage of female students in 2012. | SELECT university_id FROM university_year WHERE year = 2012 ORDER BY pct_female_students DESC LIMIT 1 |
How many Asian female patients take oxaliplatin 5 MG/ML [Eloxatin]? | SELECT COUNT(DISTINCT T2.patient) FROM medications AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'oxaliplatin 5 MG/ML [Eloxatin]' AND T2.race = 'asian' AND T2.gender = 'F' |
Which car won the same award in 2001 that the toyota 1nz-fxe hybrid prius won in 1999? | SELECT 2001 FROM table_name_76 WHERE 1999 = "toyota 1nz-fxe hybrid prius" |
Show the location codes with at least 3 documents. | SELECT location_code FROM Document_locations GROUP BY location_code HAVING count(*) >= 3 |
what are the country id ? | Did you mean country id which has both roller coasters with speed higher than 60 and roller coasters with speed lower than 55? | Yes! | SELECT T1.Country_ID FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID WHERE T2.speed > 60 INTERSECT SELECT T1.Country_ID FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID WHERE T2.speed < 55 |
What is the Name of the D Player from the Dinamo Moscow Club? | SELECT name FROM table_name_76 WHERE club = "dinamo moscow" AND pos = "d" |
How many episodes when the tv station is ntv and the japanese title is たったひとつの恋? | SELECT episodes FROM table_name_47 WHERE tv_station = "ntv" AND japanese_title = "たったひとつの恋" |
What is the abbreviation of Airline "JetBlue Airways"? | SELECT Abbreviation FROM AIRLINES WHERE Airline = "JetBlue Airways" |
How many grids does dave walker have? | SELECT COUNT(grid) FROM table_name_6 WHERE driver = "dave walker" |
What date had a game with a score of 5-4? | SELECT date FROM table_name_63 WHERE score = "5-4" |
Which city is the address of the store named "FJA Filming" located in? | SELECT T1.City_Town FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Store_Name = "FJA Filming" |
what is the product id for red jeans? | SELECT product_id FROM products WHERE product_name = "red jeans" |
What was the lowest score. | SELECT MIN(goals¹) FROM table_24565004_21 |
What is the Tournament in the Year of 1986? | SELECT tournament FROM table_name_21 WHERE year = "1986" |
What is the earliest season with driver Farad Bathena? | SELECT MIN(season) FROM table_name_34 WHERE driver = "farad bathena" |
In which regions has the game 'Pengo' been sold? | SELECT T5.region_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN game_platform AS T3 ON T2.id = T3.game_publisher_id INNER JOIN region_sales AS T4 ON T3.id = T4.game_platform_id INNER JOIN region AS T5 ON T4.region_id = T5.id WHERE T1.game_name = 'Pengo' |
What are the special features for the film "Smoochy Control"? | SELECT special_features FROM film WHERE title = 'SMOOCHY CONTROL' |
What is the average unit price for tracks in the Rock genre? | SELECT avg ( T2.unit_price ) FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock" |
Name the title of the episode where Pamela Hayden voiced the character 'Ruthie.' | SELECT T1.title FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T2.person = 'Pamela Hayden' AND T2.role = 'Ruthie'; |
How many airlines are there? | SELECT COUNT(*) FROM airlines |
List the personal names and family names of all the students in alphabetical order of family name. | SELECT personal_name , family_name FROM Students ORDER BY family_name |
Finally, can you show me the complaint outcome code for each of these two entries? | SELECT complaint_outcome_code FROM complaints GROUP BY complaint_status_code HAVING count ( * ) > 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.