sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What contestant had a starting BMI of 42.2? | SELECT contestant FROM table_name_10 WHERE start_bmi = 42.2 |
Find all the papers published by "Aaron Turon". | 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 = "Aaron" AND t1.lname = "Turon" |
What date was the claim made? | SELECT Date_Claim_Made FROM Claims |
What date was the game that home team torquay united played? | SELECT date FROM table_name_76 WHERE home_team = "torquay united" |
How many times greater is the appearances of the biword pair "a base" than "a decimal"? | SELECT CAST(occurrences AS REAL) / ( SELECT occurrences FROM biwords WHERE w1st = ( SELECT wid FROM words WHERE word = 'a' ) AND w2nd = ( SELECT wid FROM words WHERE word = 'decimal' ) ) FROM biwords WHERE w1st = ( SELECT wid FROM words WHERE word = 'a' ) AND w2nd = ( SELECT wid FROM words WHERE word = 'base' ) |
Which business had the highest number of inspections done? Calculate the percentage of passed and failed inspections of the said business. | SELECT T2.dba_name , CAST(SUM(CASE WHEN T1.results = 'Pass' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.inspection_id) AS percentagePassed , CAST(SUM(CASE WHEN T1.results = 'Fail' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.inspection_id) FROM inspection AS T1 INNER JOIN establishment AS T2 ON T1.license_no = T2.license_no GROUP BY T2.dba_name ORDER BY COUNT(T1.license_no) DESC LIMIT 1 |
Provide the match IDs which were held on 18th April 2015. | SELECT Match_Id FROM Match WHERE Match_Date LIKE '%2015-04-18%' |
what is the average of account balance? | SELECT avg ( acc_bal ) FROM customer |
Show all the cinema names and opening years in descending order of opening year. | SELECT name , openning_year FROM cinema ORDER BY openning_year DESC |
Give the product ID and name of the product with the highest prices among the quantity ranges from 400 to 500. | SELECT T1.ProductID, T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.quantity BETWEEN 400 AND 500 ORDER BY T1.Price DESC LIMIT 1 |
Find the name and checking balance of the account with the lowest savings balance. | SELECT T1.name, T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance LIMIT 1 |
Show the album names and ids for albums that contain tracks with unit price bigger than 1. | SELECT T1.Title , T2.AlbumID FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId WHERE T2.UnitPrice > 1 GROUP BY T2.AlbumID |
What are the names of all the scientists in alphabetical order? | SELECT name FROM scientists ORDER BY name |
who is using Appliance (Linux) Operating system? | Do you want the name of the accelerator? | yes | SELECT name from Web_client_accelerator where operating_system = "Appliance ( Linux ) " |
What season did a United States center play in? | SELECT season FROM table_name_46 WHERE nationality = "united states" AND position = "center" |
What's the score for 1992, with the result of a loss? | SELECT score FROM table_name_65 WHERE year = 1992 AND result = "loss" |
what are their names? | SELECT name FROM browser |
What are their names? | SELECT LName, Fname FROM STUDENT |
What is the Home team score for the Home team of Melbourne? | SELECT home_team AS score FROM table_name_98 WHERE home_team = "melbourne" |
Calculate the difference between sales of games from region ID 2 and region ID 3. | SELECT SUM(CASE WHEN T.region_id = 2 THEN T.num_sales ELSE 0 END) - SUM(CASE WHEN T.region_id = 3 THEN T.num_sales ELSE 0 END) FROM region_sales t |
Given the branches are Alexandre, Popert, Stanley, Zytogorski, Cochrane, Taverner, Saint Amant, and Brooke Greville, which have members in Louisville, Kentucky? | SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id WHERE T3.Hometown = 'Louisville, Kentucky' |
WHAT IS THE BIGGEST BUDGET OF MOVIE TABLE? | SELECT Budget_million FROM movie order by Budget_million desc limit 1 |
What is ids of the songs whose resolution is higher than the resolution of any songs with rating lower than 8? | SELECT f_id FROM song WHERE resolution > (SELECT max(resolution) FROM song WHERE rating < 8) |
What is the highest total number? | SELECT MAX(total) FROM table_25831483_1 |
How many 180s have legs won of 45? | SELECT MAX(180 AS s) FROM table_20948329_1 WHERE legs_won = 45 |
Return the apartment numbers of the apartments with type code "Flat". | SELECT apt_number FROM Apartments WHERE apt_type_code = "Flat" |
What score has a record of 21-25-7-4? | SELECT score FROM table_name_92 WHERE record = "21-25-7-4" |
how many store are presented on the table | SELECT count ( * ) FROM store |
What is the profit of the product with the highest list price and of the product with the lowest list price other than 0? Indicates the depth the component is from its parent. | SELECT ( SELECT ListPrice - StandardCost FROM Product WHERE ListPrice != 0 ORDER BY ListPrice DESC LIMIT 1 ) , ( SELECT ListPrice - StandardCost FROM Product WHERE ListPrice != 0 ORDER BY ListPrice LIMIT 1 ) |
What is the lowest number of laps with more than 16 points? | SELECT MIN(laps) FROM table_name_29 WHERE points > 16 |
How many were penanced for a total of 7666? | SELECT penanced FROM table_name_48 WHERE total = "7666" |
How much money for 1st place with a to par less than 1? | SELECT COUNT(money___) AS $__ FROM table_name_51 WHERE place = "1" AND to_par < 1 |
List the name and assets of each company in ascending order of company name. | SELECT name , Assets_billion FROM Companies ORDER BY name ASC |
What year had a record of 4-21? | SELECT year FROM table_name_32 WHERE record = "4-21" |
Who were the Australian swimmers? | SELECT name FROM swimmer where nationality = 'Australia' |
Provide the International Standard Book Number of the book The Mystery in the Rocky Mountains. | SELECT isbn13 FROM book WHERE title = 'The Mystery in the Rocky Mountains' |
What is the swimsuit score for the item that has 7.61 as evening gown | SELECT swimsuit FROM table_15081939_4 WHERE evening_gown = "7.61" |
List all the names of the stores assigned to the sales person with the id "277". | SELECT Name FROM Store WHERE SalesPersonID = 277 |
Who drove the car with over 66 laps with a grid of 5? | SELECT driver FROM table_name_27 WHERE laps > 66 AND grid = 5 |
Which finish has a 99.550 Qual? | SELECT finish FROM table_name_13 WHERE qual = "99.550" |
Can you show me the climbers who climbed mountains in Country Uganda? | The climbers with IDs of 9 and 10 climbed mountains in the country Uganda | Hmm, I want to know the times used by the climbers to climb mountains in Country Uganda please. | SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T2.Country = "Uganda" |
How many students are there? | SELECT COUNT(*) FROM Student |
what is the highest gold when the rank is 12 for the nation vietnam? | SELECT MAX(gold) FROM table_name_18 WHERE rank = "12" AND nation = "vietnam" |
Who was the winning driver for Hendrick Motorsports in a Chevrolet Impala SS? | SELECT winning_driver FROM table_1769428_2 WHERE team = "Hendrick Motorsports" AND make = "Chevrolet Impala SS" |
For each advisor, report the total number of students advised by him or her. | SELECT Advisor , count(*) FROM STUDENT GROUP BY Advisor |
What's the description for the movie list "Short and pretty damn sweet"? | SELECT list_description FROM lists WHERE list_title = 'Short and pretty damn sweet' |
What is the latest year when Phil Anderson won? | SELECT MAX(year) FROM table_name_28 WHERE winner = "phil anderson" |
What is the first and last name of the oldest employee? | SELECT emp_fname , emp_lname FROM employee ORDER BY emp_dob LIMIT 1 |
What are the names of the parts manufactured by manufacturer 3 that have a supply cost of 1,000? | SELECT T2.p_name FROM partsupp AS T1 INNER JOIN part AS T2 ON T1.ps_partkey = T2.p_partkey WHERE T1.ps_supplycost = 1000 AND T2.p_mfgr = 'Manufacturer#3' |
What's listed for the Turnout % with a Ngilu of 3,429? | SELECT turnout__percentage FROM table_name_11 WHERE ngilu = "3,429" |
Show names of shops that have more than one kind of device in stock. | SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID HAVING COUNT(*) > 1 |
What airline serves the most flights? | SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) DESC LIMIT 1 |
What is contact Type ID No.16 represent for? | SELECT Name FROM ContactType WHERE ContactTypeID = '16' |
What round did Ray Kurpis play? | SELECT round FROM table_name_2 WHERE player = "ray kurpis" |
Show the number of audience in year 2008 or 2010. | SELECT Num_of_Audience FROM festival_detail WHERE YEAR = 2008 OR YEAR = 2010 |
When there is less than 13 services aces with a percentage greater than 0.34900000000000003, what is the smallest total attempts? | SELECT MIN(total_attempts) FROM table_name_47 WHERE percentage > 0.34900000000000003 AND service_aces < 13 |
What is the name of the product stored in location 1 compartment L container 6? | SELECT T2.Name FROM ProductInventory AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T1.LocationID = 1 AND T1.Shelf = 'L' AND T1.Bin = 6 |
What is the venue where john zibnack was the runner-up? | SELECT venue FROM table_name_54 WHERE runner_up = "john zibnack" |
How many players has the birth country in USA? | select count ( player_id ) from player where birth_country = 'USA' |
Of customers who provide other services, how many are from places where inhabitants are more than 20000? | SELECT COUNT(T2.GEOID) FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.OCCUPATION = 'Other-service' AND T2.INHABITANTS_K > 20 |
When interplanet janet is the episode title who is the music by? | SELECT music_by FROM table_191105_3 WHERE episode_title = "Interplanet Janet" |
Please show me how many female students have the major 600 | SELECT count ( * ) FROM student WHERE sex = 'F' AND Major = 600 |
Tell me the record for december 3 | SELECT record FROM table_name_47 WHERE date = "december 3" |
What is the number of useful votes that the user 52592 received when reviewed for business number 2? | SELECT review_votes_useful FROM Reviews WHERE user_id = 52592 AND business_id = 2 |
What is the hire date of the person who gets the lowest pct commission? | SELECT HIRE_DATE FROM employees order by COMMISSION_PCT asc limit 1 |
What date was the game with a score of w 116–93 (ot)? | SELECT date FROM table_27715173_6 WHERE score = "W 116–93 (OT)" |
What is Ben Hogan's Place? | SELECT place FROM table_name_21 WHERE player = "ben hogan" |
What districts are they from? | select District from election where Committee = 'Appropriations' |
Find the number of concerts happened in the stadium with the highest capacity . | select count(*) from concert where stadium_id = (select stadium_id from stadium order by capacity desc limit 1) |
What was the highest score of candidate mir-hossein mousavi in the location known as azarbaijan, west? | SELECT MAX(mir_hossein_mousavi) FROM table_23390604_1 WHERE province = "Azarbaijan, West" |
List all the podcasts reviewed by a reviewer who has a review titled "Inspired & On Fire!". | SELECT T1.title FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.title = 'Inspired & On Fire!' |
Hmm, can you just list his salary? | SELECT T1.salary FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid GROUP BY T1.eid ORDER BY count ( * ) DESC LIMIT 1 |
How many starts are associated with an oldsmobile engine, 21 finishes and before 2001? | SELECT SUM(start) FROM table_name_17 WHERE engine = "oldsmobile" AND finish = 21 AND year < 2001 |
How many users became an elite user the same year they joined Yelp? | SELECT COUNT(T1.user_id) FROM Users AS T1 INNER JOIN Elite AS T2 ON T1.user_id = T2.user_id WHERE T1.user_yelping_since_year = T2.year_id |
How many airports are there? | SELECT count ( * ) FROM airport |
What Slalom was Switzerland in? | SELECT slalom FROM table_name_2 WHERE country = "switzerland" |
What is the total number of all football games played by scholarship students? | SELECT sum(gamesplayed) FROM Sportsinfo WHERE sportname = "Football" AND onscholarship = 'Y' |
who is the the mixed doubles with mens singles being peter moritz | SELECT mixed_doubles FROM table_15002265_1 WHERE mens_singles = "Peter Moritz" |
How many silvers for nations with over 3 golds and under 6 bronzes? | SELECT COUNT(silver) FROM table_name_60 WHERE bronze < 6 AND gold > 3 |
Which County has a School of bloomfield? | SELECT county FROM table_name_32 WHERE school = "bloomfield" |
What is th title of the episode written by Nick Thiel? | SELECT title FROM table_2828803_1 WHERE written_by = "Nick Thiel" |
What's the lowest bronze with a 6 rank, smaller than 5 gold, and a total of more than 1? | SELECT MIN(bronze) FROM table_name_91 WHERE gold < 5 AND rank = "6" AND total > 1 |
State the inflation rate of Greece. | SELECT T2.Inflation FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'Greece' |
How many cuts did he make in the tournament with 3 top 25s and under 13 events? | SELECT MAX(cuts_made) FROM table_name_44 WHERE top_25 = 3 AND events < 13 |
What are the average access counts of documents that have the functional area description "Acknowledgement"? | SELECT avg(t1.access_count) FROM documents AS t1 JOIN document_functional_areas AS t2 ON t1.document_code = t2.document_code JOIN functional_areas AS t3 ON t2.functional_area_code = t3.functional_area_code WHERE t3.functional_area_description = "Acknowledgement" |
Who is the author of the book The Mystery in the Rocky Mountains? | SELECT T3.author_name FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T1.title = 'The Mystery in the Rocky Mountains' |
List the names of people that have not been on the affirmative side of debates. | SELECT Name FROM people WHERE People_id NOT IN (SELECT Affirmative FROM debate_people) |
What are the names of customers who have taken both Mortgage and Auto loans? | 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 WROTE THE STORY WITH THE PRODUCTION CODE OF 1ADK-03 | SELECT written_by FROM table_12033013_1 WHERE production_code = "1ADK-03" |
Who won stage 16? | SELECT winner FROM table_name_87 WHERE stage = "16" |
What is Bruce Cerone overall? | SELECT MIN(overall) FROM table_10361230_1 WHERE player_name = "Bruce Cerone" |
How many totals have a play-off less than 0? | SELECT COUNT(total) FROM table_name_47 WHERE play_offs < 0 |
What was the county with a longitude of -102.302775? | SELECT county FROM table_18600760_3 WHERE longitude = "-102.302775" |
The customer who filed the latest complaint uses which phone number? | SELECT t1.phone_number FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.date_complaint_raised DESC LIMIT 1 |
How many medicines are offered by each trade name? | SELECT trade_name , count(*) FROM medicine GROUP BY trade_name |
What school is in Radford, Va? | SELECT school FROM table_name_74 WHERE location = "radford, va" |
When fairuz fauzy is the winning driver what is the date? | SELECT date FROM table_25572118_1 WHERE winning_driver = "Fairuz Fauzy" |
What is the latest founded year? | SELECT MAX(founded) FROM table_1973729_2 |
List the names of authors affiliated with the University of Oxford in alphabetical order. | SELECT Name FROM Author WHERE Affiliation = 'University of Oxford' ORDER BY Name ASC |
What is the length for iin range 51-55? | SELECT length FROM table_15905399_1 WHERE iin_ranges = "51-55" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.