sentence
stringlengths
3
347
sql
stringlengths
18
804
what investors were involved with those transactions that were under 3000?
SELECT T2.investor_id FROM SALES AS T1 JOIN TRANSACTIONS AS T2 ON T1.sales_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction < 3000
What is the lowest year that has edmonton, canada as the venue with a weight class (kg) greater than 100?
SELECT MIN(year) FROM table_name_11 WHERE venue = "edmonton, canada" AND weight_class__kg_ > 100
What was the theme for the final showdown (week 3)?
SELECT theme FROM table_name_93 WHERE week = "final showdown (week 3)"
What is the high rebounds of game 68?
SELECT high_rebounds FROM table_name_46 WHERE game = 68
For all the employees that have left the Engineering Department, what is the average time of their stay?
SELECT CAST(SUM(365 * (STRFTIME('%Y', T1.EndDate) - STRFTIME('%Y', T1.StartDate)) + 30 * (STRFTIME('%m', T1.EndDate) - STRFTIME('%m', T1.StartDate)) + STRFTIME('%d', T1.EndDate) - STRFTIME('%d', T1.StartDate)) AS REAL) / COUNT(T1.BusinessEntityID) FROM EmployeeDepartmentHistory AS T1 INNER JOIN Department AS T2 ON T1.DepartmentID = T2.DepartmentID WHERE T2.Name = 'Engineering' AND T1.EndDate IS NOT NULL
What is the date problem reported of w?
SELECT T2.date_problem_reported FROM problems AS T1 JOIN Problems AS T2 WHERE T2.problem_description = "w"
What is the name and age of the youngest winning pilot...
SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot ORDER BY t1.age LIMIT 1
Which club was originally named the newcastle falcons?
SELECT original_club FROM table_26218124_1 WHERE name = "Newcastle Falcons"
Can you show me the names and total checking and savings account balances?
SELECT T1.name , T2.balance + T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid
What is the name of the company that produced the game titled Adventure Time: Explore the Dungeon Because I Don't Know!?
SELECT T3.publisher_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id WHERE T1.game_name = 'Adventure Time: Explore the Dungeon Because I Don''t Know!'
What is the lowest figure score when the free is 556?
SELECT MIN(figures) FROM table_name_24 WHERE free = 556
What is the 2009 result when 2011 is 1R and 2007 is A?
SELECT 2009 FROM table_name_84 WHERE 2011 = "1r" AND 2007 = "a"
how many points did the argentinos juniors team score during the 1986-87 season?
SELECT 1986 AS _87 FROM table_14489821_1 WHERE team = "Argentinos Juniors"
What is the Week number on October 10, 1976?
SELECT COUNT(week) FROM table_name_17 WHERE date = "october 10, 1976"
what's the software executable space protection with dbeingtribution being gentoo
SELECT software_executable_space_protection FROM table_1357052_6 WHERE distribution = "Gentoo"
In 1990, how many players whose teams had the winning rate of more than 75%?
SELECT COUNT(DISTINCT T1.playerID) FROM players_teams AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE CAST(T2.won AS REAL) * 100 / CAST(T2.games AS REAL) > 75 AND T1.year = 1990
For each county, find the name of the county and the number of delegates from that county.
SELECT T1.County_name , COUNT(*) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id
How many different kickoffs happened when the opponent was the Scottish Claymores
SELECT COUNT(kickoff) FROM table_26275503_2 WHERE opponent = "Scottish Claymores"
What is the average speed of roller coasters?
SELECT avg(Speed) FROM roller_coaster
What are the total number of students who are living in a male dorm?
SELECT count(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.gender = 'M'
What are their opening hours?
SELECT Name,opening_hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = "shuttle"
What is the Wins of the Top-25 of 1 and 7 Events?
SELECT wins FROM table_name_66 WHERE top_25 = 1 AND events = 7
ratio of 16:13 has how many highest size (steps)?
SELECT MAX(size__steps_) FROM table_name_38 WHERE just_ratio = "16:13"
How many orders shipped via ship have a medium priority?
SELECT COUNT(T1.o_orderkey) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T2.l_shipmode = 'SHIP' AND T1.o_orderpriority = '3-MEDIUM'
What is the most common publication date?
SELECT Publication_Date FROM publication GROUP BY Publication_Date ORDER BY COUNT ( * ) DESC LIMIT 1
What is Status, when Opposing Teams is "Scotland"?
SELECT status FROM table_name_16 WHERE opposing_teams = "scotland"
Tell me the ethnic group for jewish of 0.47%
SELECT ethnic_group FROM table_name_77 WHERE jewish = "0.47%"
What is is the number of patients who are not using Procrastin-X?
SELECT count ( * ) FROM patient WHERE SSN NOT IN ( SELECT T1.patient FROM Prescribes AS T1 JOIN Medication AS T2 ON T1.Medication = T2.Code WHERE T2.name = 'Procrastin-X' )
How many items in inventory does store 1 have?
SELECT count(*) FROM inventory WHERE store_id = 1
What did the home team score when they played the away team of Geelong?
SELECT home_team AS score FROM table_name_10 WHERE away_team = "geelong"
how many customers have 7 or more orders
SELECT count ( * ) FROM ( SELECT * FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id having count ( * ) > = 7 )
Which date has an Opponent of angels, and a Loss of sanderson (0–1)?
SELECT date FROM table_name_95 WHERE opponent = "angels" AND loss = "sanderson (0–1)"
When did the Cowboys score 13 points in 1966?
SELECT date FROM table_22801165_1 WHERE cowboys_points = 13
Which of the opponents has a record of 17-25?
SELECT opponent FROM table_name_52 WHERE record = "17-25"
The 20th Century Fox film directed by Joel Schumacher grossed how much?
SELECT gross FROM table_name_74 WHERE studio = "20th century fox" AND director_s_ = "joel schumacher"
Which 2008 has a Career Win-Loss of 25–40?
SELECT 2008 FROM table_name_54 WHERE career_win_loss = "25–40"
Show the race class and number of races in each class.
SELECT CLASS , count(*) FROM race GROUP BY CLASS
How many authors are there?
SELECT COUNT(*) FROM authors
How many reviews does "Planet Money" have?
SELECT COUNT(T2.podcast_id) FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.title = 'Planet Money'
What are their names? | The table shows the first and last names of the employees who report to Nancy Edward. | Who does not report to Nancy Edwards?
SELECT T2.first_name , T2.last_name FROM employees AS T1 JOIN employees AS T2 ON T1.id = T2.reports_to WHERE T1.first_name ! = "Nancy" AND T1.last_name ! = "Edwards"
What was the date for game 13?
SELECT date FROM table_name_14 WHERE game = "13"
Name the most expensive ordered? Who, when was it ordered?
SELECT T2.OrderNumber, T1.`Customer Names`, T2.OrderDate FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID INNER JOIN Products AS T3 ON T3.ProductID = T2._ProductID ORDER BY T2.`Unit Cost` DESC LIMIT 1
Which Driver has Laps larger than 78, and a Time/Retired of + 1:09.4?
SELECT driver FROM table_name_99 WHERE laps > 78 AND time_retired = "+ 1:09.4"
Show the full Comment of the method "DE2_UE_Fahrradkurier.de2_uebung_fahrradkurierDataSet1TableAdapters.TableAdapterManager.UpdateInsertedRows".
SELECT FullComment FROM Method WHERE Name = 'DE2_UE_Fahrradkurier.de2_uebung_fahrradkurierDataSet1TableAdapters.TableAdapterManager.UpdateInsertedRows'
For the sanitarian who lives on 5000 N Wolcott Ave, how many establishments did he/she inspect in the May of 2011?
SELECT COUNT(T1.inspection_id) FROM inspection AS T1 INNER JOIN employee AS T2 ON T1.employee_id = T2.employee_id WHERE T2.address = '5000 N Wolcott Ave' AND T2.title = 'Sanitarian' AND strftime('%Y-%m', T1.inspection_date) = '2011-05'
What is the percentage of male clients complaining about their credit cards?
SELECT CAST(SUM(CASE WHEN T1.sex = 'Male' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.Product = 'Credit card'
Who is the captain of Cardiff City?
SELECT team AS captain FROM table_26593762_2 WHERE team = "Cardiff City"
What are the names of the other tourist?
SELECT Tourist_Details FROM Visitors WHERE Tourist_Details ! = "Vivian" and Tourist_Details! = "Vincent"
What are the tags of the top 5 least downloaded live albums?
SELECT T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.releaseType = 'album' ORDER BY T1.totalSnatched LIMIT 5
Who is every Under-15 if Under-11 is Reeham Sedky?
SELECT under_15 FROM table_26368963_2 WHERE under_11 = "Reeham Sedky"
What are the ids and texts of paragraphs in the document titled 'Welcome to NY'?
SELECT T1.paragraph_id , T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.Document_Name = 'Welcome to NY'
What is Tiger woods's born state
SELECT born_state FROM head where name = "Tiger Woods"
What are the names of the people who are in the affirmative side?
SELECT T3.Name FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Affirmative = T3.People_ID
what is the goals for when the club is new england revolution?
SELECT goals_for FROM table_1246208_5 WHERE club = "New England Revolution"
What is the notes when the displacement is 220cid (3,604cc)?
SELECT notes FROM table_name_78 WHERE displacement = "220cid (3,604cc)"
How many kinds of items are returned in order no.5?
SELECT COUNT(l_linenumber) FROM lineitem WHERE l_orderkey = 5 AND l_returnflag = 'R'
List the names of mountains that do not have any climber.
SELECT Name FROM mountain WHERE NOT Mountain_ID IN (SELECT Mountain_ID FROM climber)
What is the name and email of the staff in store ID 2?
SELECT first_name, last_name, email FROM staff WHERE store_id = 2
Return the total and minimum enrollments across all schools.
SELECT sum(enrollment) , min(enrollment) FROM university
Name the year that Birds of a feather category for most popular actress was nominated
SELECT AVG(year) FROM table_name_57 WHERE category = "most popular actress" AND nominated_for = "birds of a feather"
Hi can you tell me in witch city does Alice live?
select city from person where name = "Alice"
who is Bob's friend?
SELECT friend FROM PersonFriend where name = 'Bob'
Please list any 3 product numbers with the lowest standard cost.
SELECT ProductID FROM ProductCostHistory ORDER BY StandardCost ASC LIMIT 3
What is the 1991 population for the urban settlement named Bački Jarak?
SELECT population__1991_ FROM table_2562572_2 WHERE urban_settlement = "Bački Jarak"
How many book clubs are there?
SELECT count(*) FROM book_club
How many users are there?
SELECT count(*) FROM user_profiles
What is Points, when Points For is "points for"?
SELECT points FROM table_name_71 WHERE points_for = "points for"
What is the smallest bronze with a Rank of 12, and a Silver smaller than 2?
SELECT MIN(bronze) FROM table_name_5 WHERE rank = 12 AND silver < 2
Show names for all employees who have certificates on both Boeing 737-800 and Airbus A340-300.
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" INTERSECT 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 = "Airbus A340-300"
Find the distinct names of all the songs that have a higher resolution than some songs in English, please?
SELECT DISTINCT song_name FROM song WHERE resolution > ( SELECT min ( resolution ) FROM song WHERE languages = "english" )
What is the worst score for the dance that has Apolo Anton Ohno as the best dancer, and where his best score is larger than 30?
SELECT SUM(worst_score) FROM table_name_23 WHERE best_dancer = "apolo anton ohno" AND best_score > 30
How many Januarys had records of 22-15-6?
SELECT COUNT(january) FROM table_name_14 WHERE record = "22-15-6"
What is the tournament with a hard surface and Ruben de Kleijn as the opponent?
SELECT tournament FROM table_name_64 WHERE surface = "hard" AND opponent = "ruben de kleijn"
What years played did the player with a rank under 10, more than 271 matches, and 152 goals have?
SELECT years FROM table_name_82 WHERE rank < 10 AND matches > 271 AND goals = 152
What date was Rica head of household?
SELECT date_given FROM table_name_35 WHERE head_of_household = "rica"
What are the lowest cuts made that have events less than 4?
SELECT MIN(cuts_made) FROM table_name_84 WHERE events < 4
The driver Jacky Ickx had what time/retired?
SELECT time_retired FROM table_name_64 WHERE driver = "jacky ickx"
What are the total number of students in each department?
SELECT count ( DISTINCT T2.id ) , T3.dept_name FROM department AS T1 JOIN student AS T2 ON T1.dept_name = T2.dept_name JOIN instructor AS T3 ON T1.dept_name = T3.dept_name GROUP BY T3.dept_name
Show all the activity names and the number of faculty involved in each activity.
SELECT T1.activity_name , count(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID
How many people over the age of 50 do not have HTC One M8 Eye phones?
SELECT COUNT(T1.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.age > 50 AND T2.device_model != 'One M8 Eye' AND T2.phone_brand != 'HTC'
Which is located in Angola and entered service in 1988?
SELECT name FROM table_name_98 WHERE location = "angola" AND entered_service = "1988"
What is the average distance and average price for flights from Los Angeles.
SELECT avg(distance) , avg(price) FROM Flight WHERE origin = "Los Angeles"
What is the ID of actors that acted in the movies most viewed by audience with occupation 5?
SELECT T3.actorid FROM users AS T1 INNER JOIN u2base AS T2 ON T1.userid = T2.userid INNER JOIN movies2actors AS T3 ON T2.movieid = T3.movieid WHERE T1.occupation = 5 GROUP BY T2.movieid ORDER BY COUNT(T1.userid) DESC LIMIT 1
What is the value for Drawn, when the value for Losing bonus is 6?
SELECT drawn FROM table_name_12 WHERE losing_bonus = "6"
How many dates were played at the wachovia center?
SELECT COUNT(date) FROM table_23308178_6 WHERE location = "Wachovia Center"
Show the distinct apartment numbers of the apartments that have bookings with status code "Confirmed".
SELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Confirmed"
Which tournament has a 2013 of 1r, and a 2012 of 1r?
SELECT tournament FROM table_name_38 WHERE 2013 = "1r" AND 2012 = "1r"
What conditions had both prolonged bleeding times and prolonged partial thromboplastin times
SELECT condition FROM table_1099080_1 WHERE partial_thromboplastin_time = "Prolonged" AND bleeding_time = "Prolonged"
What team had a qual 2 time of 58.385?
SELECT team FROM table_name_92 WHERE qual_2 = "58.385"
What is the weight of the bullet used in a Weatherby?
SELECT bullet_weight FROM table_16010376_1 WHERE source = "Weatherby"
What is the home team for punt road oval?
SELECT home_team FROM table_name_38 WHERE venue = "punt road oval"
Give me the dates when the max temperature was higher than 85.
SELECT date FROM weather WHERE max_temperature_f > 85
How many holes does Player Vijay Singh have?
SELECT COUNT(hole) FROM table_name_61 WHERE player = "vijay singh"
Name the average with tally of 0-29 and total more than 29
SELECT AVG(average) FROM table_name_40 WHERE tally = "0-29" AND total > 29
Name the lowest against for when wins are greater than 14, draws is 0 and losses are 4
SELECT MIN(against) FROM table_name_3 WHERE losses = 4 AND draws = 0 AND wins > 14
Which claims caused more than 2 settlements or have the maximum claim value? List the date the claim was made and the claim id.
SELECT T1.Date_Claim_Made , T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.Claim_id HAVING count(*) > 2 UNION SELECT T1.Date_Claim_Made , T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id WHERE T1.Amount_Claimed = ( SELECT max(Amount_Claimed) FROM Claims )
What are the full names of employees who with in department 70 or 90?
SELECT first_name , last_name FROM employees WHERE department_id = 70 OR department_id = 90
Is the oldest device user male or female?
SELECT gender FROM gender_age WHERE age = ( SELECT MAX(age) FROM gender_age )
how many English professors there
SELECT count ( * ) from professor where DEPT_CODE = "ENG"
At which venue did the game on 28 october 2013 take place?
SELECT venue FROM table_name_5 WHERE date = "28 october 2013"