sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
How many users have no followers in 2014? | SELECT COUNT(user_id) FROM Users WHERE user_yelping_since_year = 2004 AND user_fans LIKE 'None' |
What institution is located in Watertown, Wisconsin? | SELECT institution FROM table_1974443_1 WHERE location = "Watertown, Wisconsin" |
Which division is the Derbyshire Falcons in? | SELECT division FROM table_name_68 WHERE team = "derbyshire falcons" |
What is the aircraft name for the flight with number 99 | SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T1.flno = 99 |
What is highest place reached by artist Ray Adams? | SELECT MAX(position) FROM table_13805773_2 WHERE artist = "Ray Adams" |
What is the to par for japan | SELECT to_par FROM table_name_49 WHERE country = "japan" |
List the languages used in the USA. | SELECT Language FROM CountryLanguage WHERE CountryCode = 'USA' |
What are the cities with exactly two airports? | SELECT city FROM airports GROUP BY city HAVING count(*) = 2 |
Which professional did not operate any treatment on dogs? List the professional's id, role and email. | SELECT professional_id, role_code, email_address FROM Professionals EXCEPT SELECT T1.professional_id, T1.role_code, T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id |
show names of ships involved in a mission launched after 1928. | SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T1.Launched_Year > 1928 |
List the official full names of all the legislators that served 13 district for 26 consecutive years. | SELECT DISTINCT CASE WHEN SUM(CAST(strftime('%Y', T2.end) AS int) - CAST(strftime('%Y', T2.start) AS int)) = 26 THEN T1.official_full_name END FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide GROUP BY T1.official_full_name, T2.district HAVING COUNT(T1.official_full_name) = 13 |
How many total murders happened after 2011? | SELECT SUM(murder) FROM table_name_44 WHERE year > 2011 |
Which country has the least organization membership? | SELECT country FROM organization WHERE country IN ( SELECT Code FROM country ) GROUP BY country ORDER BY COUNT(NAME) LIMIT 1 |
What's the date in the United Kingdom having a catalog of reveal50cd/lp? | SELECT date FROM table_name_3 WHERE catalog = "reveal50cd/lp" AND region = "united kingdom" |
Name the project titles created by teacher who acquired a doctor degree. | SELECT T1.title FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.donation_message LIKE 'Donation on behalf of Matt Carpenter because I''m a strong believer in education.' |
Which To par is the lowest one that has a Year(s) won of 1962, 1967, 1972, 1980, and a Total larger than 149? | SELECT MIN(to_par) FROM table_name_90 WHERE year_s__won = "1962, 1967, 1972, 1980" AND total > 149 |
How many attendances have October 30, 1977 as the date, with a week greater than 7? | SELECT COUNT(attendance) FROM table_name_16 WHERE date = "october 30, 1977" AND week > 7 |
What Competition has an Event of 4x100 m relay and has the Time of 38.89? | SELECT competition FROM table_name_77 WHERE event = "4x100 m relay" AND time = "38.89" |
What is the average price for flights from Los Angeles to Honolulu. | SELECT avg(price) FROM Flight WHERE origin = "Los Angeles" AND destination = "Honolulu" |
let me know the name of the youngest captain | SELECT name FROM captain ORDER BY age LIMIT 1 |
What is the finishing position for the person who had a grid of 3? | SELECT fin_pos FROM table_name_44 WHERE grid = "3" |
What is total amount claimed summed across all the claims? | SELECT sum(Amount_Claimed) FROM Claims |
Which Wins has a Team of scuderia toro rosso, Poles of 0, and Races of 16? | SELECT wins FROM table_name_99 WHERE team = "scuderia toro rosso" AND poles = "0" AND races = "16" |
What was the placing when the jockey was Damien Oliver? | SELECT placing FROM table_24915874_1 WHERE jockey = "Damien Oliver" |
What is the maximum week that 69,372 people attended the game? | SELECT MAX(week) FROM table_name_13 WHERE attendance = "69,372" |
What was the publication year ranking l.a. is 1st? | SELECT year_of_publication FROM table_19948664_2 WHERE ranking_la__2_ = "1st" |
How many 2011 1H values have a 2006 of 27.4 and 2007 over 27.7? | SELECT COUNT(2011 AS _1h) FROM table_name_9 WHERE 2006 = 27.4 AND 2007 > 27.7 |
find the rank, company names, market values of the companies in the banking industry order by their sales and profits in billion. | SELECT rank , company , market_value FROM company WHERE main_industry = 'Banking' ORDER BY sales_billion , profits_billion |
What is the location shared by most counties? | SELECT LOCATION FROM county_public_safety GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1 |
What is the away team's score when north melbourne is the home team? | SELECT away_team AS score FROM table_name_28 WHERE home_team = "north melbourne" |
What is the screen size of the s45 (Australia only) Model with no bluetooth? | SELECT screen_size FROM table_name_8 WHERE bluetooth = "no" AND model = "s45 (australia only)" |
What are all the locations with a cinema? | SELECT DISTINCT LOCATION FROM cinema |
What country is jack nicklaus from? | SELECT country FROM table_name_75 WHERE player = "jack nicklaus" |
List the names of members in ascending alphabetical order. | SELECT Name FROM member ORDER BY Name ASC |
Who is performing in the back stage position for the song "Der Kapitan"? Show the first name and last name. | SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = "Der Kapitan" AND T1.StagePosition = "back" |
What is the frequency of the Classic Country Krki-fm booster station? | SELECT frequency FROM table_134987_3 WHERE format = "Classic Country KRKI-FM booster" |
what is the phone number for life insurance? | SELECT customer_phone FROM available_policies WHERE policy_type_code = "Life Insurance" |
Name the average silver with total less than 1 | SELECT AVG(silver) FROM table_name_5 WHERE total < 1 |
How many points did Nigel Connell have? | SELECT points FROM table_name_44 WHERE performer = "nigel connell" |
Of those films, which ones have the special features Deleted Scenes? | SELECT count ( * ) FROM category AS T1 JOIN film_category AS T2 ON T1.category_id = T2.category_id JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T1.name = "Foreign" and T3.special_features = "Deleted Scenes" |
In how many rounds was Race 17? | SELECT COUNT(round) FROM table_26334740_3 WHERE race = 17 |
What is the upstream with the price 65 chf? | SELECT upstream FROM table_name_1 WHERE price = "65 chf" |
Can you add the number of female faculty members for each of the ranks to the table please? | SELECT rank , sex , count ( * ) FROM Faculty GROUP BY rank , sex |
Find the names of all distinct wines that have appellations in North Coast area. | SELECT DISTINCT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = "North Coast" |
Of all the orders that have ordered Ikura, how many of them enjoys a unit price that's lower than its standard unit price? | SELECT COUNT(T2.OrderID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductName = 'Ikura' AND T2.UnitPrice < T1.UnitPrice |
What parties do they belong to? | SELECT party from representative where state in ( select state FROM representative GROUP BY State HAVING COUNT ( * ) > = 2 ) |
Find the max, average and min training hours of all players. | SELECT avg(HS) , max(HS) , min(HS) FROM Player |
Name the country that has ken doherty | SELECT country FROM table_26454128_7 WHERE athlete = "Ken Doherty" |
Which sign has a red border? | SELECT text_symbol FROM table_name_42 WHERE border = "red" |
Among the customers not subscribed to the mailing list, what percentage has given three or more stars in a review? | SELECT CAST(COUNT(CASE WHEN T2.StarRating > 3 THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T2.CustomerID) FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.SubscribedToEmailList = 'FALSE' |
Give me the first name and last name for all the female members of the club "Bootup Baltimore". | SELECT t3.fname , t3.lname 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 = "Bootup Baltimore" AND t3.sex = "F" |
Who was the winner in 2007? | SELECT winner FROM table_name_49 WHERE date = 2007 |
How many songs have a lead vocal? | SELECT count(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = "lead" |
Please list the businesses name with a rating less than 5 whose category name is men's clothing. | SELECT T2.business_id 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 WHERE T1.category_name LIKE 'Men''s Clothing' AND T3.stars < 5 |
what is the highest booked amount | SELECT max ( booked_amount ) FROM products_booked |
What is the Overall of the pick less than 20? | SELECT overall FROM table_name_16 WHERE pick__number < 20 |
What is the fewest amount of races in any season? | SELECT MIN(races) FROM table_25421463_1 |
Please list the titles of all the episodes in which Park Dietz was credited. | SELECT T1.title FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id INNER JOIN Person AS T3 ON T3.person_id = T2.person_id WHERE T2.credited = 'true' AND T3.name = 'Park Dietz' |
Please provide the names of any three away teams that competed in the Italian divisions. | SELECT T1.AwayTeam FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div=T2.division WHERE T2.country = 'Italy' LIMIT 3 |
How many students are enlisted in the Navy organization? | SELECT COUNT(name) FROM enlist WHERE organ = 'navy' |
What is the oldest log id and its corresponding problem id? | SELECT problem_log_id , problem_id FROM problem_log ORDER BY log_entry_date LIMIT 1 |
How many wins did team Kolles & Heinz union, with f/laps of 0, have in the Formula Three Euroseries? | SELECT wins FROM table_name_16 WHERE f_laps = "0" AND series = "formula three euroseries" AND team = "kolles & heinz union" |
Which other country has more than 2 ships? | SELECT Nationality FROM ship WHERE Nationality ! = 'United Kingdom' GROUP BY Nationality HAVING COUNT ( * ) > 2 |
How many stumpings did the player Tim Latham have? | SELECT MAX(stumpings) FROM table_13337302_16 WHERE player = "Tim Latham" |
show me the location of the tallest perpetrator. | SELECT T2.Location FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1 |
What is Segment D of 20-08 series Ep.? | SELECT segment_d FROM table_name_89 WHERE series_ep = "20-08" |
Name the opponent with a record of 60-61 | SELECT opponent FROM table_name_35 WHERE record = "60-61" |
Which titles has above average royalty rate? Give those title's name, type and price? | SELECT DISTINCT T1.title, T1.type, T1.price FROM titles AS T1 INNER JOIN roysched AS T2 ON T1.title_id = T2.title_id WHERE T2.royalty > ( SELECT CAST(SUM(royalty) AS REAL) / COUNT(title_id) FROM roysched ) |
Which team was Bubba Vanegdom from? | SELECT team FROM table_name_11 WHERE player = "bubba vanegdom" |
Show headquarters with at least two companies in the banking industry. | SELECT headquarters FROM company WHERE main_industry = 'Banking' GROUP BY headquarters HAVING count(*) >= 2 |
What is the name of the establishment with the highest number of low risk violations in 2014? | SELECT T2.name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE STRFTIME('%Y', T1.`date`) = '2014' AND T1.risk_category = 'Low Risk' GROUP BY T2.name ORDER BY COUNT(T2.business_id) DESC LIMIT 1 |
What was the title of the episode directed by David Mamet? | SELECT title FROM table_26200084_1 WHERE directed_by = "David Mamet" |
What are the medicine and trade names that cannot interact with the enzyme with the product 'Heme'? | SELECT name , trade_name FROM medicine EXCEPT SELECT T1.name , T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id JOIN enzyme AS T3 ON T3.id = T2.enzyme_id WHERE T3.product = 'Protoporphyrinogen IX' |
How many % of 1 Rep Max(Last Set) has a Set 4 of 145lb x 5reps? | SELECT _percentage_of_1_rep_max_last_set_ FROM table_name_28 WHERE set_4 = "145lb x 5reps" |
Please indicate the birthplace of the crew which name is Dan Castellaneta. | SELECT birth_place FROM Person WHERE name = 'Dan Castellaneta'; |
Please list the full names of the sanitarians who did at least one inspection in May, 2010. | SELECT DISTINCT T1.first_name, T1.last_name FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE strftime('%Y-%m', T2.inspection_date) = '2010-05' AND T1.title = 'Sanitarian' |
Who is the advisor for that major? | select advisor from student where major = ( SELECT Major FROM STUDENT GROUP BY major ORDER BY count ( * ) DESC LIMIT 1 ) |
I want the manner of departure for date of appointment being 12 october 2007 | SELECT manner_of_departure FROM table_name_87 WHERE date_of_appointment = "12 october 2007" |
What was the score of the away team at Junction Oval? | SELECT away_team AS score FROM table_name_77 WHERE venue = "junction oval" |
If the event was bantamweight (-63kg), and the quarterfinals did not advance, then who was in round of 32? | SELECT round_of_32 FROM table_26335424_86 WHERE quarterfinals = "Did not advance" AND event = "Bantamweight (-63kg)" |
What class of captain named Lieutenant Hugh Bolitho? | SELECT Class FROM captain WHERE name = 'Lieutenant Hugh Bolitho' |
Among the episodes which have star score less than 8, how many episodes were aired in 2009? | SELECT COUNT(DISTINCT T2.episode_id) FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE strftime('%Y', T1.air_date) = '2009' AND T2.stars < 8; |
What are the booking start and end dates of the apartments with more than 2 bedrooms? | SELECT T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2 |
Which version B-58 aircraft model originated in the United States has 2 in service? | SELECT aircraft FROM table_name_57 WHERE in_service = "2" AND origin = "united states" AND versions = "b-58" |
What years in orlando have the United States as the nationality, and montana as the school/club team? | SELECT years_in_orlando FROM table_name_16 WHERE nationality = "united states" AND school_club_team = "montana" |
When has Attendances of 45,795? | SELECT date FROM table_name_7 WHERE attendance = "45,795" |
what team's score is 101? | SELECT team FROM table_name_42 WHERE score = "101" |
Indicate the university's name with the highest ranking score in Teaching. | SELECT T1.university_name FROM university AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.university_id INNER JOIN ranking_criteria AS T3 ON T3.id = T2.ranking_criteria_id WHERE T3.criteria_name = 'Teaching' ORDER BY T2.score DESC LIMIT 1 |
What is the minimum amount for wool for 2001-02? | SELECT MIN(2001 AS _02) FROM table_1057262_1 WHERE commodity = "Wool" |
How long did it take for bike id 426 to reach 2nd at South Park from Market at 4th on 8/29/2013? Indicate the duration in minutes. | SELECT CAST(duration AS REAL) / 60 FROM trip WHERE bike_id = 426 AND end_station_name = '2nd at South Park' AND start_station_name = 'Market at 4th' AND start_date LIKE '8/29/2013%' AND end_date LIKE '8/29/2013%' |
Name the number of episodes for sam snape | SELECT COUNT(episode) FROM table_27208817_1 WHERE writer = "Sam Snape" |
What is the largest number lost with 0 draws and less than 12 points for Gwardia Katowice? | SELECT MAX(lost) FROM table_name_81 WHERE draw = 0 AND team = "gwardia katowice" AND points < 12 |
What is the number of matches played for the team with 0 draws and 33 points? | SELECT played FROM table_name_49 WHERE drawn = "0" AND points = "33" |
What is the status when the rank is 2? | SELECT status FROM table_29572583_19 WHERE rank = 2 |
How much is the average salary of female employees in comparison to male employees? | SELECT AVG(T2.Rate) FROM Employee AS T1 INNER JOIN EmployeePayHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.Gender = 'F' |
Can you tell me the Location that has the Mascot of lakers? | SELECT location FROM table_name_69 WHERE mascot = "lakers" |
What are the email addresses and date of births for all customers who have a first name of Carole? | SELECT email_address , date_of_birth FROM Customers WHERE first_name = "Carole" |
Who is from the College of Cincinnati? | SELECT name FROM table_name_38 WHERE college = "cincinnati" |
Among deaths 106 000 how many is crude rate. | SELECT crude_death_rate FROM table_21258_1 WHERE deaths = "106 000" |
How many organizations are founded in countries with a population of under 1000000? | SELECT COUNT(T2.Name) FROM country AS T1 INNER JOIN organization AS T2 ON T1.Code = T2.Country WHERE T1.Population < 1000000 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.