sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What is the sector when the population change 2002-2012 (%) is 79.6? | SELECT sector FROM table_12496904_1 WHERE population_change_2002_2012___percentage_ = "79.6" |
Count the number of different scientists assigned to any project. | SELECT count(DISTINCT scientist) FROM assignedto |
What was the score of the game in which Brook Lopez (8) did the high rebounds? | SELECT score FROM table_22879323_8 WHERE high_rebounds = "Brook Lopez (8)" |
Who made the comments for radio broadcast when Jan Gabrielsson made them for television broadcast? | SELECT radio_commentator FROM table_2794180_11 WHERE television_commentator = "Jan Gabrielsson" |
Which Game 3 has a Game 1 of brett kenny? | SELECT game_3 FROM table_name_75 WHERE game_1 = "brett kenny" |
How many companies have a revenue greater than 100.0? | SELECT count ( * ) FROM manufacturers where revenue>100.0 |
What was the winning % when there were 322 goals? | SELECT winning_pct__percentage FROM table_2259285_1 WHERE goals_for = 322 |
Which manufacturer made a locomotive with a type of 4-6-4t? | SELECT manufacturer FROM table_name_40 WHERE type = "4-6-4t" |
What is the Established date of the Ontario Provincial Junior A Hockey League with more than 1 Championship? | SELECT COUNT(established) FROM table_name_58 WHERE league = "ontario provincial junior a hockey" AND championships > 1 |
What country was Jay Haas representing? | SELECT country FROM table_name_77 WHERE player = "jay haas" |
How many papers were presented at 'ECSQARU' in 2003? | SELECT COUNT(T1.Id) FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.ShortName = 'ECSQARU' AND T1.Year = '2003' |
What years were the inactive North Carolina chapter active? | SELECT charter_range FROM table_name_15 WHERE status = "inactive" AND state = "north carolina" |
Show publishers that have less than one publication? | SELECT Publisher FROM publication GROUP BY Publisher HAVING COUNT ( * ) > 1 |
Who was the chair of the LA Awards? | select Chair_Name from festival_detail where festival_name = "LA Awards" |
How tall is the player jones, major major jones? | SELECT height_in_ft FROM table_11734041_9 WHERE player = "Jones, Major Major Jones" |
can you list the products that have problems | Did you mean to ask for the product names of products that have problems? | yes | SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id |
How many of the 22 professors are part of the Accounting department? | SELECT count ( * ) FROM Professor WHERE Dept_code = "ACCT" |
Can you show all rooms with a capacity larger than 50? | SELECT * FROM classroom WHERE capacity > 50 |
What are the last names that are used by customers and staff? | SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff |
When the production (mt) is 446424, what is the value world rank ? | SELECT value_world_rank FROM table_21109892_1 WHERE production__mt_ = 446424 |
Which clubs have one or more members from the city with code "HOU"? Give me the names of the clubs. | SELECT DISTINCT t1.clubname 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 t3.city_code = "HOU" |
What is the Jump 2 of the person that has a Jump 1 of 7.14 | SELECT jump_2 FROM table_name_58 WHERE jump_1 = "7.14" |
In what City/State did John Bowe win at Phillip Island Grand Prix Circuit? | SELECT city___state FROM table_name_12 WHERE winner = "john bowe" AND circuit = "phillip island grand prix circuit" |
Which year is the book title the ordinary? | SELECT year FROM table_20193855_2 WHERE book_title = "The Ordinary" |
Which Longi- tude is on jun 6? | SELECT longi__tude FROM table_name_28 WHERE date_³ = "jun 6" |
How many 5 star businesses have uber review votes for funny? | SELECT COUNT(business_id) FROM Reviews WHERE review_stars = 5 AND review_votes_funny = 'Uber' |
Who was the artist with a start date of 1966-10-23? | SELECT artist_s_ FROM table_2560677_1 WHERE start_date = "1966-10-23" |
What are the names and year of construction for the mills of 'Grondzeiler' type? | SELECT name, built_year FROM mill WHERE TYPE = 'Grondzeiler' |
What is the epicenter of the earthquake on March 2, 1825 with an unknown intensity? | SELECT epicenter FROM table_name_10 WHERE intensity = "unknown" AND date = "march 2, 1825" |
What are the names and data types of the characteristics of the 'cumin' product? | SELECT t3.characteristic_name , t3.characteristic_data_type 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 = "cumin" |
How many statements do we have? | SELECT COUNT(*) FROM Statements |
Name the laps of october 26 | SELECT laps FROM table_2267857_1 WHERE date = "October 26" |
In which years does the country whose Alpha2Code is 1A have a result of the indicator Adolescent fertility rate? | SELECT T2.Year FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.Alpha2Code = '1A' AND T2.IndicatorName = 'Adolescent fertility rate (births per 1,000 women ages 15-19)' |
What Authority has a decile greater than 5, with a roll of 170? | SELECT authority FROM table_name_62 WHERE decile > 5 AND roll = 170 |
who is the husband when ceased to be dauphine is 22 july 1461 became queen? | SELECT husband FROM table_name_36 WHERE ceased_to_be_dauphine = "22 july 1461 became queen" |
How many laps were done in 2012? | SELECT SUM(laps) FROM table_name_26 WHERE year = 2012 |
Which Set 3 has a Set 1 of 25–20? | SELECT set_3 FROM table_name_9 WHERE set_1 = "25–20" |
Find the number of students whose city code is NYC, please? | SELECT count ( * ) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.city_code = "NYC" |
Which Conceded is the highest one that has Points larger than 17, and a Team of guaraní, and Losses smaller than 6? | SELECT MAX(conceded) FROM table_name_39 WHERE points > 17 AND team = "guaraní" AND losses < 6 |
In Sub-Saharan Africa, how many female out-of-school children of primary school age are there in the country with the higest number of female out-of-school children of primary school age? Indicate the year of when it was recorded. | SELECT MAX(T1.value), T1.year FROM indicators AS T1 INNER JOIN country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Region = 'Sub-Saharan Africa' AND T1.IndicatorName = 'Out-of-school children of primary school age, female (number)' |
How many items did Customer#000021159 order? Calculate those items total charges. | SELECT COUNT(T2.o_orderkey), SUM(T3.l_extendedprice * (1 - T3.l_discount) * (1 + T3.l_tax)) FROM customer AS T1 INNER JOIN orders AS T2 ON T1.c_custkey = T2.o_custkey INNER JOIN lineitem AS T3 ON T2.o_orderkey = T3.l_orderkey WHERE T1.c_name = 'Customer#000021159' GROUP BY T3.l_linenumber |
who is the opponent in the final when the tournament is cagnes-sur-mer? | SELECT opponent_in_the_final FROM table_name_64 WHERE tournament = "cagnes-sur-mer" |
Give the names of tracks that do not have a race in the class 'GT'. | SELECT name FROM track EXCEPT SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id WHERE T1.class = 'GT' |
What are there names? | SELECT pName FROM Player |
Who performed the most rebounds on games against the Minnesota Timberwolves? | SELECT high_rebounds FROM table_27902171_9 WHERE team = "Minnesota Timberwolves" |
Which recipe has the highest number of ingredients? Calculate the said recipe's total time of cooking. | SELECT T2.recipe_id, T1.prep_min + T1.cook_min + T1.stnd_min FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id GROUP BY T2.recipe_id ORDER BY COUNT(T2.ingredient_id) DESC LIMIT 1 |
Whose name in Polish holds the Lublin seat? | SELECT name_in_polish FROM table_11614581_3 WHERE seat = "Lublin" |
who is the the high rebounds with team being vancouver | SELECT high_rebounds FROM table_13557843_7 WHERE team = "Vancouver" |
The film titled Bosko's fox hunt had what as the smallest production number? | SELECT MIN(production_num) FROM table_name_56 WHERE title = "bosko's fox hunt" |
what is the average of market value? | SELECT avg ( Market_Value ) FROM company |
Name the 2010 for tournament of us open | SELECT 2010 FROM table_name_95 WHERE tournament = "us open" |
Select the names of all the products in the store. | SELECT Name FROM Products |
What is the average and maximum damage in millions for storms that had a max speed over 1000? | SELECT avg(damage_millions_USD) , max(damage_millions_USD) FROM storm WHERE max_speed > 1000 |
What is the largest decile with a Roll larger than 34, a Gender of coed, and an Authority of state integrated, and an Area of georgetown? | SELECT MAX(decile) FROM table_name_47 WHERE roll > 34 AND gender = "coed" AND authority = "state integrated" AND area = "georgetown" |
When did customer with first name as Carole and last name as Bernhard became a customer? | SELECT date_became_customer FROM Customers WHERE first_name = "Carole" AND last_name = "Bernhard"; |
In what Week was Serena Williams 6–1, 6–7(7), 6–3 the Winner? | SELECT week FROM table_name_65 WHERE winners = "serena williams 6–1, 6–7(7), 6–3" |
What is the total number of birth/2012 for January–December 2012 in Kurgan Oblast? | SELECT COUNT(birth_2012) FROM table_25703_2 WHERE january_december_2012 = "Kurgan Oblast" |
how many pages per minute colored in Xerox Travel Scanner 100? | SELECT pages_per_minute_color FROM product WHERE product = "Xerox Travel Scanner 100" |
Show card number, name, and hometown for all members in a descending order of level. | SELECT card_number , name , hometown FROM member ORDER BY LEVEL DESC |
What are the highest number of points with an Entrant of warsteiner brewery? | SELECT MAX(points) FROM table_name_8 WHERE entrant = "warsteiner brewery" |
Which year has has a Engine of maserati straight-6? | SELECT COUNT(year) FROM table_name_31 WHERE engine = "maserati straight-6" |
what are the durations of the longest tracts? | SELECT max ( Milliseconds ) FROM TRACK |
In what city does Janessa Sawayn live? | SELECT T1.city FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn"; |
Which Competition has a Result of w, and a Score of 2-0, and a Date of may 9, 1954? | SELECT competition FROM table_name_50 WHERE result = "w" AND score = "2-0" AND date = "may 9, 1954" |
What League position has a Result F – A of 2 – 0, and Opponents of queens park rangers? | SELECT league_position FROM table_name_31 WHERE result_f___a = "2 – 0" AND opponents = "queens park rangers" |
How many faculty, in total, are there in the year 2002? | SELECT sum(faculty) FROM faculty WHERE YEAR = 2002 |
What year was the Beaudesert suburb club founded | SELECT founded FROM table_name_95 WHERE suburb = "beaudesert" |
Which headquarter locations are used by more than 2 companies? | SELECT Headquarters FROM Companies GROUP BY Headquarters HAVING COUNT(*) > 2 |
In what week was the Result L 35-10? | SELECT MIN(week) FROM table_name_76 WHERE result = "l 35-10" |
what team has a drive name emmanuel de graffenried and a position larger than 1 as well as the date of 9/1953? | SELECT team FROM table_name_46 WHERE position > 1 AND date = "9/1953" AND driver = "emmanuel de graffenried" |
What is the home team for the Princes Park venue? | SELECT home_team FROM table_name_87 WHERE venue = "princes park" |
Calculate the total purchases made by customers using their Visa credit cards in the Sac State American River Courtyard between 6/3/2014 and 11/27/2015. | SELECT SUM(T1.PurchasePrice) FROM `transaction` AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T2.LocationName = 'Sac State American River Courtyard' AND T1.CreditCardType = 'Visa' AND T1.TransactionDate BETWEEN '2014-06-03' AND '2015-11-27' |
What are names of customers who never ordered product Latte. | SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte' |
How many aircrafts exist in the database? | SELECT count(*) FROM Aircraft |
When was the Mallala race held? | SELECT date FROM table_name_57 WHERE race_title = "mallala" |
Calculate the percentage of Black students in all private for profit institutions. | SELECT CAST(SUM(CASE WHEN T2.race = 'B' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(T2.grad_cohort) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T1.unitid = T2.unitid WHERE T2.race = 'B' AND T1.control = 'Private for-profit' |
What are the different cities listed? | SELECT DISTINCT headquarter FROM manufacturers |
What is the total number of wins for Darley of Ballarat FL against larger than 1055? | SELECT COUNT(wins) FROM table_name_96 WHERE ballarat_fl = "darley" AND against > 1055 |
Which away team in the division of Bundesliga has the highest final time goals? | SELECT T1.AwayTeam FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div=T2.division WHERE T2.name = 'Bundesliga' ORDER BY T1.FTAG DESC LIMIT 1 |
How many object samples in image no.908 are in the class of tip? | SELECT SUM(CASE WHEN T2.OBJ_CLASS = 'tip' THEN 1 ELSE 0 END) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 908 |
how many porphyria have substrate δ-aminolevulinic acid | SELECT COUNT(porphyria) FROM table_182499_1 WHERE substrate = "δ-Aminolevulinic acid" |
Find the number of routes with destination airports in Italy. | SELECT COUNT(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid WHERE T2.country = 'Italy' |
How long did Berry Keebler take the Acetaminophen 160 MG when he was admitted due to acute bronchitis? | SELECT strftime('%J', T2.STOP) - strftime('%J', T2.START) AS takenDays FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Berry' AND T1.last = 'Keebler' AND T2.REASONDESCRIPTION = 'Acute bronchitis (disorder)' AND T2.DESCRIPTION = 'Acetaminophen 160 MG' |
What are the white percentages of cities, and the corresponding crime rates of the counties they correspond to? | SELECT T1.White , T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID |
Can you list the share counts for all transactions? | SELECT share_count FROM TRANSACTIONS |
What record has decision (majority) as the method? | SELECT record FROM table_name_48 WHERE method = "decision (majority)" |
Find the names of the swimmers who have both "win" and "loss" results in the record. | SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win' INTERSECT SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Loss' |
When did Natalie Dorris buy her first root beer? | SELECT T2.TransactionDate FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.First = 'Natalie' AND T1.Last = 'Dorris' ORDER BY T2.TransactionDate LIMIT 1 |
Can you show me a list of all the course descriptions? | SELECT CRS_DESCRIPTION from course |
In which state does Emily Wood work? | SELECT T2.state FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID WHERE T1.firstname = 'Emily' AND T1.lastname = 'Wood' |
List the name of the aircraft that has been named winning aircraft the most number of times. | SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) DESC LIMIT 1 |
Provide the title and total time of the recipe which has the highest possibility of gaining weight. | SELECT T1.title, T1.prep_min + T1.cook_min + T1.stnd_min FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id ORDER BY T2.total_fat DESC LIMIT 1 |
What are the ID of actors with quality rating of 3 acted in English USA movies? | SELECT T2.actorid FROM movies AS T1 INNER JOIN movies2actors AS T2 ON T1.movieid = T2.movieid INNER JOIN actors AS T3 ON T2.actorid = T3.actorid WHERE T3.a_quality = 3 AND T1.country = 'USA' AND T1.isEnglish = 'T' |
What are the highest and lowest prices of products, grouped by and alphabetically ordered by product type? | SELECT max(product_price) , min(product_price) , product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code |
What team was 2 when Tatung was team 1 at National Pei Men Senior High School? | SELECT team_2 FROM table_name_32 WHERE team_1 = "tatung" AND ground = "national pei men senior high school" |
Record of 18–15–6 belongs to what lowest attendance? | SELECT MIN(attendance) FROM table_name_32 WHERE record = "18–15–6" |
Can you show me the insurance id of the patient who stays in room 111? | SELECT T2.InsuranceID FROM stay AS T1 JOIN patient AS T2 ON T1.Patient = T2.SSN JOIN Prescribes AS T3 ON T3.Patient = T2.SSN JOIN Medication AS T4 ON T3.Medication = T4.Code WHERE room = 111 |
what was steve flesch's to par when he was placed at t3 in the united states? | SELECT to_par FROM table_name_71 WHERE place = "t3" AND country = "united states" AND player = "steve flesch" |
How many crowds watched the game where the record was 1-3? | SELECT COUNT(attendance) FROM table_11452830_2 WHERE record = "1-3" |
What was the rating for Brisbane the week that Adelaide had 94000? | SELECT MIN(brisbane) FROM table_24291077_8 WHERE adelaide = 94000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.