sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Find the names of the trains that do not pass any station located in London. | SELECT T2.name FROM train_station AS T1 JOIN train AS T2 ON T1.train_id = T2.train_id WHERE NOT T1.station_id IN (SELECT T4.station_id FROM train_station AS T3 JOIN station AS T4 ON T3.station_id = T4.station_id WHERE t4.location = "London") |
What is the highest game number? | SELECT MAX(game) FROM table_27755784_10 |
Calculate the increment percentage of elite user for each year since year 2005. | SELECT CAST(COUNT(CASE WHEN year_id < 2014 THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(CASE WHEN year_id = 2005 THEN 1.0 ELSE NULL END) AS increment FROM Elite |
What was the record against Washington? | SELECT COUNT(record) FROM table_17121262_10 WHERE team = "Washington" |
What is the average ROM size of phones produced by the company named "Nokia Corporation"? | SELECT avg(T1.ROM_MiB) FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T2.Company_name = "Nokia Corporation"; |
Find the names of the campus which has more faculties in 2002 than every campus in Orange county. | SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND faculty > (SELECT MAX(faculty) FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND T1.county = "Orange") |
Find the checking balance and saving balance in the Brown’s account. | SELECT T2.balance, T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T1.name = 'Brown' |
What's the percentage of all immigrants in 2007 in the country with 1.7% of all immigrants in 2008? | SELECT _percentage_of_all_immigrants_2007 FROM table_23619212_1 WHERE _percentage_of_all_immigrants_2008 = "1.7%" |
What player has 69-70-68-73=280 as the score? | SELECT player FROM table_name_52 WHERE score = 69 - 70 - 68 - 73 = 280 |
Which Platelet count has a Partial thromboplastin time of prolonged or unaffected? | SELECT platelet_count FROM table_name_20 WHERE partial_thromboplastin_time = "prolonged or unaffected" |
Give id of the instructor who advises students in the History department. | SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id = T2.id WHERE T2.dept_name = 'History' |
Which college had an overall pick of 9? | SELECT college FROM table_name_31 WHERE overall = 9 |
What is the result against everton? | SELECT result FROM table_name_73 WHERE opponent = "everton" |
Which Week 6 Oct 5 has a Week 14 Nov 30 of texas (11-1)? | SELECT week_6_oct_5 FROM table_name_37 WHERE week_14_nov_30 = "texas (11-1)" |
What's the comp in Olympic Stadium Tokyo, Japan? | SELECT comp FROM table_name_60 WHERE venue = "olympic stadium tokyo, japan" |
Write down the top ten companies with the most total sales by amount. | SELECT CompanyName FROM `Sales Totals by Amount` ORDER BY SaleAmount DESC LIMIT 10 |
Which movie's song title has the highest total gross? | SELECT T2.song FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title ORDER BY CAST(REPLACE(trim(T1.total_gross, '$'), ',', '') AS REAL) DESC LIMIT 1 |
Find the name and id of accounts whose checking balance is below the maximum checking balance. | SELECT T1.custid , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT max(balance) FROM checking) |
How was the episode seen by 2.26 million HK viewers ranked? | SELECT rank FROM table_19210674_1 WHERE hk_viewers = "2.26 million" |
What was Geelong's score when they were the home team? | SELECT home_team AS score FROM table_name_9 WHERE home_team = "geelong" |
In what place did Bob Tway finish? | SELECT finish FROM table_name_71 WHERE player = "bob tway" |
How many losses did Notre Dame have in 1904? | SELECT AVG(losses) FROM table_name_43 WHERE years = "1904" |
Find the name of customers who have loans of both Mortgages and Auto. | SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE loan_type = 'Mortgages' INTERSECT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE loan_type = 'Auto' |
Who did they lose to on may 9? | SELECT loss FROM table_name_83 WHERE date = "may 9" |
Where was the Fury FC 4: High Voltage event held? | SELECT location FROM table_name_5 WHERE event = "fury fc 4: high voltage" |
What is the greatest total score received by aylar & egor when karianne Gulliksen gave an 8? | SELECT MAX(total) FROM table_28677723_16 WHERE couple = "Aylar & Egor" AND karianne_gulliksen = 8 |
What is the name of the episodes which had 1.22 million U.S. viewers? | SELECT title FROM table_23399481_4 WHERE us_viewers__in_millions_ = "1.22" |
What is the Jobbik percentage with a Fidesz of 61% and others of 2%? | SELECT jobbik FROM table_name_41 WHERE fidesz = "61%" AND others = "2%" |
How about the order with invoice number 13, when was that order placed? | SELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.invoice_number = 13 |
What is the average access count of documents that have the least common structure? | SELECT avg(access_count) FROM documents GROUP BY document_structure_code ORDER BY count(*) ASC LIMIT 1 |
What are the different ranges of the 3 mountains with the highest prominence? | SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3 |
List the names of journalists in ascending order of years working. | SELECT Name FROM journalist ORDER BY Years_working |
for the other of mouy, what's the khmer? | SELECT khmer FROM table_name_20 WHERE other = "mouy" |
What player has t5 as the place? | SELECT player FROM table_name_38 WHERE place = "t5" |
What is HMS Gorgon's rank? | select T1.Rank from captain as T1 join Ship as T2 on T1.Ship_ID = T2.Ship_ID where T2.Name = "HMS Gorgon" |
What is the name of the swimmer in lane 6? | SELECT name FROM table_name_87 WHERE lane = 6 |
When is the most recent year with more than 27 points and more than 5 wins? | SELECT MAX(year) FROM table_name_69 WHERE points > 27 AND wins > 5 |
Which of the top 3 economies by GDP has the lowest proportion of the economy devoted to agriculture? | SELECT T1.Name FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country ORDER BY T2.GDP DESC, T2.Agriculture ASC LIMIT 1 |
How many patients in this table? | SELECT count ( patient ) FROM Stay |
Which European Cup is in the 2006-07 season? | SELECT european_cup FROM table_name_91 WHERE season = "2006-07" |
Name the most minutes for morgan jennings | SELECT MAX(minutes) FROM table_23183195_5 WHERE player = "Morgan Jennings" |
What is the bowling skill used by most players? | SELECT T1.Bowling_Skill FROM Bowling_Style AS T1 INNER JOIN Player AS T2 ON T2.Bowling_skill = T1.Bowling_Id GROUP BY T1.Bowling_Skill ORDER BY COUNT(T1.Bowling_Skill) DESC LIMIT 1 |
What is the lowest Against when the played is more than 10? | SELECT MIN(against) FROM table_name_4 WHERE played > 10 |
Please provide the path of solution of method whose tokenized name is html parser feed. | SELECT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.NameTokenized = 'html parser feed' |
what is the name of journalist ID 2 | select Name from journalist where journalist_ID = 2 |
What is the revision ID for the page on Catalan titled "Arqueologia"? | SELECT revision FROM pages WHERE lid = 1 AND title = 'Arqueologia' |
Which Inhabitants have a Mayor of matteo renzi, and an Election larger than 2009? | SELECT MIN(inhabitants) FROM table_name_4 WHERE mayor = "matteo renzi" AND election > 2009 |
List out all the players fullname who won the championship in 1970. | SELECT DISTINCT T3.firstName, T3.middleName, T3.lastName FROM series_post AS T1 INNER JOIN players_teams AS T2 ON T1.tmIDWinner = T2.tmID INNER JOIN players AS T3 ON T3.playerID = T2.playerID WHERE T1.year = 1970 AND T1.round = 'F' |
Excellent! Can you tell me how many people in total have Santo Domingo as their Hometown? | SELECT count ( * ) FROM people WHERE Hometown = "Santo Domingo" |
What is the average ROM size of phones produced by the company named "Nokia Corporation"? | SELECT avg(T1.ROM_MiB) FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T2.Company_name = "Nokia Corporation"; |
List out the state of driver who transported the shipment id 1055. | SELECT T2.state FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T1.ship_id = '1055' |
How many songs have a shared vocal? | SELECT COUNT(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = "shared" |
What is the percentage of historical works that have not fewer than five scenes in the 1500s? | SELECT CAST(( SELECT COUNT(T1.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.GenreType = 'History' AND T1.DATE BETWEEN 1500 AND 1599 GROUP BY T1.id HAVING COUNT(T2.Scene) >= 5 ) AS REAL) * 100 / COUNT(id) FROM works WHERE GenreType = 'History' AND DATE BETWEEN 1500 AND 1599 |
What is the name of the department in the Building Mergenthaler? | SELECT DName FROM DEPARTMENT WHERE Building = "Mergenthaler" |
What is the average number of laps for the driver Piero Taruffi? | SELECT AVG(laps) FROM table_name_50 WHERE driver = "piero taruffi" |
Find the number of users who posted some tweets. | SELECT COUNT(DISTINCT UID) FROM tweets |
Find the number of accounts with a savings balance that is higher than the average savings balance. | SELECT count(*) FROM savings WHERE balance > (SELECT avg(balance) FROM savings) |
Awesome, Im almost done, but can you tell me overall who worked the least amount of years as well? | SELECT journalist_ID FROM journalist order by
Years_working limit 1 |
What is the employee's last name at 7211 S Hermitage Ave, Chicago, IL? | SELECT last_name FROM employee WHERE address = '7211 S Hermitage Ave' AND city = 'Chicago' AND state = 'IL' |
What is the highest Attendance when the away team was Wrexham? | SELECT MAX(attendance) FROM table_name_39 WHERE away_team = "wrexham" |
What are the names of the tourist attractions that can be accessed by bus? | SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = "bus" |
Who published the book "The Secret Garden"? | SELECT DISTINCT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T1.title = 'The Secret Garden' |
Name the attendance for time of 1:31 | SELECT attendance FROM table_name_21 WHERE time = "1:31" |
list the amount for the largest donation | SELECT amount FROM endowment ORDER BY amount DESC LIMIT 1 |
What are the dimensions of the coin worth ₩200? | SELECT dimensions FROM table_298883_5 WHERE value = "₩200" |
What is the lowest no. in series? | SELECT MIN(no_in_series) FROM table_17758010_2 |
What is the Musical Guest/Song with an original airdate of january 2008? | SELECT musical_guest_song_performed FROM table_name_85 WHERE original_airdate = "january 2008" |
Great! Can you tell me how many employees have ED as their Role_code? | SELECT count ( * ) FROM Employees where role_code = "ED" |
What is the lowest silver that has 1 for the bronze, 1 as the total, 17 as the rank, with a gold less than 0? | SELECT MIN(silver) FROM table_name_15 WHERE bronze = 1 AND total = 1 AND rank = "17" AND gold < 0 |
What year ranked larger than 5? | SELECT year FROM table_name_18 WHERE rank > 5 |
What is the current official Youtube username of Chris Van Hollen? | SELECT T2.youtube FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T1.official_full_name = 'Chris Van Hollen' |
Pick larger than 229, and a Round smaller than 12, and a Position of defensive back is what school/club team? | SELECT school_club_team FROM table_name_66 WHERE pick > 229 AND round < 12 AND position = "defensive back" |
State the title of papers published in the Ibm Journal of Research and Development. | SELECT T2.Title FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.FullName = 'Ibm Journal of Research and Development' |
Show the id of the game platform with the most sales in region 2. | SELECT T1.game_platform_id FROM ( SELECT T.game_platform_id, SUM(T.num_sales) FROM region_sales AS T WHERE T.region_id = 2 GROUP BY T.game_platform_id ORDER BY SUM(T.num_sales) DESC LIMIT 1 ) T1 |
What is the average silver with a Rank smaller than 2 and more than 1 gold? | SELECT AVG(silver) FROM table_name_61 WHERE rank < 2 AND gold > 1 |
please list out the titles on the table | SELECT title FROM papers |
Write down the store IDs and region of the state "Michigan". | SELECT DISTINCT T2.StoreID, T1.Region FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1.StateCode WHERE T2.State = 'Michigan' |
What is the Proto-Oceanic verb for to die, be dead? | SELECT proto_oceanic FROM table_name_44 WHERE verb = "to die, be dead" |
Very good! Can display a list of all of the employees first names which contain a letter Z in their first name? | which colums to return? | Oh thanks! You went ahead and added the last name and city! Could you also add to this list which country each of these people live in? | SELECT T1.first_name , T1.last_name , T3.city ,T3.COUNTRY_ID FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T1.first_name LIKE '%z%' |
How much Total has a Player of todd hamilton, and a To par smaller than 15? | SELECT COUNT(total) FROM table_name_55 WHERE player = "todd hamilton" AND to_par < 15 |
What round had a time of 0:39? | SELECT MIN(round) FROM table_name_21 WHERE time = "0:39" |
What is the earliest year with an entry from Rotary Watches Stanley BRM and a BRM P207 with more than 0 points? | SELECT MIN(year) FROM table_name_99 WHERE entrant = "rotary watches stanley brm" AND chassis = "brm p207" AND points > 0 |
Find out the top 10 customers by total number of orders. List customers' first and last name and the number of total orders. | SELECT T1.first_name , T1.last_name , COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 10; |
Name the winner for 29 march | SELECT winning_driver FROM table_name_98 WHERE date = "29 march" |
is there any person who has no student friends | SELECT * FROM person EXCEPT SELECT * FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.job = 'student' |
What is the district name for District id 11? | SELECT district_name from district where district_id = 11 |
How many Pick #s have a Name of tory epps, and a Round larger than 8? | SELECT COUNT(pick__number) FROM table_name_96 WHERE name = "tory epps" AND round > 8 |
Thank you. Can you please provide the price of each of these items as well sorted by lowest price first? | SELECT name, price FROM products WHERE price > = 180 order by price asc |
What are the first names of all players, and their total ranking points? | SELECT sum(ranking_points) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name |
what is the date the high assists was andre miller (7)? | SELECT date FROM table_27734769_8 WHERE high_assists = "Andre Miller (7)" |
What are the dates that had the top 5 cloud cover rates? Also tell me the cloud cover rate. | SELECT date , cloud_cover FROM weather ORDER BY cloud_cover DESC LIMIT 5 |
Which state has the most players selected as all stars? | SELECT T1.birthState FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID GROUP BY T1.birthState ORDER BY COUNT(DISTINCT T1.playerID) DESC LIMIT 1 |
What's the record of the @ miami team? | SELECT record FROM table_27734577_8 WHERE team = "@ Miami" |
Which orders are made by the customer named "Jeramie"? Give me the order ids and status. | SELECT T2.order_id , T2.order_status FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = "Jeramie" |
Which student's age is older than 18 and is majoring in 600? List each student's first and last name. | SELECT Fname , Lname FROM Student WHERE Age > 18 AND Major = 600; |
Give the postal code for the address No.65. | SELECT postal_code FROM address WHERE address_id = 65 |
Name the points aginst when drawn is 1 and points is 51 | SELECT points_against FROM table_17625749_1 WHERE drawn = "1" AND points = "51" |
What was the game result against the minnesota vikings? | SELECT result FROM table_name_3 WHERE opponent = "minnesota vikings" |
What was the share for the episode with the air date december 10, 2008? | SELECT share FROM table_11238597_4 WHERE air_date = "December 10, 2008" |
Can you tell me the names of all compatible browsers and accelerators? | SELECT T2.name , T3.name FROM accelerator_compatible_browser AS T1 JOIN browser AS T2 ON T1.browser_id = T2.id JOIN web_client_accelerator AS T3 ON T1.accelerator_id = T3.id |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.