sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What is the difference in the number of bad alias between Aguada city and Aguadilla city? | SELECT COUNT(CASE WHEN T2.city = 'Aguada' THEN T1.bad_alias ELSE NULL END) - COUNT(CASE WHEN T2.city = 'Aguadilla' THEN T1.bad_alias ELSE NULL END) AS DIFFERENCE FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code |
When did Julie gets Validated originally air? | SELECT original_air_date FROM table_name_84 WHERE title = "julie gets validated" |
Find the name and account balance of the customer whose name includes the letter ‘a’. | SELECT cust_name, acc_bal FROM customer WHERE cust_name LIKE '%a%' |
Who had the high assists in the game against Memphis? | SELECT high_assists FROM table_name_13 WHERE team = "memphis" |
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 are the staff names with job title code Sales Person? | SELECT T1.staff_name FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = "Sales Person" |
Name the stadium with final score of 20-10 | SELECT stadium FROM table_name_35 WHERE final_score = "20-10" |
Give me the product type, name and price for all the products supplied by supplier id 3. | SELECT T2.product_type_code , T2.product_name , T2.product_price FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 3 |
Which Matches have a Rank of 2? | SELECT COUNT(matches) FROM table_name_94 WHERE rank = 2 |
What was the polling average in Aug 2009 when is was 5.0% in Sep 2009? | SELECT aug_2008 FROM table_23680576_2 WHERE sep_2008 = "5.0%" |
How much is the total bonus received by sales person and what is the percentage of it against the projected yearly sales quota in 2013? | SELECT SUM(T1.Bonus) , CAST(SUM(T1.Bonus) AS REAL) * 100 / SUM(T1.SalesQuota) FROM SalesPerson AS T1 INNER JOIN SalesPersonQuotaHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE STRFTIME('%Y', T2.QuotaDate) = '2013' |
When Event has Bubbles of yes, Cancelable of yes, Category of mouse, and a Type of contextmenu what is the Attribute? | SELECT attribute FROM table_name_41 WHERE bubbles = "yes" AND cancelable = "yes" AND category = "mouse" AND type = "contextmenu" |
What is the maximum administrative population of the city with Chinese translation 昆明? | SELECT MAX(administrative_population__2010_) FROM table_16489766_2 WHERE chinese = "昆明" |
How many businesses in Glendale city that are still running is opened from 8AM to 6PM? | SELECT COUNT(T1.category_name) FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id INNER JOIN Business_Hours AS T4 ON T3.business_id = T4.business_id WHERE T3.city LIKE 'Glendale' AND T4.opening_time LIKE '8AM' AND T4.closing_time LIKE '6PM' |
Which classroom has the most students? | SELECT classroom FROM list GROUP BY classroom ORDER BY count(*) DESC LIMIT 1 |
display the full name (first and last), hire date, salary, and department number for those employees whose first name does not containing the letter M and make the result set in ascending order by department number. | SELECT first_name , last_name , hire_date , salary , department_id FROM employees WHERE first_name NOT LIKE '%M%' ORDER BY department_id |
What is the lowest attendance on September 3, 1972? | SELECT MIN(attendance) FROM table_name_52 WHERE date = "september 3, 1972" |
Show the most common college of authors of submissions. | SELECT College FROM submission GROUP BY College ORDER BY COUNT(*) DESC LIMIT 1 |
What is the codename for the Core i3-32xxt? | SELECT codename__main_article_ FROM table_24538587_11 WHERE brand_name__list_ = "Core i3-32xxT" |
Which dish has the longest history? | SELECT name FROM Dish ORDER BY last_appeared - Dish.first_appeared DESC LIMIT 1 |
Thanks! What is the respective revenues of Hewlett-Packard and Winchester? | select Name,Revenue from Manufacturers where Revenue<100 |
What instrument did the musician with last name "Heilo" use in the song "Le Pop"? | SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = "Heilo" AND T3.title = "Le Pop" |
What are the names of the people who have been on the affirmative side of debates? | SELECT T2.Name FROM debate_people AS T1 JOIN people AS T2 ON T1.Affirmative = T2.People_ID GROUP BY T2.Name |
Which program was launched most recently? Return the program name. | SELECT name FROM program ORDER BY launch DESC LIMIT 1 |
What circuit is the Sprint Cup series championship? | SELECT circuit FROM table_name_29 WHERE championship = "sprint cup series" |
List the details of the customers who do not have any policies. | SELECT customer_details FROM Customers EXCEPT SELECT T1.customer_details FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.customer_id = T2.customer_id |
What is the number in season of the episode whose production code is pabf05? | SELECT _number FROM table_28194879_1 WHERE production_code = "PABF05" |
What was the season number for the episode with the series number 61? | SELECT MAX(season__number) FROM table_11630008_5 WHERE series__number = 61 |
Tell me professor employee number for course code ACCT-211 ? | SELECT PROF_NUM FROM CLASS where CRS_CODE = 'ACCT-211' |
What are their names? | SELECT cName FROM College WHERE enr > 18000 |
who is the vacator whre the district is new jersey 2nd? | SELECT vacator FROM table_1651764_3 WHERE district = "New Jersey 2nd" |
What player has a no pick position in 1976? | SELECT player FROM table_name_33 WHERE position = "no pick" AND year = 1976 |
What is the production code for the episode that had 1.32 million U.S. viewers? | SELECT production_code FROM table_22347090_6 WHERE us_viewers__million_ = "1.32" |
What are the positions and teams of pilots? | SELECT POSITION , Team FROM pilot |
Who built Warren Booth's car with the Cosworth DFV V8 engine? | SELECT constructor FROM table_name_88 WHERE engine = "cosworth dfv v8" AND driver = "warren booth" |
COuld you list the account names of all customers with the letter G or A in their first or last names? | SELECT T2.account_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id where T1.customer_first_name like "%G%" or T1.customer_first_name like "%A%" or T1.customer_last_name like "%G%" or T1.customer_last_name like "%A%" |
How many faculty lines are there in "San Francisco State University" in year 2004? | SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2004 AND T2.campus = "San Francisco State University" |
What is the project id and detail for the project with at least two documents? | SELECT T1.project_id , T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id HAVING count(*) > 2 |
How many positions are there for RB1 Motorsports? | SELECT COUNT(position) FROM table_26609690_1 WHERE team_s_ = "RB1 Motorsports" |
What is the short description of the crime committed the most by criminals in the least populated community? | SELECT T3.title FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T1.community_area_no = T2.community_area_no INNER JOIN FBI_Code AS T3 ON T2.fbi_code_no = T3.fbi_code_no GROUP BY T3.title ORDER BY T1.population ASC, T3.fbi_code_no DESC LIMIT 1 |
How many Jewish legislators do not have facebook? | SELECT COUNT(T3.bioguide_id) FROM ( SELECT T1.bioguide_id FROM current AS T1 INNER JOIN `social-media` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.facebook IS NULL GROUP BY T1.bioguide_id ) T3 |
Who is the youngest male? | SELECT name FROM Person WHERE gender = 'male' AND age = ( SELECT min ( age ) FROM person WHERE gender = 'male' ) |
Name the successor for election was successfully contested july 30, 1861 | SELECT successor FROM table_2417330_4 WHERE reason_for_change = "Election was successfully contested July 30, 1861" |
what game was on may 29 | SELECT result FROM table_name_5 WHERE date = "may 29" |
Which artist has id "16"? Provide her or his tag genre. | SELECT T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.id = 16 |
What was the time for the match with Cena? | SELECT time FROM table_18438494_3 WHERE wrestler = "Cena" |
Find the max and min grade point for all letter grade? | SELECT max ( gradepoint ) , min ( gradepoint ) FROM GRADECONVERSION |
What rank is aliyya qadi with less than 1421 votes? | SELECT MIN(rank) FROM table_name_73 WHERE candidate_name = "aliyya qadi" AND votes < 1421 |
How many wins for team nsu and over 2 points? | SELECT AVG(wins) FROM table_name_54 WHERE team = "nsu" AND points > 2 |
What is the population for the area that has a Hanzi of 延寿县? | SELECT population__2010_11_01_ FROM table_name_30 WHERE hanzi = "延寿县" |
When did Shakespeare create his work that has 154 scenes? | SELECT T1.Date, T1.id FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Scene = 154 |
What is the millisecond cycle for the Fieldbus? | SELECT sub_millisecond_cycle FROM table_name_28 WHERE "fieldbus" = "fieldbus" |
What red list is in the artiodactyla order and the cervidae family with a Species Authority of odocoileus virginianus zimmermann, 1780? | SELECT red_list FROM table_name_22 WHERE order = "artiodactyla" AND family = "cervidae" AND species_authority = "odocoileus virginianus zimmermann, 1780" |
what is the name of the branding where the virtual is 13.1 | SELECT branding FROM table_1979203_1 WHERE _virtual_ = "13.1" |
Which free app has the most Negative comments? | SELECT T1.App FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Type = 'Free' AND T2.Sentiment = 'Negative' GROUP BY T1.App ORDER BY COUNT(T2.Sentiment) DESC LIMIT 1 |
how many employees earn above the average salary? | SELECT count ( * ) FROM Employee WHERE salary > ( SELECT avg ( salary ) FROM Employee ) |
What is the highest Market Value (billion $), when Rank is 02 2, and when Sales (billion $) is greater than 113.1? | SELECT MAX(market_value__billion_) AS $_ FROM table_name_99 WHERE rank = "02 2" AND sales__billion_$_ > 113.1 |
What are the valid from and valid to dates for the card with the number 4560596484842? | SELECT date_valid_from , date_valid_to FROM Customers_cards WHERE card_number = "4560596484842" |
Name the greatest competition finish with average more than 32.9 and number of dances more than 16 | SELECT MAX(competition_finish) FROM table_name_4 WHERE average > 32.9 AND number_of_dances > 16 |
Give the object number of the sample which has the relationship of "lying on" with object sample no.1 from image no.2345524. | SELECT T2.OBJ1_SAMPLE_ID FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.IMG_ID = 2345524 AND T1.PRED_CLASS = 'lying on' AND T2.OBJ2_SAMPLE_ID = 1 |
How many airports' names have the word Interanation in them? | SELECT count(*) FROM airports WHERE name LIKE '%International%' |
What campus has the most degrees conferrred over its entire existence? | SELECT campus FROM degrees GROUP BY campus ORDER BY sum(degrees) DESC LIMIT 1 |
how many people are there whose weight is higher than 85 for each gender? | SELECT count(*) , sex FROM people WHERE weight > 85 GROUP BY sex |
In the 2008/2009 season one team had 47 tries against, how many games did they win that year? | SELECT won FROM table_13399573_4 WHERE tries_against = "47" |
Which award show nominated Cole Sprouse for the Favorite TV Actor category? | SELECT award FROM table_name_49 WHERE category = "favorite tv actor" AND recipient = "cole sprouse" |
What is the name of Team 2 with a Team 1 of Al Qadsia? | SELECT team_2 FROM table_name_4 WHERE team_1 = "al qadsia" |
Great! Can you update this list to show the chromosome associated with each enzyme on this list? | SELECT DISTINCT T1.name , T1.location , T1.product, T1.chromosome FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.enzyme_id = T1.id WHERE T2.interaction_type = 'inhibitor' |
What is the average number of laps with 16 grids? | SELECT AVG(laps) FROM table_name_54 WHERE grid = 16 |
What college is pick number 268 from? | SELECT college FROM table_name_44 WHERE pick__number = "268" |
What is the date of the game that ended with a score of 96-89? | SELECT date FROM table_name_92 WHERE score = "96-89" |
Which team had fewer than 167 points in the 250cc class? | SELECT team FROM table_name_72 WHERE points < 167 AND class = "250cc" |
Which Name has an Intra-molecular structure of no, and a Link of webserver, and a Comparative of no? | SELECT name FROM table_name_63 WHERE intra_molecular_structure = "no" AND link = "webserver" AND comparative = "no" |
Which Days of the week has a Time of broadcast in january–february, june 2002? | SELECT days_of_the_week FROM table_name_31 WHERE time_of_broadcast = "january–february, june 2002" |
What is the Country of origin for the film directed by George Miller? | SELECT country FROM table_name_3 WHERE director = "george miller" |
What are the products that people who were born after 2005 complain about? | SELECT DISTINCT T2.Product FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.year > 2005 |
What is the location of business number 1? | SELECT T1.AddressLine1 FROM Address AS T1 INNER JOIN BusinessEntityAddress AS T2 USING (AddressID) WHERE T2.BusinessEntityID = 1 |
What place did the person who left on day 3 finish in? | SELECT finished FROM table_name_54 WHERE exited = "day 3" |
What are the last names of the author of the paper titled "Binders Unbound"? | SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = "Binders Unbound" |
What is the name/designation for the under development status? | SELECT name_designation FROM table_name_79 WHERE status = "under development" |
what is the places when for the soviet union with a rank more than 11? | SELECT SUM(places) FROM table_name_38 WHERE nation = "soviet union" AND rank > 11 |
What is the English title of 餓狼伝説バトルアーカイブズ2? | SELECT english_title FROM table_name_95 WHERE japanese_title = "餓狼伝説バトルアーカイブズ2" |
Find the first and last names of all the female (sex is F) students who have president votes. | SELECT DISTINCT T1.Fname , T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.President_VOTE WHERE T1.sex = "F" |
Find the major and age of students who do not have a cat pet. | SELECT major , age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat') |
How many people attended the game on january 10 with a Score of 3 – 2? | SELECT COUNT(attendance) FROM table_name_96 WHERE score = "3 – 2" AND date = "january 10" |
Which gymnast had a balance beam larger than 8.687, had a total less than 38.049, had a floor exercise less than 9.462, and a vault less than 9.275? | SELECT gymnast FROM table_name_91 WHERE balance_beam > 8.687 AND total < 38.049 AND floor_exercise < 9.462 AND vault < 9.275 |
Name the incumbent for alabama 6 | SELECT incumbent FROM table_19753079_4 WHERE district = "Alabama 6" |
How many gallery type attractions are there? | Can you give more info about this ? | How many attractions belong to gallery type? | SELECT count ( * ) FROM Ref_Attraction_Types AS T1 JOIN Tourist_Attractions AS T2 ON T1.Attraction_Type_Code = T2.Attraction_Type_Code where Attraction_Type_Description = "gallery" |
Which Water has a Metal of contracting? | SELECT water FROM table_name_72 WHERE metal = "contracting" |
What is the essay title of the project that have the highest total price excluding optional support and who is the biggest donor? Identify the donor and calculate how many percent did he/she donated in the project. | SELECT T1.title, T3.donor_acctid, CAST(T3.donation_to_project AS REAL) / T2.total_price_excluding_optional_support FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN donations AS T3 ON T2.projectid = T3.projectid ORDER BY T3.donation_to_project DESC LIMIT 1 |
Can you show me the location and year opened for these tracks? | SELECT Location, Year_Opened FROM track WHERE track_id NOT IN ( SELECT track_id FROM race ) |
How many complaints have the client Diesel Galloway filed? | SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Diesel' AND T1.last = 'Galloway' |
Which episode number saw 1.312 million U.S. Wviewers? | SELECT no FROM table_29085880_1 WHERE us_viewers__million_ = "1.312" |
What is the weight of the bullet used in a Remington? | SELECT bullet_weight FROM table_16010376_1 WHERE source = "Remington" |
Show the number of accounts. | SELECT count(*) FROM Accounts |
What was the score in game 81? | SELECT score FROM table_17311797_10 WHERE game = 81 |
Which 1990-91 has an average number of 1.035? | SELECT 1990 AS _91 FROM table_name_34 WHERE average = 1.035 |
What was the race that featured stirling moss winning with a maserati at aintree? | SELECT race_name FROM table_name_45 WHERE constructor = "maserati" AND circuit = "aintree" AND winning_driver = "stirling moss" |
What horse was induced in 2011 with a sire of cowboy p-12? | SELECT name_of_horse FROM table_name_77 WHERE year_inducted = 2011 AND broodmare_sire = "cowboy p-12" |
what's the swimsuit where average is 8.670 | SELECT swimsuit FROM table_12094609_1 WHERE average = "8.670" |
And how many companies are there with this type? | SELECT count ( DISTINCT name ) FROM operate_company WHERE Type = 'Subsidiary' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.