sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
How many artworks are there? | SELECT count(*) FROM artwork |
What are the prices of them? | SELECT product_price FROM products where product_type_code = ( SELECT product_type_code FROM products GROUP BY product_type_code HAVING avg ( product_price ) < ( SELECT avg ( product_price ) FROM products ) ) |
What are the affiliations of the author "Mark A. Musen" written on and off paper? | SELECT T1.Affiliation FROM PaperAuthor AS T1 INNER JOIN Author AS T2 ON T1.AuthorId = T2.Id WHERE T2.Name = 'Mark A. Musen' |
What's Brazil's rank when it has notes of R? | SELECT COUNT(rank) FROM table_name_4 WHERE notes = "r" AND country = "brazil" |
What are the notes of the patience theme? | SELECT notes FROM table_name_76 WHERE theme = "patience" |
What is the Money ($) amount of the Player with a To par of e? | SELECT money___$__ FROM table_name_2 WHERE to_par = "e" |
List the names of members who did not participate in any round. | SELECT Name FROM member WHERE Member_ID NOT IN (SELECT Member_ID FROM round) |
What is the current account balance for a GDP at current prices of 142.640? | SELECT current_account_balance__percent_of_gdp_ FROM table_30133_1 WHERE gdp_at_current_prices__usd_billions_ = "142.640" |
What Frequency's Branding is Your Cure for Corporate Radio? | SELECT frequency FROM table_name_23 WHERE branding = "your cure for corporate radio" |
What are the phones of departments in Room 268? | SELECT DPhone FROM DEPARTMENT WHERE Room = 268 |
How many publishers have the word "book" in their name? | SELECT COUNT(*) FROM publisher WHERE publisher_name LIKE '%book%' |
What is the Set 5 with a Date that is jun 29? | SELECT set_5 FROM table_name_93 WHERE date = "jun 29" |
What is the score of the game on June 25 at the mohegan sun arena? | SELECT score FROM table_name_85 WHERE location = "mohegan sun arena" AND date = "june 25" |
Show the ids of the employees who don't authorize destruction for any document. | SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed |
What is the biggest amount of payment for a rental made by Mary Smith? | SELECT T1.amount FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'MARY' AND T2.last_name = 'SMITH' ORDER BY T1.amount DESC LIMIT 1 |
What is the highest lane for Brazil, ranked less than 8? | SELECT MAX(lane) FROM table_name_85 WHERE country = "brazil" AND rank < 8 |
What is the Player with a Date with 12-03-2003? | SELECT player FROM table_name_31 WHERE date = "12-03-2003" |
In what place did Tom Lehman finish? | SELECT place FROM table_name_29 WHERE player = "tom lehman" |
Which chassis has 17 points? | SELECT chassis FROM table_name_30 WHERE points = 17 |
What is the status of Author Del Corro? | SELECT status FROM table_name_84 WHERE authors = "del corro" |
Highest inhabitants from gela? | SELECT MAX(inhabitants) FROM table_name_86 WHERE municipality = "gela" |
Please show the themes of competitions with host cities having populations larger than 1000. | SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000 |
what's the game with record being 29–3 | SELECT game FROM table_13480122_5 WHERE record = "29–3" |
What date was the week 17 game played on? | SELECT date FROM table_name_62 WHERE week = "17" |
Which team had more than one player who grabbed more than 600 rebounds in 2011? Give the full name of the team. | SELECT T1.tmID FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.year = 2011 AND T2.rebounds > 600 |
What is the value for the League Cup when the FA Cup value is 0 13 0 (49)? | SELECT league AS Cup FROM table_name_20 WHERE fa_cup = "0 13 0 (49)" |
What was the score for Team 1 of Stade Lavallois (d1)? | SELECT score FROM table_name_7 WHERE team_1 = "stade lavallois (d1)" |
How many policies are listed for the customer named "Dayana Robel"? | SELECT count(*) FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = "Dayana Robel" |
What place had a score of 71-70-73-71=285? | SELECT place FROM table_name_50 WHERE score = 71 - 70 - 73 - 71 = 285 |
Name the national rank for medical university of south carolina | SELECT national_rank FROM table_27956_3 WHERE institution = "Medical University of South Carolina" |
Are there SPI on the number 7 cylinder? | SELECT spi FROM table_16731248_1 WHERE number_on_cyl = "7" |
What are the first, middle, and last names for everybody enrolled in a Bachelors program? | SELECT DISTINCT T1.first_name , T1.middle_name , T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id JOIN Degree_Programs AS T3 ON T2.degree_program_id = T3.degree_program_id WHERE T3.degree_summary_name = 'Bachelor' |
What is the average and maximum number of hours students who made the team practiced? | SELECT avg(T1.HS) , max(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' |
What country in the region of Sub-Saharan Africa has a series code of "SP.DYN.AMRT.FE"? Indicate the long name of the country | SELECT DISTINCT T3.LongName FROM SeriesNotes AS T1 INNER JOIN CountryNotes AS T2 ON T1.SeriesCode = T2.Seriescode INNER JOIN Country AS T3 ON T2.Countrycode = T3.CountryCode WHERE T3.Region = 'Sub-Saharan Africa' AND T1.SeriesCode = 'SP.DYN.AMRT.FE' |
Tell me the nationality of pick of 153 | SELECT nationality FROM table_name_85 WHERE pick = "153" |
What is their first name? | Do you mean their ?can you give more info? | What is the customer first name of the customer with the most number of accounts? | SELECT T2.customer_first_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count ( * ) DESC LIMIT 1 |
Is GV the only budget type? | SELECT distinct Budget_Type_Code FROM Documents_with_Expenses |
List the name of the shop with the latest open year. | SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1 |
Where did the west indies batting team play at? | SELECT venue FROM table_name_23 WHERE batting_team = "west indies" |
How many crimes were Misc Non-Index Offense? | SELECT SUM(CASE WHEN T1.title = 'Misc Non-Index Offense' THEN 1 ELSE 0 END) FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T2.fbi_code_no = T1.fbi_code_no |
List the 5 orders with the highest total price, indicating the delivery date. | SELECT T1.o_orderkey, T2.l_shipdate FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey ORDER BY T1.o_totalprice DESC LIMIT 5 |
Who is the sponsor of menu with ID 12463? | SELECT sponsor FROM Menu WHERE id = 12463 |
Who was the leading scorer on April 7? | SELECT leading_scorer FROM table_name_8 WHERE date = "april 7" |
Count the total number of counties. | SELECT count(*) FROM county |
What was the attendance total for week 10? | SELECT attendance FROM table_name_77 WHERE week = 10 |
Name the candidates for l. mendel rivers | SELECT COUNT(candidates) FROM table_1341930_40 WHERE incumbent = "L. Mendel Rivers" |
Show the number of projects. | SELECT count(*) FROM Projects |
What is the name of party with most number of members? | SELECT T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id ORDER BY count(*) DESC LIMIT 1 |
Find the number of routes and airport name for each source airport, order the results by decreasing number of routes. | SELECT count(*) , T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name ORDER BY count(*) DESC |
What team did the Chicago Black Hawks visit on April 20? | SELECT home FROM table_name_92 WHERE visitor = "chicago black hawks" AND date = "april 20" |
What is the number of played when points against 645? | SELECT COUNT(played) FROM table_13018116_1 WHERE pts_agst = 645 |
Which player has a Club/province of direito, less than 21 caps, and a Position of lock? | SELECT player FROM table_name_99 WHERE club_province = "direito" AND caps < 21 AND position = "lock" |
Could you tell me how many departments have a head whose temporary acting value is 'no'? | SELECT count ( * ) from management WHERE temporary_acting = 'No' |
What is the year in which most ships were built? | SELECT built_year FROM ship GROUP BY built_year ORDER BY count(*) DESC LIMIT 1 |
When Richmond had a total count of 2,293, what was the total count of Brooklyn? | SELECT brooklyn FROM table_name_53 WHERE richmond_[staten_is] = "2,293" |
Where can I find the office of the President of the company? | SELECT t2.addressLine1, t2.addressLine2 FROM employees AS t1 INNER JOIN offices AS t2 ON t1.officeCode = t2.officeCode WHERE t1.jobTitle = 'President' |
Which lap number had a grid number bigger than 9 and where the driver was Mark Webber? | SELECT laps FROM table_name_77 WHERE grid > 9 AND driver = "mark webber" |
What order year has a 30 Length (ft.) and 05.505 model? | SELECT order_year FROM table_name_86 WHERE length__ft_ = "30" AND model = "05.505" |
What are the largest ethnic groups where the cyrillic name and other names is пачир (hungarian: pacsér)? | SELECT largest_ethnic_group__2002_ FROM table_2562572_27 WHERE cyrillic_name_other_names = "Пачир (Hungarian: Pacsér)" |
Of the genes whose phenotype and motif are nucleic acid metabolism defects, PS00107, what percentage perform positive interaction with another gene? | SELECT CAST(SUM(IIF(T2.Expression_Corr > 0, 1, 0)) AS REAL) * 100 / COUNT(T2.GeneID1) FROM Genes AS T1 INNER JOIN Interactions AS T2 ON T1.GeneID = T2.GeneID1 WHERE T1.Phenotype = 'Nucleic acid metabolism defects' AND T1.Motif = 'PS00107' |
How many reshared tweets have over 100 likes? | SELECT COUNT(DISTINCT TweetID) FROM twitter WHERE IsReshare = 'TRUE' AND Likes > 100 |
What was the score for the Atlanta Thrashers? | SELECT score FROM table_23486853_3 WHERE opponent = "Atlanta Thrashers" |
What are all the policy types of the customer that has the most policies listed? | SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = (SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_name ORDER BY COUNT(*) DESC LIMIT 1) |
What is the Date when the Set 1 is 25–21, and the Score is 3–0, and the Time is 11:00? | SELECT date FROM table_name_51 WHERE set_1 = "25–21" AND score = "3–0" AND time = "11:00" |
How many times did Sham Kwok Fai score in the game that was played on 22 February 2006? | SELECT SUM(scored) FROM table_name_72 WHERE date = "22 february 2006" |
List the order key of the orders with a total price between 200000 and 300000. | SELECT o_orderkey FROM orders WHERE o_totalprice BETWEEN 200000 AND 300000 |
what is the name and nation of the singer who have a song having 'Hey' in its name? | SELECT name , country FROM singer WHERE song_name LIKE '%Hey%' |
List players' first name and last name who received salary from team Washington Nationals in both 2005 and 2007. | SELECT T2.name_first , T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2005 AND T3.name = 'Washington Nationals' INTERSECT SELECT T2.name_first , T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2007 AND T3.name = 'Washington Nationals' |
What other cadidate ran against Dave Treen? | SELECT candidates FROM table_1341663_19 WHERE incumbent = "Dave Treen" |
List the arrival date and the departure date for all the dogs. | SELECT date_arrived , date_departed FROM Dogs |
Show all locations and the total number of platforms and passengers for all train stations in each location. | SELECT LOCATION , sum(number_of_platforms) , sum(total_passengers) FROM station GROUP BY LOCATION |
Show names of actors that have appeared in musical with name "The Phantom of the Opera". | SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID WHERE T2.Name = "The Phantom of the Opera" |
What was the TO par for the player who scored 70-68-74-70=282? | SELECT to_par FROM table_name_26 WHERE score = 70 - 68 - 74 - 70 = 282 |
Show all member names who are not in charge of any event. | SELECT member_name FROM member EXCEPT SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id |
Who was the opponent when the fight had a time of 0:10? | SELECT opponent FROM table_name_97 WHERE time = "0:10" |
Which date had a score of 5-1? | SELECT date FROM table_name_20 WHERE score = "5-1" |
Show gas station id, location, and manager_name for all gas stations ordered by open year. | SELECT station_id, LOCATION, manager_name FROM gas_station ORDER BY open_year |
What are the dates of transactions with amount smaller than 3000? | SELECT T2.date_of_transaction FROM SALES AS T1 JOIN TRANSACTIONS AS T2 ON T1.sales_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction < 3000 |
Name the least attendance for opponent of new orleans saints and week more than 2 | SELECT MIN(attendance) FROM table_name_5 WHERE week > 2 AND opponent = "new orleans saints" |
Who was in the three darts challenge that aired on 10 may 2010? | SELECT three_darts_challenge FROM table_26733129_1 WHERE air_date = "10 May 2010" |
What is the average Isolation in the municipality of Sunndal at an elevation of more than 1850? | SELECT AVG(isolation__km_) FROM table_name_83 WHERE municipality = "sunndal" AND elevation__m_ > 1850 |
In which year are there festivals both inside the 'United States' and outside the 'United States'? | SELECT YEAR FROM festival_detail WHERE LOCATION = 'United States' INTERSECT SELECT YEAR FROM festival_detail WHERE LOCATION != 'United States' |
What is the GDP per capita (US$) of the country that has a Population of 2,011,473? | SELECT gdp_per_capita__us$_ FROM table_name_54 WHERE population = "2,011,473" |
I want the result for team of giants | SELECT result FROM table_name_63 WHERE team = "giants" |
The Club of Ekranas was an away with a score of what? | SELECT away FROM table_name_28 WHERE club = "ekranas" |
How many distinct types of accounts are there? | SELECT count(DISTINCT acc_type) FROM customer |
What is Scott Verplank's score? | SELECT score FROM table_name_65 WHERE player = "scott verplank" |
Which MLS team has the #41 pick? | SELECT mls_team FROM table_name_86 WHERE pick__number = 41 |
Indicating the bounding box of "kitchen" in image id 250. | SELECT T1.X, T1.Y, T1.W, T1.H FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 250 AND T2.OBJ_CLASS = 'kitchen' |
List the cities located in U.A.E. | SELECT T1.City_Name FROM City AS T1 INNER JOIN Country AS T2 ON T2.Country_Id = T1.Country_id WHERE T2.Country_Name = 'U.A.E' |
How many race 1's have 5 as the race 3, with points less than 59? | SELECT SUM(race_1) FROM table_name_45 WHERE race_3 = "5" AND points < 59 |
which Cover model has a Centerfold model of jennifer walcott? | SELECT cover_model FROM table_name_77 WHERE centerfold_model = "jennifer walcott" |
Which Surface has a Support Category of jwrc/pwrc, and a Round larger than 5? | SELECT surface FROM table_name_21 WHERE support_category = "jwrc/pwrc" AND round > 5 |
Finally, can you provide the number of characteristics of the product with the name "flax"? | SELECT count ( * ) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "flax" |
Show names for all employees who have certificate of Boeing 737-800. | SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = "Boeing 737-800" |
Give the tokenized name for the method "Supay.Irc.Messages.KnockMessage.GetTokens". | SELECT NameTokenized FROM Method WHERE Name = 'Supay.Irc.Messages.KnockMessage.GetTokens' |
In which region can you find the top 4 most popular restaurants? | SELECT T2.region FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city ORDER BY T1.review DESC LIMIT 4 |
Give the name of the movie that got the most "5" ratings. | SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.rating_score = 5 |
What notes did the creature comforts film have? | SELECT notes FROM table_name_31 WHERE title = "creature comforts" |
Calculate the difference in the average number of vehicular hijackings and aggravated vehicular hijackings in the districts. | SELECT ROUND(CAST(COUNT(CASE WHEN T1.secondary_description = 'VEHICULAR HIJACKING' THEN T1.iucr_no END) AS REAL) / CAST(COUNT(DISTINCT CASE WHEN T1.secondary_description = 'VEHICULAR HIJACKING' THEN T3.district_name END) AS REAL) - CAST(COUNT(CASE WHEN T1.secondary_description = 'AGGRAVATED VEHICULAR HIJACKING' THEN T1.iucr_no END) AS REAL) / CAST(COUNT(DISTINCT CASE WHEN T1.secondary_description = 'AGGRAVATED VEHICULAR HIJACKING' THEN T3.district_name END) AS REAL), 4) AS "difference" FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T2.iucr_no = T1.iucr_no INNER JOIN District AS T3 ON T3.district_no = T2.district_no |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.