sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
what was the maxiumum for the first elected? | SELECT MAX(first_elected) FROM table_1342270_24 |
What are the names of documents that use templates with the code BK? | SELECT T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T1.template_type_code = "BK" |
What is the code of airport that has fewest number of flights? | SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) LIMIT 1 |
Where was the BRDC International Trophy with driver Emerson Fittipaldi held? | SELECT venue FROM table_name_61 WHERE driver = "emerson fittipaldi" AND event = "brdc international trophy" |
How many users holds neutral attitude towards the HTC Weather app? Indicate the app's rating on the Google Play Store. | SELECT COUNT(T1.Rating), T1.Rating FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'HTC Weather' AND T2.Sentiment = 'Neutral' |
Which product has a height smaller than 5? | Do you want to know the names of the products with heights smaller than 5 | Yes | SELECT catalog_entry_name FROM catalog_contents WHERE LENGTH < 5 |
Who is the delegate of district 1 in the elections? | SELECT Delegate FROM election WHERE District = 1 |
Who was the home team of the game at the time of 14:00? | SELECT home FROM table_name_53 WHERE time = "14:00" |
Who got second place when the winners were rafał mroczek & aneta piotrowska? | SELECT second_place FROM table_15988037_4 WHERE winner = "Rafał Mroczek & Aneta Piotrowska" |
How many members does the club "Tennis Club" has? | SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Tennis Club" |
What is the MPAA rating for the movie with the character named "Peter Quill" in it? | SELECT T1.`MPAA Rating` FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID WHERE T2.`Character Name` = 'Peter Quill' |
What is the Hanzi of Hong Kong in 1998? | SELECT hanzi FROM table_name_46 WHERE origin = "hong kong" AND launch = "1998" |
List the titles of books that are not published. | SELECT Title FROM book WHERE Book_ID NOT IN (SELECT Book_ID FROM publication) |
Who was the winner when Mateus Rocha finished in 3rd place? | SELECT winner FROM table_25214321_1 WHERE third_place = "Mateus Rocha" |
Show me their Ids. | SELECT T2.investor_id FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id HAVING COUNT ( * ) > = 2 |
Which authors have submitted to more than one workshop? | SELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_id) > 1 |
Find the average and maximum age for each type of pet. | SELECT avg(pet_age) , max(pet_age) , pettype FROM pets GROUP BY pettype |
What is the score of the game played 26 July 2010? | SELECT score FROM table_name_22 WHERE date = "26 july 2010" |
How many scenes can be found in "Twelfth Night, Or What You Will"? | SELECT COUNT(T2.Scene) AS cnt FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.LongTitle = 'Cymbeline, King of Britain' |
Find the name of the product that has the smallest capacity. | SELECT catalog_entry_name FROM catalog_contents ORDER BY capacity LIMIT 1 |
What was the attendance of the w 28-13 game? | SELECT attendance FROM table_name_61 WHERE result = "w 28-13" |
Indicate street and number of the Adelitas Taqueria Restaurants. | SELECT T1.street_name, T1.street_num FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.label = 'adelitas taqueria' |
How many people play Frank in London? | SELECT COUNT(london) FROM table_10402018_1 WHERE character = "Frank" |
What is the overall of the player with a pick # higher than 13? | SELECT overall FROM table_name_47 WHERE pick__number < 13 |
What is the height of David Bornhammar in inches? | SELECT T2.height_in_inch FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id WHERE T1.PlayerName = 'David Bornhammar' |
I see. Can you list the id and number for every grand that APP has? | SELECT grant_id FROM Documents where document_type_code = "APP" |
What is the average age of students who have city code "NYC" and have secretary votes for the spring election cycle? | SELECT avg(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.city_code = "NYC" AND T2.Election_Cycle = "Spring" |
WHAT IS THE NUMBER OF LOSSES WITH A LONG SMALLER THAN 24, AND GAIN BIGGER THAN 116? | SELECT COUNT(loss) FROM table_name_15 WHERE long < 24 AND gain > 116 |
Which products has been complained by the customer who has filed least amount of complaints? | SELECT DISTINCT t1.product_name FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id JOIN customers AS t3 GROUP BY t3.customer_id ORDER BY count(*) LIMIT 1 |
How many different buildings do you have? | SELECT count ( distinct building ) FROM Faculty |
Who directed the episode that was viewed by 2.57 million people in the U.S.? | SELECT directed_by FROM table_11820086_1 WHERE us_viewers__millions_ = "2.57" |
What chassis did Gordon Johncock use with his cosworth engine? | SELECT chassis FROM table_name_73 WHERE engine = "cosworth" AND drivers = "gordon johncock" |
Show me the id of the team that has the largest average number of attendance in 2014? | SELECT T2.team_id FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id WHERE T1.year = 2014 GROUP BY T1.team_id ORDER BY avg ( T1.attendance ) DESC LIMIT 1 |
Which round 5 Grand Prix had Daijiro Hiura at pole position? | SELECT grand_prix FROM table_18303274_1 WHERE pole_position = "Daijiro Hiura" AND round = 5 |
Which Total has a Silver larger than 8, and a Bronze of 20, and a Gold smaller than 20? | SELECT COUNT(total) FROM table_name_93 WHERE silver > 8 AND bronze = 20 AND gold < 20 |
Which school district was Future Einsteins Of America project located at? | SELECT T1.school_district FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T2.title LIKE 'Future Einsteins Of America' |
What is the average time span of contact channels in the database? | SELECT avg(active_to_date - active_from_date) FROM customer_contact_channels |
What is the attendance on location for a record of 40–40? | SELECT location_attendance FROM table_name_67 WHERE record = "40–40" |
What is the total number of entries for Leif Olson? | SELECT COUNT(starts) FROM table_20590020_2 WHERE player = "Leif Olson" |
How many customers are from the city of Lethbridge? | SELECT COUNT(T3.customer_id) FROM city AS T1 INNER JOIN address AS T2 ON T1.city_id = T2.city_id INNER JOIN customer AS T3 ON T2.address_id = T3.address_id WHERE T1.city = 'Lethbridge' |
How many dates are shown for the home team of orlando pirates and result of 1–3? | SELECT COUNT(date) FROM table_27274566_2 WHERE home_team = "Orlando Pirates" AND result = "1–3" |
what is the format of catalog 865 821-1? | SELECT format FROM table_name_25 WHERE catalog = "865 821-1" |
what's the permanence of the body where penance is the undifferenced | SELECT permanence_of_the_body FROM table_11609814_1 WHERE penance = "the undifferenced" |
What is the average star with highest percentage for episodes that have received award? | SELECT T2.person_id FROM Vote AS T1 INNER JOIN Award AS T2 ON T1.episode_id = T2.episode_id ORDER BY T1.percent DESC LIMIT 1 |
When there are more than 126 errors, more than 551 kills, and more than 40 assists for the 2007 season, what is the total of Solo Blocks? | SELECT SUM(solo_blocks) FROM table_name_24 WHERE errors > 126 AND kills > 551 AND season = "2007" AND assists > 40 |
List the title of all cartoons in alphabetical order. | SELECT Title FROM Cartoon ORDER BY title |
What is the value of the coin weighing 10.5 g and made of cupronickel? | SELECT value FROM table_name_52 WHERE composition = "cupronickel" AND weight = "10.5 g" |
What is the highest sd when the status is second round lost to iveta benešová? | SELECT MAX(sd) FROM table_26218783_7 WHERE status = "Second round lost to Iveta Benešová" |
What is the average supply cost for the part "hot spring dodger dim light"? | SELECT AVG(T1.ps_supplycost) FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1.ps_suppkey = T2.s_suppkey INNER JOIN part AS T3 ON T1.ps_partkey = T3.p_partkey WHERE T3.p_name = 'hot spring dodger dim light' |
Name the record for result of l 17–50 | SELECT record FROM table_14940519_1 WHERE result = "L 17–50" |
What are the years, titles, and publishers for all books, ordered by year descending? | SELECT YEAR , book_title , publisher FROM book_club ORDER BY YEAR DESC |
What is all the information about employees with D, S, or N in their first name, ordered by salary descending? | SELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' OR first_name LIKE '%N%' ORDER BY salary DESC |
How often does Dengeki girl's style come out? | SELECT frequency FROM table_name_5 WHERE parent_magazine = "dengeki girl's style" |
How many lessons did customer with first name Ray take? | SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = "Ray" |
What province did the river Klaeaelv travel through and how long is the river? | SELECT T1.Province FROM city AS T1 INNER JOIN located AS T2 ON T1.Name = T2.City INNER JOIN river AS T3 ON T3.Name = T2.River WHERE T3.Name = 'Klaraelv' |
What is the average number of audience for festivals? | SELECT avg(Num_of_Audience) FROM festival_detail |
What was the score of the team North Melbourne played at Arden Street Oval? | SELECT away_team AS score FROM table_name_75 WHERE home_team = "north melbourne" |
Name the most points with lost more than 1 and games less than 5 | SELECT MAX(points) FROM table_name_96 WHERE lost > 1 AND games < 5 |
How many times did episode 79 originally air? | SELECT COUNT(original_air_date) FROM table_11111116_6 WHERE no_in_series = 79 |
How many mens doubles took place in 1970/1971? | SELECT COUNT(mens_doubles) FROM table_12266757_1 WHERE season = "1970/1971" |
Show all titles and their instructors' names for courses in 2008, in alphabetical order by title. | SELECT T1.title , T3.name FROM course AS T1 JOIN teaches AS T2 ON T1.course_id = T2.course_id JOIN instructor AS T3 ON T2.id = T3.id WHERE YEAR = 2008 ORDER BY T1.title |
What country has a medical school established in 1969 with both an IMED and avicenna? | SELECT country_territory FROM table_name_15 WHERE imed_avicenna_listed = "both" AND established = 1969 |
Which country is the film Tent of Miracles from? | SELECT country FROM table_name_9 WHERE film_title_used_in_nomination = "tent of miracles" |
What is Notes, when Gold is "Thierry Gueorgiou", when Year is before 2008, and when Bronze is "Valentin Novikov"? | SELECT notes FROM table_name_70 WHERE gold = "thierry gueorgiou" AND year < 2008 AND bronze = "valentin novikov" |
What was the job of Dariusz Wolski in the movie "Pirates of the Caribbean: At World's End"? | SELECT T2.job FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T1.title LIKE 'Pirates of the Caribbean: At World%s End' AND T3.person_name = 'Dariusz Wolski' |
Which indicator name uses the Weighted average method and has the lowest value? | SELECT T1.IndicatorName, MIN(T1.Value) FROM Indicators AS T1 INNER JOIN Series AS T2 ON T1.IndicatorName = T2.IndicatorName WHERE T2.AggregationMethod = 'Weighted average' |
What CFL Team was Barry Jamieson a part of? | SELECT cfl_team FROM table_26996293_1 WHERE player = "Barry Jamieson" |
Give me a list of cities whose temperature in Mar is lower than that in July and which have also served as host cities ? | SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Jul INTERSECT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city |
What was the winning team in 2013? | SELECT winning_team FROM table_name_74 WHERE year = 2013 |
Find the package choice and series name of the TV channel that has high definition TV. | SELECT package_option , series_name FROM TV_Channel WHERE hight_definition_TV = "yes" |
How many pilots are there? | SELECT count(*) FROM pilot |
What Rd 3 has a Rd 2 1 of 0+1? | SELECT rd_3 FROM table_name_95 WHERE rd_2_1 = "0+1" |
Find the name and capacity of the stadium where the event named "World Junior" happened. | SELECT t1.name , t1.capacity FROM stadium AS t1 JOIN event AS t2 ON t1.id = t2.stadium_id WHERE t2.name = 'World Junior' |
What is the Drop Zone time for the 439th tcg Troop Carrier Group with more tham 36 C-47s? | SELECT drop_zone AS Time FROM table_name_27 WHERE troop_carrier_group = "439th tcg" AND _number_of_c_47s > 36 |
Find name of the services that has never been used. | SELECT service_name FROM services EXCEPT SELECT t1.service_name FROM services AS t1 JOIN party_services AS t2 ON t1.service_id = t2.service_id |
State the goalie who has the lowest percentage of goals against among all the shots against recorded. Name the players and season where he played. | SELECT T1.firstName, T1.lastName, T2.year FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE CAST(T2.GA AS REAL) / T2.SA IS NOT NULL ORDER BY CAST(T2.GA AS REAL) / T2.SA LIMIT 1 |
What us the number of the round during which #56 Blue Thunder Racing become the GTP winning team and #38 Mandeville Auto Tech became the GTO winning team? | SELECT rnd FROM table_13643320_2 WHERE gtp_winning_team = "#56 Blue Thunder Racing" AND gto_winning_team = "#38 Mandeville Auto Tech" |
What was the lowest percentages of wins in 1989 with a GB [c] of 17? | SELECT MIN(win_percentage) FROM table_name_59 WHERE gb_[c_] = "17" AND reds_season = 1989 |
Show all the locations where some cinemas were opened in year 2011 | SELECT LOCATION FROM cinema WHERE openning_year = 2011 |
what are highest access count on the table? | SELECT access_count FROM Documents ORDER BY access_count DESC LIMIT 1 |
When the home team of st kilda was playing, what was the away team score? | SELECT away_team AS score FROM table_name_97 WHERE home_team = "st kilda" |
What were the "other details" (number released) for "is my love will follow me"? | SELECT other_details FROM table_18710512_3 WHERE single = "My Love Will Follow Me" |
Where did Obama get 37.1%? | SELECT county FROM table_20453681_1 WHERE obama_percentage = "37.1%" |
where is Dakota State University situated ? | Did you mean the location or the street address of its building? | yes, location of Dakota state University? | SELECT Location FROM institution WHERE Institution = 'Dakota State University' |
how many millions of spectator did has the episode whose prod.code was rp#213? | SELECT viewers__millions_ FROM table_23117208_3 WHERE prod_code = "RP#213" |
how many courses have prerequisite? | SELECT count ( * ) FROM course WHERE course_id IN ( SELECT course_id FROM prereq ) |
Which Type has an Incorporated in of netherlands, a Principal activities of airline, and a Company of transavia.com? | SELECT type FROM table_name_54 WHERE incorporated_in = "netherlands" AND principal_activities = "airline" AND company = "transavia.com" |
What is the result when team 1 is ICL Pakistan? | SELECT result FROM table_17103566_1 WHERE team_1 = "ICL Pakistan" |
Show the name and population of the country that has the highest roller coaster. | SELECT T1.Name , T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID ORDER BY T2.Height DESC LIMIT 1 |
What are the names of all the races that occurred in the year 2017? | SELECT name FROM races WHERE YEAR = 2017 |
What are the first names, office locations of all lecturers who have taught some course? | SELECT T2.emp_fname , T4.prof_office , T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num |
Show the transaction type code that occurs the most frequently. | SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1 |
Which division had the most draft matches in the 2008 season? | SELECT Div FROM matchs WHERE season = 2008 AND FTR = 'D' GROUP BY Div ORDER BY COUNT(FTR) DESC LIMIT 1 |
State the prevalence rate of condition no. 368581000119106. | SELECT DISTINCT T1."PREVALENCE RATE" FROM all_prevalences AS T1 INNER JOIN conditions AS T2 ON lower(T1.ITEM) = lower(T2.DESCRIPTION) WHERE T2.code = '368581000119106' |
What player is from Wales? | SELECT player FROM table_name_84 WHERE country = "wales" |
How many artists do we have? | SELECT count(*) FROM artist |
Name the birth date for taavi sadam | SELECT birth_date FROM table_25058562_2 WHERE player = "Taavi Sadam" |
Which score has a Date of august 17? | SELECT score FROM table_name_58 WHERE date = "august 17" |
Find the name of people whose age is greater than any engineer sorted by their age. | SELECT name FROM Person WHERE age > (SELECT min(age) FROM person WHERE job = 'engineer') ORDER BY age |
What is the StuffitX value that has a Stuffit of unknown, LHA/LZH of yes, and unknown ISO/CD image? | SELECT stuffit AS X FROM table_name_26 WHERE stuffit = "unknown" AND lha_lzh = "yes" AND iso_cd_image = "unknown" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.