sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What are their emails? | SELECT email FROM employees |
Name the date of the uncaf nations cup 2009 | SELECT date FROM table_name_91 WHERE competition = "uncaf nations cup 2009" |
What are the names of the cities that all customers live in? | SELECT T1.City_Town FROM Addresses AS T1 JOIN Customers AS T2 ON T1.Address_ID = T2.Address_ID |
Which programs' origins are not "Beijing"? Give me the program names. | SELECT name FROM program WHERE origin != 'Beijing' |
Please list the releases that have been downloaded for more than 20000 times. | SELECT groupName FROM torrents WHERE totalSnatched > 20000 |
What's the total against when the draws are more than 0? | SELECT COUNT(against) FROM table_name_30 WHERE draws > 0 |
what is the united fc wehre pifa colaba is maratha united? | SELECT united_fc FROM table_28759261_5 WHERE pifa_colaba_fc_u_17 = "Maratha United" |
list all job ids | select distinct job_id from employees |
What are the first and last name of all biology professors? | SELECT T3.EMP_FNAME , T3.EMP_LNAME FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code JOIN employee AS T3 ON T1.EMP_NUM = T3.EMP_NUM WHERE DEPT_NAME = "Biology" |
Who led with the highest points during the game against Indiana? | SELECT high_points FROM table_23286158_9 WHERE team = "Indiana" |
Which person has zach been friends with the longest? | SELECT T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Zach' AND T2.year = ( SELECT max ( YEAR ) FROM PersonFriend WHERE name = 'Zach' ) |
Which SANSKRT has a JAPANESE of jayana? | SELECT sanskrt FROM table_name_38 WHERE japanese = "jayana" |
What are the last names of individuals who have been contact individuals for an organization? | SELECT DISTINCT t1.individual_last_name FROM individuals AS t1 JOIN organization_contact_individuals AS t2 ON t1.individual_id = t2.individual_id |
What is the id and name of the browser that is compatible with the most web accelerators? | SELECT T1.id , T1.name FROM browser AS T1 JOIN accelerator_compatible_browser AS T2 ON T1.id = T2.browser_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1 |
What is the number of countries with more than 2 car makers ? | select count(*) from countries as t1 join car_makers as t2 on t1.countryid = t2.country group by t1.countryid having count(*) > 2 |
Please calculate the average total price of shipped orders from German customers. | SELECT SUM(T3.quantityOrdered * T3.priceEach) / COUNT(T2.orderNumber) FROM customers AS T1 INNER JOIN orders AS T2 ON T1.customerNumber = T2.customerNumber INNER JOIN orderdetails AS T3 ON T2.orderNumber = T3.orderNumber WHERE T2.status = 'Shipped' AND T1.country = 'Germany' |
What are airlines that have some flight departing from airport 'AHD'? | SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "AHD" |
Who is the home team when the away team is newcastle united? | SELECT home_team FROM table_name_16 WHERE away_team = "newcastle united" |
Which episode has the largest number of votes? | SELECT episode FROM Episode WHERE votes = ( SELECT MAX(votes) FROM Episode ); |
What is Teleplay, when Director is "George McCowan", when Season is less than 1.1400000000000001, and when First Broadcast is April 3, 1981? | SELECT teleplay FROM table_name_24 WHERE director = "george mccowan" AND season < 1.1400000000000001 AND first_broadcast = "april 3, 1981" |
What time was achieved on Saturday 29th August by the rider who recorded 25' 01.89 90.438mph on Friday 28th August? | SELECT sat_29_aug FROM table_23465864_4 WHERE fri_28_aug = "25' 01.89 90.438mph" |
Which kickoff has the opponent at new orleans saints? | SELECT kickoff_[a_] FROM table_11449590_2 WHERE opponent = "at New Orleans Saints" |
Among respondents who participated in the survey in 2016, what percentage had a mental health disorder in the past? | SELECT CAST(SUM(CASE WHEN T1.AnswerText LIKE 'Yes' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.SurveyID) FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T1.QuestionID = 32 AND T1.SurveyID = 2016 |
what is the mascot of st. paul's school? | SELECT mascot FROM table_2439728_1 WHERE school = "St. Paul's school" |
I want the lowest Grid for Rolf Stommelen | SELECT MIN(grid) FROM table_name_48 WHERE driver = "rolf stommelen" |
How many papers have "Atsushi Ohori" published? | SELECT count(*) FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = "Atsushi" AND t1.lname = "Ohori" |
What is the Away Competition on the 6th? | SELECT competition FROM table_name_81 WHERE venue = "away" AND date = "6th" |
What are the names of all games played by Linda Smith? | SELECT Gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid JOIN Student AS T3 ON T3.Stuid = T1.Stuid WHERE T3.Lname = "Smith" AND T3.Fname = "Linda" |
When middle assyrian empire is the ubaid period in mesopotamia what is the copper age? | SELECT copper_age FROM table_23537091_1 WHERE ubaid_period_in_mesopotamia = "Middle Assyrian Empire" |
what is the rounds when the entrant is scuderia ferrari marlboro? | SELECT rounds FROM table_name_57 WHERE entrant = "scuderia ferrari marlboro" |
Please list the indicator names of Arab World whose values are higher than 50 in 1960. | SELECT IndicatorName FROM Indicators WHERE CountryName = 'Arab World' AND Year = 1960 AND Value > 50 |
Name the number of families for uk30 | SELECT COUNT(family_families) FROM table_19897294_8 WHERE no_overall = "UK30" |
At 1:48.16 what was the number of track time? | SELECT COUNT(track) FROM table_16689920_1 WHERE time = "1:48.16" |
What is the Chipset based on with a Digital/analog signal of analog, with an Available interface of agp, with Retail name with all-in-wonder 9800? | SELECT chipset_based_on FROM table_name_18 WHERE digital_analog_signal = "analog" AND available_interface = "agp" AND retail_name = "all-in-wonder 9800" |
Name the score for home of green bay packers | SELECT score FROM table_name_37 WHERE home = "green bay packers" |
What are the names of the contestants whose names are not 'Jessie Alloway' | SELECT contestant_name FROM contestants WHERE contestant_name != 'Jessie Alloway' |
I want the highest Grid for Toyota and jarno trulli | SELECT MAX(grid) FROM table_name_95 WHERE constructor = "toyota" AND driver = "jarno trulli" |
Give the full name of driver who transported the items on 3/2/2016. | SELECT T2.first_name, T2.last_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T1.ship_date = '2016-03-02' |
What is the D 43 when D 46 is R 6? | SELECT d_43 FROM table_name_68 WHERE d_46 = "r 6" |
Find the SSN and name of scientists who are assigned to the project with the longest hours. | SELECT T3.ssn , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects) |
What is the number of final position-tours Mariano Piccoli, who has more than 20 final position-giros, before 1999 has? | SELECT COUNT(final_position___tour) FROM table_name_95 WHERE final_position___giro > 20 AND rider = "mariano piccoli" AND year < 1999 |
Hello, can you please tell me the most weeks spent on top? | SELECT max ( Weeks_on_Top ) FROM volume |
what is the ID for electoral code? | which columns return? | What is the master id please. | SELECT master_customer_id FROM cmi_cross_references WHERE source_system_code = 'Electoral' |
How many time is the population density (per km²) is 2.5? | SELECT COUNT(localities) FROM table_26007767_1 WHERE population_density__per_km²_ = "2.5" |
What is the difference related to 2 losses and fewer than 10 points? | SELECT points_difference FROM table_name_51 WHERE lost = 2 AND points < 10 |
What is the attribute value of an inactive business with a medium review count and 3.5 stars which is located at Phoenix, AZ? | SELECT T2.attribute_value FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.business_id INNER JOIN Attributes AS T3 ON T2.attribute_id = T3.attribute_id WHERE T1.state LIKE 'AZ' AND T1.review_count LIKE 'Medium' AND T1.active LIKE 'FALSE' AND T1.city LIKE 'Phoenix' AND T1.stars = 3.5 |
When the driver peter gethin has a grid less than 25, what is the average number of laps? | SELECT AVG(laps) FROM table_name_4 WHERE driver = "peter gethin" AND grid < 25 |
When 4744 is the avg. trips per mile (x1000) what is the current stock? | SELECT current_stock FROM table_17839_1 WHERE avg_trips_per_mile__×1000_ = 4744 |
Please list all the territories in the Eastern Region. | SELECT DISTINCT T1.TerritoryDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Eastern' |
Which Terminus is on line 10? | SELECT terminus FROM table_name_1 WHERE line = "line 10" |
Who won the bronze when jin kanno won the gold? | SELECT bronze FROM table_name_99 WHERE gold = "jin kanno" |
Show the game name that has most number of hours played. | SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid ORDER BY sum ( hours_played ) DESC LIMIT 1 |
Who's the owner of Thai PBS? | SELECT owner FROM table_name_28 WHERE name = "thai pbs" |
What is the title of the prerequisite class of International Finance course? | SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'International Finance') |
Show all main industry for all companies. | SELECT DISTINCT main_industry FROM company |
List the names of all distinct wines in alphabetical order. | SELECT DISTINCT Name FROM WINE ORDER BY Name |
What is the Name of the Space Telescope Terminated on March 1993? | SELECT name FROM table_name_31 WHERE terminated = "march 1993" |
Who are the members of the club named "Hopkins Student Enterprises"? Show the last name. | SELECT 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 = "Hopkins Student Enterprises" |
Show the names of conductors and the orchestras they have conducted. | SELECT T1.Name, T2.Orchestra FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID |
What is the biggest amount of reviews a salable product gets? | SELECT T1.Comments FROM ProductReview AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T2.FinishedGoodsFlag = 1 GROUP BY T1.Comments ORDER BY COUNT(T1.ProductReviewID) DESC LIMIT 1 |
List the dates and vote percents of elections. | SELECT Date , Vote_Percent FROM election |
Thanks! Lastly, (I am about to run out of time) can you filter that list to show me which year had the most degrees conferred? | SELECT YEAR FROM degrees GROUP BY YEAR ORDER BY sum ( degrees ) DESC LIMIT 1 |
What are the names of perpetrators in country "China" or "Japan"? | SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Country = "China" OR T2.Country = "Japan" |
Give the time stamp for event No.887711. | SELECT timestamp FROM events WHERE event_id = '887711' |
What is the leowest number of Bronze medals for Jamaica who ranked less than 4 and had more than 0 silver medals and a total of less than 22 medals? | SELECT MIN(bronze) FROM table_name_75 WHERE silver > 0 AND rank < 4 AND nation = "jamaica" AND total < 22 |
Provide a list of titles together with its publisher name for all publishers located in the USA. | SELECT T1.title, T2.pub_name FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T2.country = 'USA' |
what's the minimum total with crop (kilotonnes) being s lupin | SELECT MIN(total) FROM table_1057262_2 WHERE crop__kilotonnes_ = "s Lupin" |
How many paragraphs in total? | SELECT count(*) FROM Paragraphs |
What is the First Publisher prior to 1999? | SELECT first_publisher FROM table_name_31 WHERE year < 1999 |
How many customers have an active value of 1? | SELECT count(*) FROM customer WHERE active = '1' |
What are the ships that are steered by a captain with Lieutenant rank? | SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Lieutenant' |
What country is Pick 100? | SELECT nationality FROM table_name_97 WHERE pick = 100 |
What year(s) was axis & allies: d-day released? | SELECT release FROM table_173475_1 WHERE title = "Axis & Allies: D-Day" |
Return the weight of the shortest person. | SELECT Weight FROM people ORDER BY Height ASC LIMIT 1 |
On which platform was Panzer Tactics released in 2007? | SELECT T5.platform_name FROM game_publisher AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN game AS T3 ON T1.game_id = T3.id INNER JOIN game_platform AS T4 ON T1.id = T4.game_publisher_id INNER JOIN platform AS T5 ON T4.platform_id = T5.id WHERE T3.game_name = 'Panzer Tactics' AND T4.release_year = 2007 |
Please list the genre of the movies that are the newest and is in English. | SELECT T2.genre FROM movies AS T1 INNER JOIN movies2directors AS T2 ON T1.movieid = T2.movieid WHERE T1.year = 4 AND T1.isEnglish = 'T' |
What year shows 4 points? | SELECT year FROM table_name_65 WHERE points = 4 |
what is the ranking for 2010 production of 2,903,000? | SELECT rank FROM table_name_52 WHERE 2010 = "2,903,000" |
When and in what zip code did max temperature reach 80? | SELECT date , zip_code FROM weather WHERE max_temperature_f >= 80 |
which pilot is in charge of the most number of flights? | SELECT pilot FROM flight GROUP BY pilot ORDER BY count(*) DESC LIMIT 1 |
Show the average share count of transactions each each investor, ordered by average share count. | SELECT investor_id , avg(share_count) FROM TRANSACTIONS GROUP BY investor_id ORDER BY avg(share_count) |
Find the name of tracks which are in Movies playlist but not in music playlist. | SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' EXCEPT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music' |
What are the distinct last names of the students who have class president votes? | SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_President_VOTE |
Name the number in series for production code being 204 | SELECT no_in_series FROM table_25810656_3 WHERE production_code = 204 |
Who was the defensive award winner in February when the rookie award was given to Rhys Duch? | SELECT defensive FROM table_14132239_3 WHERE month = "February" AND rookie = "Rhys Duch" |
Show all ministers and parties they belong to in descending order of the time they took office. | SELECT minister, party_name FROM party ORDER BY took_office DESC |
can you show me a list of last name that starting with 'J'? | SELECT LastName FROM list WHERE LastName LIKE "J%" |
What is the result of week 5? | SELECT result FROM table_name_33 WHERE week = 5 |
In the history of team id NJD, which goalie saved the most goal attempts? Give his full name. | SELECT T1.firstName, T1.lastName FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T2.tmID = 'NJD' GROUP BY T2.playerID ORDER BY SUM(T2.SA - T2.GA) DESC LIMIT 1 |
Find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance. | SELECT T1.name, T3.balance + T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance < T2.balance |
Which movie has the highest average rating? | The title of the movie that has the highest average rating is Snow White | What is it's rating? | SELECT avg ( T1.stars ) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY avg ( T1.stars ) DESC LIMIT 1 |
Show all transaction types. | SELECT DISTINCT transaction_type FROM Financial_Transactions |
When was the first movie released? | SELECT MIN(release_date) FROM movie WHERE movie_status = 'Released' |
Please list all the cities from where tweets with neutral sentiments were posted. | SELECT DISTINCT T2.City FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE Sentiment = 0 |
How many journals do not have a website? | SELECT COUNT(HomePage) FROM Journal WHERE HomePage = '' |
When the allergy starts for Angelo Buckridge. | SELECT T2.START FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Adolfo' AND T1.last = 'Schmitt' AND T2.STOP IS NOT NULL |
List the id, color scheme, and name for all the photos. | SELECT id , color , name FROM photos |
How many authors are affiliated with NASA Langley Research Center? | SELECT COUNT(Name) FROM Author WHERE Affiliation = 'NASA Langley Research Center' |
What's the winning party in the Pennsylvania 6 district? | SELECT party FROM table_1341604_39 WHERE district = "Pennsylvania 6" |
What is the name of organization that has the greatest number of contact individuals? | SELECT t1.organization_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id GROUP BY t1.organization_name ORDER BY count(*) DESC LIMIT 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.