sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What is the short name of the country in which the "Net bilateral aid flows from DAC donors, Sweden (current US$)" indicator hit the 570,000 value in 1970? | SELECT T2.ShortName FROM Indicators AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.IndicatorName = 'Net bilateral aid flows FROM DAC donors, Sweden (current US$)' AND T1.Year = 1970 AND T1.Value = 570000 |
What are their last names? | SELECT Lname FROM student WHERE sex = 'F' AND city_code = 'BAL' |
What is the last year a sponsorship ended? | SELECT MAX(sponsorship) AS Ended FROM table_28005160_2 |
Write down all of the product ids that were placed by Meander. | SELECT DISTINCT T2.ProductID FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID WHERE T1.FirstName = 'Meander' |
What are the names of the tourist attractions that have parking or shopping as their feature details? | SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'park' UNION SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'shopping' |
What are the addresses for the stores? | SELECT T2.address FROM store AS T1 INNER JOIN address AS T2 ON T1.address_id = T2.address_id |
How many unique directors with an average earnings of 2 and a quality of 3 have not made comedy films? List them. | SELECT DISTINCT T1.directorid FROM directors AS T1 INNER JOIN movies2directors AS T2 ON T1.directorid = T2.directorid WHERE T1.d_quality = 3 AND T1.avg_revenue = 2 AND T2.genre != 'Comedy' |
Which Total has a Set 3 of 13–25? | SELECT total FROM table_name_53 WHERE set_3 = "13–25" |
What song has 24 votes? | SELECT song FROM table_19763199_3 WHERE total_votes = 24 |
What was the date if the driver was Robert Pressley? | SELECT date FROM table_2260452_1 WHERE driver = "Robert Pressley" |
What GEO ID has a longitude of -102.693028? | SELECT geo_id FROM table_name_83 WHERE longitude = -102.693028 |
How old was composer of the show when he was nominated for Emmy's Outstanding Music Composition for a Series in 2009. Indicate his full name as well. | SELECT T1.year - T2.birthdate AS ageIn2009, T2.name FROM Award AS T1 INNER JOIN Person AS T2 ON T1.person = T2.name WHERE T1.role = 'composer' AND T1.organization = 'Primetime Emmy Awards' AND T1.award = 'Outstanding Music Composition for a Series (Original Dramatic Score)' AND T1.result = 'Nominee' AND T1.year = 2009; |
What are all the phone numbers? | SELECT customer_phone FROM available_policies |
List the names of roller coasters by ascending order of length. | SELECT Name FROM roller_coaster ORDER BY LENGTH |
List the first and last name of all players who are left / L hand in the order of birth date. | SELECT first_name , last_name FROM players WHERE hand = 'L' ORDER BY birth_date |
Give the names of countries with English and French as official languages. | SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" AND T2.IsOfficial = "T" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "French" AND T2.IsOfficial = "T" |
Which year has the most customer orders? | SELECT strftime('%Y', order_date) FROM cust_order GROUP BY strftime('%Y', order_date) ORDER BY COUNT(strftime('%Y', order_date)) DESC LIMIT 1 |
How many captains in this table? | select count ( * ) from captain |
From which country is the player who made less than $216? | SELECT country FROM table_name_63 WHERE money___$__ < 216 |
What is the Standard cost (USD) of Kwin team creator? | SELECT standard_cost__usd_ FROM table_name_95 WHERE creator = "kwin team" |
List the themes of parties in ascending order of number of hosts. | SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC |
Show the locations that have both performances with more than 2000 attendees and performances with less than 1000 attendees. | SELECT LOCATION FROM performance WHERE Attendance > 2000 INTERSECT SELECT LOCATION FROM performance WHERE Attendance < 1000 |
How many students are enlisted in the Army organization? | SELECT COUNT(name) FROM enlist WHERE organ = 'army' |
I want the manner of departure for 1 june 2007 | SELECT manner_of_departure FROM table_name_2 WHERE date_of_appointment = "1 june 2007" |
Who lost to moyer (9–4)? | SELECT opponent FROM table_name_26 WHERE loss = "moyer (9–4)" |
Which channel was on 28 December 2008? | SELECT channel FROM table_name_74 WHERE date = "28 december 2008" |
What are the first names and office locations for all professors sorted alphabetically by first name? | SELECT T2.emp_fname , T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num ORDER BY T2.emp_fname |
Which Diameter (km) has a Name of alma-merghen planitia, and a Year named smaller than 1997? | SELECT MAX(diameter__km_) FROM table_name_4 WHERE name = "alma-merghen planitia" AND year_named < 1997 |
What is Quantitiy Made, when Quantity Preserved is "4-4-0 — oooo — american"? | SELECT quantity_made FROM table_name_23 WHERE quantity_preserved = "4-4-0 — oooo — american" |
What is the Grand Cru with a Wine Style of Red Wine and Village of Gevrey-Chambertin? | SELECT grand_cru FROM table_name_33 WHERE wine_style = "red wine" AND village = "gevrey-chambertin" |
What is the D45 associated with a D42 of r 22? | SELECT d_45 FROM table_name_23 WHERE d_42 = "r 22" |
What are all the payment methods? | SELECT DISTINCT payment_method FROM customers |
How about how to get there? | SELECT T2.How_to_Get_There FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T1.Name = "game1" |
Yes, hi, I'd like to know how many professors are in the history department? | SELECT count ( * ) FROM professor WHERE dept_code = "HIST" |
Among observations in 2011, provide the names and ages of patients whose Systolic Blood Pressures are 200mmHg. | SELECT T2.first, T2.last , CASE WHEN T2.deathdate IS NULL THEN strftime('%Y', T1.DATE) - strftime('%Y', T2.birthdate) ELSE strftime('%Y', T2.deathdate) - strftime('%Y', T2.birthdate) END AS age FROM observations AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'Systolic Blood Pressure' AND T1.VALUE = 200 AND T1.UNITS = 'mmHg' AND strftime('%Y', T1.DATE) = '2011' |
What played has 3 as the losing bonus? | SELECT played FROM table_name_91 WHERE losing_bonus = "3" |
Which points classification has 4 as the stage? | SELECT points_classification FROM table_22464308_2 WHERE stage = 4 |
What day was the margin of victory 1 stroke when the tournament was colonial national invitation? | SELECT date FROM table_name_5 WHERE margin_of_victory = "1 stroke" AND tournament = "colonial national invitation" |
Which festival name was nimonated for artwork? | you want all of festival name was nimonated for artwork? | Yes | SELECT distinct T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID |
Which channels are broadcast in the morning? Give me the channel names. | SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' |
What date is for Venue of jjb stadium, and a Result of w? | SELECT date FROM table_name_14 WHERE venue = "jjb stadium" AND result = "w" |
Which Case length has a Rim diameter of 13.20 (.518)? | SELECT case_length FROM table_name_90 WHERE rim_diameter = "13.20 (.518)" |
What is the lowest position with 32-6 points and less then 59 goals when there are more than 38 played? | SELECT MIN(position) FROM table_name_37 WHERE points = "32-6" AND goals_against < 59 AND played > 38 |
Show the locations of parties with hosts older than 50. | SELECT T3.Location FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T2.Age > 50 |
who is the entrant when the engine is bmw p82? | SELECT entrant FROM table_name_92 WHERE engine_† = "bmw p82" |
How many times has the student Linda Smith visited Subway? | SELECT COUNT(*) FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID WHERE Student.Fname = "Linda" AND Student.Lname = "Smith" AND Restaurant.ResName = "Subway" |
Name the D 46 which has D 42 of r 14 | SELECT d_46 FROM table_name_36 WHERE d_42 = "r 14" |
what is the unit price of track id 6 | SELECT unit_price from tracks where id = 6 |
list out the stadium names | SELECT name FROM stadium |
How many employees working in the Engineering Department in 2007 would have their credit cards expired in the same year? | SELECT COUNT(T1.BusinessEntityID) FROM EmployeeDepartmentHistory AS T1 INNER JOIN Department AS T2 ON T1.DepartmentID = T2.DepartmentID INNER JOIN PersonCreditCard AS T3 ON T1.BusinessEntityID = T3.BusinessEntityID INNER JOIN CreditCard AS T4 ON T3.CreditCardID = T4.CreditCardID WHERE T4.ExpYear = 2007 AND T2.Name = 'Engineering' |
What is the lowest Points, when Home is "Boston"? | SELECT MIN(points) FROM table_name_81 WHERE home = "boston" |
What college did Marcus Wilson attend? | SELECT college FROM table_name_45 WHERE player = "marcus wilson" |
What year did the San Agustin gym open? | SELECT year_opened FROM table_name_44 WHERE arena_venue = "san agustin gym" |
State one biword pair with occurence of 4. | SELECT T1.word, T3.word FROM words AS T1 INNER JOIN biwords AS T2 ON T1.wid = T2.w1st INNER JOIN words AS T3 ON T3.wid = T2.w2nd WHERE T2.occurrences = 4 LIMIT 1 |
Find the number of shops in each location. | SELECT count(*) , LOCATION FROM shop GROUP BY LOCATION |
Which number was the lyricist ahmed metwally? | SELECT no FROM table_28005100_1 WHERE lyricist = "Ahmed Metwally" |
What season has the champion of Nicolas Kiesa? | SELECT season FROM table_name_84 WHERE champion = "nicolas kiesa" |
What is all the information about courses, ordered by credits ascending? | SELECT * FROM COURSE ORDER BY Credits |
Show me the teams that have wrestlers eliminated by "Benjamin". | SELECT Team FROM Elimination WHERE Eliminated_By = "Benjamin" |
Which department is the smallest? | Do you mean the department that has the fewest members? | Yes, which department has the fewest members? | SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MEMBER_OF AS T2 ON T1.DNO = T2.DNO GROUP BY T2.DNO ORDER BY count ( * ) ASC LIMIT 1 |
What Nationality has a Time of 9:01.70? | SELECT nationality FROM table_name_58 WHERE time = "9:01.70" |
what are the names of the manufacturers of those products? | SELECT T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code where T1.price > = 150 |
How much Total has a Rank of 5, and a Bronze larger than 3? | SELECT SUM(total) FROM table_name_44 WHERE rank = "5" AND bronze > 3 |
Which procedures and medications were received by the patient with the third-degree burn? | SELECT DISTINCT T1.DESCRIPTION, T3.DESCRIPTION FROM procedures AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT INNER JOIN medications AS T3 ON T2.patient = T3.PATIENT WHERE T2.DESCRIPTION = 'Third degree burn' |
What was the ticket price at Red Rocks Amphitheatre? | SELECT ticket_price_s_ FROM table_name_96 WHERE venue = "red rocks amphitheatre" |
what is the most weeks on chart when the peak position is less than 5 and from Sweden? | SELECT MAX(weeks_on_chart) FROM table_name_49 WHERE peak_position < 5 AND country = "sweden" |
When was the latest debut in Europe for Henrik Larsson, with less than 108 games? | SELECT MAX(debut_in_europe) FROM table_name_57 WHERE player = "henrik larsson" AND games < 108 |
What is the name and id of the department with the most number of degrees ? | select t2.department_name , t1.department_id from degree_programs as t1 join departments as t2 on t1.department_id = t2.department_id group by t1.department_id order by count(*) desc limit 1 |
What Laurel Mountain Channel is associated with B Mountain Channel of 7? | SELECT laurel_mountain_channel FROM table_name_51 WHERE b_mountain_channel = "7" |
Who directed what was written by Michael G. Moye & Ron Leavitt & J. Stanford Parker? | SELECT directed_by FROM table_2226817_3 WHERE written_by = "Michael G. Moye & Ron Leavitt & J. Stanford Parker" |
Who was Louise when Tracy Venner was Dainty June? | SELECT louise FROM table_name_83 WHERE dainty_june = "tracy venner" |
Give the total population and average surface area corresponding to countries in North America that have a surface area greater than 3000 . | select sum(population) , avg(surfacearea) from country where continent = "north america" and surfacearea > 3000 |
Find the name of route that has the highest number of deliveries. | SELECT t1.route_name FROM Delivery_Routes AS t1 JOIN Delivery_Route_Locations AS t2 ON t1.route_id = t2.route_id GROUP BY t1.route_id ORDER BY count(*) DESC LIMIT 1 |
How many seasons was Dave Reid treasurer? | SELECT COUNT(season) FROM table_16446652_1 WHERE treasurer = "Dave Reid" |
What is the record of game 48? | SELECT record FROM table_name_40 WHERE game = 48 |
How many players wore number 8? | SELECT COUNT(height) FROM table_12962773_16 WHERE no = 8 |
Who is the Opponent on January 7? | SELECT opponent FROM table_name_21 WHERE date = "january 7" |
What are the bed types of the three least expensive rooms? | SELECT bedType FROM Rooms ORDER BY basePrice LIMIT 3 |
What date did the opponent George Khrikadze play? | SELECT date FROM table_name_97 WHERE opponent = "george khrikadze" |
What are the names and scores of wines that are made of white color grapes? | SELECT T2.Name , T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "White" |
Please list all tags of kurtis blow from 2000 to 2010. | SELECT T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupYear BETWEEN 2000 AND 2010 AND T1.artist LIKE 'kurtis blow' |
What is the score of the visiting Hartford Whalers game from April 11? | SELECT score FROM table_name_8 WHERE visitor = "hartford whalers" AND date = "april 11" |
What are the id of each employee and the number of document destroyed by that employee? | SELECT Destroyed_by_Employee_ID , count(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID |
and what is the company name associated with ID 9? | SELECT T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Contracts AS T2 ON T1.company_id = T2.maintenance_contract_company_id WHERE t2.maintenance_contract_id = 9 |
Return the full name and phone of the customer who has card number 4560596484842. | SELECT T2.customer_first_name , T2.customer_last_name , T2.customer_phone FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.card_number = "4560596484842" |
What are the ids and names of the medicine that can interact with two or more enzymes? | SELECT T1.id , T1.Name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id HAVING count(*) >= 2 |
What is the rank for China? | SELECT SUM(rank) FROM table_name_96 WHERE country = "china" |
What class is volleyball in 2000? | SELECT class FROM table_name_40 WHERE sport = "volleyball" AND year = 2000 |
In reviews for the Eagle National Bank product, how many of the 5 star reviews where from Nashville, Tennessee? | SELECT COUNT(T2.Stars) FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2.district_id WHERE T1.city = 'Nashville' AND T1.state_abbrev = 'TN' AND T2.Product = 'Eagle National Mortgage' AND T2.Stars = 5 |
What is the average Year for the project The Untouchables? | SELECT AVG(year) FROM table_name_16 WHERE project = "the untouchables" |
What are the dog name, age and weight of the dogs that were abandoned? Note that 1 stands for yes, and 0 stands for no in the tables. | SELECT name , age , weight FROM Dogs WHERE abandoned_yn = 1 |
On what date was a friendly match held at Auckland? | SELECT date FROM table_name_32 WHERE competition = "friendly match" AND venue = "auckland" |
What is the full name of that campus? | SELECT campus from campuses WHERE YEAR > = 1935 AND YEAR < = 1939 |
What is the fleet size of the airline which has a callsign of cool red? | SELECT MIN(fleet_size) FROM table_15637071_1 WHERE callsign = "COOL RED" |
Where was the game with a 4-1 record played? | SELECT location FROM table_23243769_4 WHERE record = "4-1" |
Name the womens doubles for werner schlager | SELECT womens_doubles FROM table_28138035_4 WHERE mens_singles = "Werner Schlager" |
What are the first name, last name, and gender of all the good customers? Order by their last name. | SELECT first_name , last_name , gender_mf FROM customers WHERE good_or_bad_customer = 'good' ORDER BY last_name |
What is the greatest number of caps for Bruce Djite? | SELECT MAX(caps) FROM table_name_54 WHERE player = "bruce djite" |
What is the date of the game with a record of 14-31? | SELECT date FROM table_name_16 WHERE record = "14-31" |
What conference includes the Indians? | SELECT conference_joined FROM table_name_40 WHERE mascot = "indians" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.