sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Which Position has a Name of john taft? | SELECT position FROM table_name_17 WHERE name = "john taft" |
On what date was it announced that an asset was acquired for US$9 Million? | SELECT date_announced FROM table_1373542_1 WHERE reported_cost = "US$9 million" |
Find the total claimed amount of all the claims. | SELECT sum(Amount_Claimed) FROM Claims |
How many Played that has Losses of 6, and Wins larger than 33? | SELECT AVG(played) FROM table_name_61 WHERE losses = 6 AND wins > 33 |
In which year did Around the Horn place the most orders? | SELECT STRFTIME('%Y', T2.OrderDate) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.CompanyName = 'Around the Horn' GROUP BY STRFTIME('%Y', T2.OrderDate) ORDER BY COUNT(T2.OrderID) DESC LIMIT 1 |
When 15 is the number in season what is the highest number in series? | SELECT MAX(no_in_series) FROM table_2468961_7 WHERE no_in_season = 15 |
How old is the average person for each job? | SELECT avg(age) , job FROM Person GROUP BY job |
What is the last name of the musician that has been at the back position the most? | SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE stageposition = "back" GROUP BY lastname ORDER BY count(*) DESC LIMIT 1 |
List the number of customers that did not have any payment history. | SELECT count(*) FROM Customers WHERE customer_id NOT IN ( SELECT customer_id FROM Customer_Payments ); |
What are the most wins with byes more than 0 and 1637 against? | SELECT MAX(wins) FROM table_name_99 WHERE against = 1637 AND byes > 0 |
Who tied for the highest rebounds during the game against Orlando? | SELECT high_rebounds FROM table_23248940_8 WHERE team = "Orlando" |
What is Score, when Attendance is 2,444? | SELECT score FROM table_name_33 WHERE attendance = "2,444" |
Count the number of trips that did not end in San Francisco city. | SELECT count(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id WHERE T2.city != "San Francisco" |
What is the highest 1995 with a 1990 less than 36, a 1987 less than 1987, and a 2007 value greater than 107? | SELECT MAX(1995) FROM table_name_4 WHERE 1990 > 36 AND 1987 < 1987 AND 2007 > 107 |
Is the Yelp business No. 14033 good for supper? | SELECT T1.attribute_value FROM Business_Attributes AS T1 INNER JOIN Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T2.attribute_name = 'good_for_dinner' AND T1.business_id = 14033 |
Who is moving to Triestina? | SELECT name FROM table_name_21 WHERE moving_to = "triestina" |
Barry University had the highest enrollment of what number? | SELECT MAX(enrollment) FROM table_1183842_1 WHERE institution = "Barry University" |
Name the number of region for 경상남도 | SELECT COUNT(region) FROM table_160510_5 WHERE hangul_chosongul = "경상남도" |
Hi, could you please let me know what is the average savings balance of all customers? | SELECT avg ( balance ) from savings |
For the movie "Reign of Fire", which department was Marcia Ross in? | SELECT T4.department_name FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id INNER JOIN department AS T4 ON T2.department_id = T4.department_id WHERE T3.person_name = 'Marcia Ross' AND T1.title = 'Reign of Fire' |
Find the name of customers who do not have an saving account. | SELECT cust_name FROM customer EXCEPT SELECT cust_name FROM customer WHERE acc_type = 'saving' |
What is the document type code with most number of documents? | SELECT document_type_code FROM Documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 1 |
How many verbs mean to bear | SELECT COUNT(part_4) FROM table_1745843_10 WHERE verb_meaning = "to bear" |
What is the percentage of countries in the Middle East and North Africa that have finished reporting on their real external debt? | SELECT CAST(SUM(CASE WHEN ExternalDebtReportingStatus = 'Actual' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(CountryCode) FROM Country WHERE region = 'Middle East & North Africa' |
Which Week 3 Sept 14 has a Week 6 Oct 5 of kansas (4-1)? | SELECT week_3_sept_14 FROM table_name_87 WHERE week_6_oct_5 = "kansas (4-1)" |
Tell me the employee id of the head of the department with the least employees. | SELECT head FROM department GROUP BY departmentID ORDER BY count(departmentID) LIMIT 1; |
What is the highest goals for less than 63 goals against, more than 65 points 1, and more than 10 losses? | SELECT MAX(goals_for) FROM table_name_97 WHERE goals_against < 63 AND points_1 > 65 AND lost > 10 |
List the hardware model name and company name for the phone whose screen mode type is "Graphics" | SELECT T2.Hardware_Model_name , T2.Company_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.Type = "Graphics"; |
List out the seasons that Niklas Eckerblom played. | SELECT DISTINCT T1.SEASON FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Niklas Eckerblom' |
How many crimes against society happened in the Wentworth district according to the FBI? | SELECT SUM(CASE WHEN T1.crime_against = 'Society' THEN 1 ELSE 0 END) FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T2.fbi_code_no = T1.fbi_code_no INNER JOIN District AS T3 ON T3.district_no = T2.district_no WHERE T3.district_name = 'Wentworth' |
Find the full name of the customer with the email "[email protected]". | SELECT FirstName , LastName FROM CUSTOMER WHERE Email = "[email protected]" |
What is the smallest sales area (m²) that has €4,094/m² and more than 2 stores? | SELECT MIN(sales_area__m²_) FROM table_name_20 WHERE sales_per_area = "€4,094/m²" AND no_of_stores > 2 |
Please give me the same information for the movies that have the 3 lowest rating stars. | SELECT T2.title , T2.year, T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID ORDER BY T1.stars LIMIT 3 |
What are all church names? | SELECT name from church |
What is the masculine u form for the old Swedish word with a neuter a form of skipum? | SELECT masculine_u_stems FROM table_name_68 WHERE neuter_a_stems = "skipum" |
List down the report number of crimes associated with the district commander named Jill M. Stevens. | SELECT SUM(CASE WHEN T1.commander = 'Jill M. Stevens' THEN 1 ELSE 0 END) FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no |
What is the district for carl vinson? | SELECT district FROM table_1341930_11 WHERE incumbent = "Carl Vinson" |
Show the average price range of hotels that have 5 star ratings and allow pets. | SELECT avg(price_range) FROM HOTELS WHERE star_rating_code = "5" AND pets_allowed_yn = 1 |
What are the names of parties and their respective regions? | SELECT T1.party_name , T2.region_name FROM party AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id |
Name the state for lake county | SELECT state FROM table_1762887_1 WHERE county = "Lake county" |
What was the largest attendance at the Telstra Dome, when the home team was the Western Bulldogs? | SELECT MAX(crowd) FROM table_name_30 WHERE ground = "telstra dome" AND home_team = "western bulldogs" |
For the game ending with a score of 28-43, what is the listed as the final record? | SELECT record FROM table_name_86 WHERE score = "28-43" |
What are the ranks of captains that are both in the Cutter and Armed schooner classes? | SELECT rank FROM captain WHERE CLASS = 'Cutter' INTERSECT SELECT rank FROM captain WHERE CLASS = 'Armed schooner' |
What country is each member from? | Did you mean show the name of member and the related Nationality? | yes | SELECT name ,Nationality from member |
Who is the elector that has the cardinalatial title of Deacon of SS. Cosma e Damiano? | SELECT elector FROM table_name_86 WHERE cardinalatial_title = "deacon of ss. cosma e damiano" |
What are the ids of all students along with how many sports and games did they play? | SELECT StuID , count(*) , sum(gamesplayed) FROM Sportsinfo GROUP BY StuID |
What was the donation optional support amount for the project 'Armenian Genocide'? | SELECT T2.donation_optional_support FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'Armenian Genocide' |
What is Player, when Score is "68-71=139"? | SELECT player FROM table_name_80 WHERE score = 68 - 71 = 139 |
What is the credit card number for the sales order "45793"? | SELECT T2.CardNumber FROM SalesOrderHeader AS T1 INNER JOIN CreditCard AS T2 ON T1.CreditCardID = T2.CreditCardID WHERE T1.SalesOrderID = 45793 |
Which city has frequency under 106.5MHz and a callsign of w218ck? | SELECT city_of_license FROM table_name_31 WHERE frequency_mhz < 106.5 AND call_sign = "w218ck" |
Who won on 2007-04-14 | SELECT result FROM table_name_66 WHERE date = "2007-04-14" |
List the name and residence for players whose occupation is not "Researcher". | SELECT Player_name , residence FROM player WHERE Occupation != "Researcher" |
What was the score when the tie no was 12? | SELECT score FROM table_name_72 WHERE tie_no = "12" |
Count branches opened before 2010 for each city | SELECT city , count ( * ) FROM branch WHERE open_year < 2010 GROUP BY city |
What are the names and descriptions of the photos taken at the tourist attraction "film festival"? | SELECT T1.Name , T1.Description FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = "film festival" |
What's Bulgaria's lane? | SELECT AVG(lane) FROM table_name_19 WHERE nationality = "bulgaria" |
On what week were there 26,243 in attendance on September 21, 1969? | SELECT COUNT(week) FROM table_name_51 WHERE date = "september 21, 1969" AND attendance < 26 OFFSET 243 |
Find the most popular room in the hotel. The most popular room is the room that had seen the largest number of reservations. | SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room ORDER BY count ( * ) DESC LIMIT 1 |
How much does number 26 weigh? | SELECT weight FROM table_name_31 WHERE number = "26" |
What is the number of different class sections offered in the course ACCT-211? | SELECT count(DISTINCT class_section) FROM CLASS WHERE crs_code = 'ACCT-211' |
What are the names of products produced by both Creative Labs and Sony? | SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Creative Labs' INTERSECT SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Sony' |
What is the surface of the score, 7–6 (7–3) , 6–3? | SELECT surface FROM table_name_40 WHERE score = "7–6 (7–3) , 6–3" |
What is the ordered list of customer ids? | SELECT customer_id , customer_name FROM customers ORDER BY customer_id ASC |
What's the national title of miss international ikumi yoshimatsu? | SELECT national_title FROM table_name_11 WHERE miss_international = "ikumi yoshimatsu" |
What date was the match against Morocco played? | SELECT date FROM table_18042031_16 WHERE against = "Morocco" |
What was Arkady Vyatchanin's time? | SELECT time FROM table_name_86 WHERE name = "arkady vyatchanin" |
what's the pole position with location being hockenheimring | SELECT pole_position FROM table_1140074_2 WHERE location = "Hockenheimring" |
Name the total for % core moldova for 4.36% | SELECT total FROM table_19260_1 WHERE _percentage_core_moldova = "4.36_percentage" |
Give the average price and case of wines made from Zinfandel grapes in the year 2009. | SELECT AVG(Price) , AVG(Cases) FROM WINE WHERE YEAR = 2009 AND Grape = "Zinfandel" |
On what date was the record 4–0–0? | SELECT date FROM table_name_81 WHERE record = "4–0–0" |
Who has the height of m (ft 9in) and was born on 1980-03-05? | SELECT name FROM table_name_57 WHERE height = "m (ft 9in)" AND date_of_birth = "1980-03-05" |
Among the employees who have more than 10 hours of sick leave, how many of them wish to receive e-mail promotions? | SELECT COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.EmailPromotion = 1 AND T1.SickLeaveHours > 10 |
What is the maximum stars and year for the most recent movie? | SELECT MAX(T1.stars), T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.year = (SELECT MAX(YEAR) FROM Movie) |
What is the least minimum sales tax when the min tax is 105.7 and fed tax is more than 10? | SELECT MIN(minimum_tax_incl_sales_taxes__cad) AS ¢_l_ FROM table_name_27 WHERE min_tax__cad¢_us_gal_ = 105.7 AND federal_excise_tax___cad¢___l__ > 10 |
Total overall from penn state? | SELECT SUM(overall) FROM table_name_16 WHERE college = "penn state" |
Find the title of all the albums of the artist "AC/DC". | SELECT Title FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = "AC/DC" |
What is the number of inhabitants of male customers ages from 20 to 30 years old who are farming or fishing? | SELECT T2.INHABITANTS_K FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.OCCUPATION = 'Farming-fishing' AND T1.SEX = 'Male' AND T1.age >= 20 AND T1.age <= 30 |
what are the name of players who get more than the average points. | SELECT name FROM player WHERE points > (SELECT avg(points) FROM player) |
What is the total number of transfer students in all departments? | SELECT sum ( stu_transfer ) from student |
How many times did the matches were held in MA Chidambaram Stadium from 5/9/2009 to 8/8/2011? | SELECT SUM(CASE WHEN Venue_Name = 'MA Chidambaram Stadium' THEN 1 ELSE 0 END) FROM `Match` AS T1 INNER JOIN Venue AS T2 ON T1.Venue_Id = T2.Venue_Id WHERE Match_Date BETWEEN '2009-05-09' AND '2011-08-08' |
Name the gamecenter that has attendance of 65,212 | SELECT gamecenter FROM table_name_17 WHERE attendance = "65,212" |
What is the official full name of the current legislator whose current official Facebook presence is "senjoniernst"? | SELECT T1.official_full_name FROM current AS T1 INNER JOIN `social-media` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.facebook = 'senjoniernst' |
What caused the collapse of the Mausoleum at Halicarnassus? | SELECT cause_of_destruction FROM table_19342760_1 WHERE name = "Mausoleum at Halicarnassus" |
What is the total number of games sold in region ID 1? | SELECT SUM(T.num_sales * 100000) FROM region_sales AS T WHERE T.region_id = 1 |
Who were the visitors when the Atlanta Falcons were the home team? | SELECT designated_visitors FROM table_name_42 WHERE designated_home = "atlanta falcons" |
What is the sum of the dates in december that were against the atlanta flames before game 40? | SELECT SUM(december) FROM table_name_88 WHERE opponent = "atlanta flames" AND game < 40 |
List all club names in ascending order of start year. | SELECT name FROM club ORDER BY Start_year ASC |
What was the rocket's record when they played against Indiana? | SELECT record FROM table_27744976_10 WHERE team = "Indiana" |
Which person has the highest height? | SELECT * FROM people order by height desc limit 1 |
What is the first name of the student whose last name starting with the letter S and is taking ACCT-211 class? | SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211' AND T1.stu_lname LIKE 'S%' |
What was the tonnage on 12 september 1942? | SELECT tonnage FROM table_name_91 WHERE date = "12 september 1942" |
What is the epa highway fuel economy for an electric suv? | SELECT epa_rated_highway_fuel_economy FROM table_20549371_3 WHERE type_of_powertrain = "Electric SUV" |
Tell me the 1st leg for antwerp bc | SELECT 1 AS st_leg FROM table_name_10 WHERE team__number2 = "antwerp bc" |
Name the number in the series for when the viewers is 7.78 | SELECT no_in_series FROM table_15472061_1 WHERE us_viewers__millions_ = "7.78" |
Tell the question ID for "Would you bring up a physical health issue with a potential employer in an interview?". | SELECT questionid FROM Question WHERE questiontext LIKE 'Would you bring up a physical health issue with a potential employer in an interview?' |
What home team played against Crystal Palace? | SELECT home_team FROM table_name_68 WHERE away_team = "crystal palace" |
Who studied at Norterstein University? | did You mean list the name of authors who belong to the institution "Northeastern University" | Yes | SELECT DISTINCT t1.fname , t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = "Northeastern University" |
How many notes are there for the Devon Alexander vs. Shawn Porter fight? | SELECT COUNT(notes) FROM table_25840200_1 WHERE fight = "Devon Alexander vs. Shawn Porter" |
What is every entry in the win/lose against Sweden? | SELECT win_lose FROM table_24074130_5 WHERE against = "Sweden" |
Name the venue for margin less than 66 and opponent of north queensland cowboys | SELECT venue FROM table_name_60 WHERE margin < 66 AND opponent = "north queensland cowboys" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.