sentence
stringlengths
3
347
sql
stringlengths
18
804
How many songs use drums as an instrument?
SELECT count(*) FROM instruments WHERE instrument = "drums"
Show me the name of the body builder with the most weight
SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1
How many papers are published under the journal "Software - Practice and Experience"?
SELECT COUNT(T1.Id) FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T2.FullName = 'Software - Practice and Experience'
Tell me the pts for glasgow rocks
SELECT pts FROM table_name_96 WHERE div = "glasgow rocks"
What percent did RETTÖ get in the state where LINKE got 0.1%, and FRITZ got 1.3%?
SELECT rettö FROM table_name_81 WHERE linke = "0.1%" AND fritz = "1.3%"
Which owner has a description of Mark 1 pos and is dated 1956?
SELECT owner_s_ FROM table_name_18 WHERE date = 1956 AND description = "mark 1 pos"
How many goals against when the draws are fewer than 3?
SELECT MAX(goals_against) FROM table_name_20 WHERE drawn < 3
Name the laps for rank of 14 and start of 16
SELECT laps FROM table_name_67 WHERE rank = "14" AND start = "16"
Before 2007, how many wins were there when the point total was 48?
SELECT SUM(wins) FROM table_name_10 WHERE points = "48" AND year < 2007
what is the released when the series is sorted 6y/ai?
SELECT released FROM table_name_68 WHERE series_sorted = "6y/ai"
What is Part 1, when Part 3 is "heldu"?
SELECT part_1 FROM table_name_83 WHERE part_3 = "heldu"
What is the number of people in attendance when Tonbridge Angels is the opponent?
SELECT attendance FROM table_name_86 WHERE opponent = "tonbridge angels"
Which Shooting Score (pts) has a Total larger than 5464 and a Athlete of heather fell ( gbr )?
SELECT shooting_score__pts_ FROM table_name_7 WHERE total > 5464 AND athlete = "heather fell ( gbr )"
Tell me fourth place for year of 2010
SELECT fourth_place FROM table_name_36 WHERE year = 2010
What is the sum of gold medals for the United States with silver medal count greater than 3?
SELECT SUM(gold) FROM table_name_26 WHERE nation = "united states" AND silver > 3
Which authors have first name "Amal"? List their last names.
SELECT lname FROM authors WHERE fname = "Amal"
What's the 1996 when 1997 is 3R?
SELECT 1996 FROM table_name_44 WHERE 1997 = "3r"
List all the names of the products with the price of more than 1000$.
SELECT DISTINCT T2.Name FROM ProductListPriceHistory AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ListPrice > 1000
State the name of dbas with verified quality.
SELECT DISTINCT T1.dba_name FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T2.results LIKE '%Pass%'
Who are the delegates on the Appropriations committee?
select Delegate from election where Committee = 'Appropriations'
Find the name of customers whose credit score is below the average credit scores of all customers.
SELECT cust_name FROM customer WHERE credit_score < (SELECT AVG(credit_score) FROM customer)
Name the least wins of 56.25%
SELECT MIN(wins) FROM table_15829930_5 WHERE success_rate = "56.25%"
What is the highest population (2008) created earlier than 1857, and the county was Sinoe?
SELECT MAX(population__2008_) FROM table_name_69 WHERE created < 1857 AND county = "sinoe"
What is the most common city of all customers with the customer status code "Bad Customer"? | What do you mean by saying the most common city? | The city name that appears the most
SELECT T2.city FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id where T1.customer_status_code = 'Bad Customer' GROUP BY T2.city ORDER BY count ( * ) LIMIT 1
Find id of the candidate who most recently accessed the course?
SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1
What was the reading score in the year the science score was 96.13?
SELECT reading FROM table_2534578_1 WHERE science = "96.13"
What are the names of the singers and number of concerts for each person?
SELECT T2.name , count(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id GROUP BY T2.singer_id
What was the method of elimination in the chamber with a time of 24:02?
SELECT method_of_elimination FROM table_24628683_2 WHERE time = "24:02"
How many states are in the Midwest region?
SELECT COUNT(DISTINCT T) FROM ( SELECT CASE WHEN Region = 'Midwest' THEN State ELSE NULL END AS T FROM Regions ) WHERE T IS NOT NULL
Which city has the most number of customers?
SELECT T2.city FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id GROUP BY T2.city ORDER BY count ( * ) DESC LIMIT 1
What type of ships does United States have?
SELECT distinct Type FROM ship where Nationality = 'United States'
What are the names of the students who live in the city with code HKG? | Do you mean the full name | Yes please
SELECT fname , lname FROM student WHERE city_code = 'HKG'
Which streak had an attendance of 33,013?
SELECT streak FROM table_name_45 WHERE attendance = "33,013"
what is the lowest place when the language is croatian?
SELECT MIN(place) FROM table_name_95 WHERE language = "croatian"
What is the population of each community with city status?
SELECT population FROM table_171361_1 WHERE status = "City"
Find the name and attribute ID of the attribute definitions with attribute value 0.
SELECT t1.attribute_name, t1.attribute_id FROM Attribute_Definitions AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.attribute_id = t2.attribute_id WHERE t2.attribute_value = 0
What is the average of the swimsuit smaller than 9.545 , of Iowa, with an evening gown larger than 9.625?
SELECT AVG(average) FROM table_name_34 WHERE swimsuit < 9.545 AND state = "iowa" AND evening_gown > 9.625
What was the loss from the coyotes as opponents?
SELECT loss FROM table_name_20 WHERE opponent = "coyotes"
What is the class of the Charlotte Camel gt 500 race?
SELECT class FROM table_name_76 WHERE race = "charlotte camel gt 500"
What's the decrease rate of the game plays did David Aebischer after he got traded in 2005?
SELECT CAST((SUM(CASE WHEN T1.year = 2005 THEN T1.GP ELSE 0 END) - SUM(CASE WHEN T1.year = 2006 THEN T1.GP ELSE 0 END)) AS REAL) * 100 / SUM(CASE WHEN T1.year = 2005 THEN T1.GP ELSE 0 END) FROM Goalies AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID WHERE T2.firstName = 'David' AND T2.lastName = 'Aebischer'
How many female students were there at Stanford University in 2011?
SELECT CAST(T1.num_students * T1.pct_female_students AS REAL) / 100 FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.year = 2011 AND T2.university_name = 'Stanford University'
List down languages used in Malaysia.
SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Malaysia'
What is the primary conference with a IHSAA Football Class of A, at South Decatur school?
SELECT primary_conference FROM table_name_56 WHERE ihsaa_football_class = "a" AND school = "south decatur"
what day was the sandown
SELECT date FROM table_name_56 WHERE race_title = "sandown"
What is the crowd size of the match featuring North Melbourne as the away team?
SELECT MIN(crowd) FROM table_name_40 WHERE away_team = "north melbourne"
what's airdate with international destination being scotland
SELECT airdate FROM table_13036251_1 WHERE international_destination = "Scotland"
What is the sum of the points of the club with more than 34 played?
SELECT SUM(points) FROM table_name_68 WHERE played > 34
Which club has the most female students as their members? Give me the name of the club.
SELECT t1.clubname 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 t3.sex = "F" GROUP BY t1.clubname ORDER BY count(*) DESC LIMIT 1
Name the enrollment with cougars
SELECT enrollment FROM table_24216139_2 WHERE nickname = "Cougars"
Please show me the names of all those managers
select name from manager
What is the average amount of money spent by a customer in Italy on a single film rental?
SELECT AVG(T5.amount) FROM address AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id INNER JOIN country AS T3 ON T2.country_id = T3.country_id INNER JOIN customer AS T4 ON T1.address_id = T4.address_id INNER JOIN payment AS T5 ON T4.customer_id = T5.customer_id WHERE T3.country = 'Italy'
Find the entry name of the catalog with the highest price (in USD).
SELECT catalog_entry_name FROM catalog_contents ORDER BY price_in_dollars DESC LIMIT 1
Find number of products which Sony does not make.
SELECT count(DISTINCT name) FROM products WHERE name NOT IN (SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Sony')
Who were the guests on a show where the production code is 6152?
SELECT guest FROM table_25691838_12 WHERE production_code = 6152
What was the date of week 3?
SELECT date FROM table_name_25 WHERE week = 3
What is Region, when Date is 2004?
SELECT region FROM table_name_61 WHERE date = 2004
How many aldermen have "James" as their first name?
SELECT COUNT(*) FROM Ward WHERE alderman_first_name = 'James'
What are the attribute data types that possessed more than 3 attribute definitions?
SELECT attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING count ( * ) > 3
What is the name of the establishment that Joshua Rosa inspected?
SELECT DISTINCT T3.dba_name FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id INNER JOIN establishment AS T3 ON T2.license_no = T3.license_no WHERE T1.first_name = 'Joshua' AND T1.last_name = 'Rosa'
Give the section titles of the document with the name "David CV".
SELECT t2.section_title FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code WHERE t1.document_name = "David CV"
What are all the employees without a department number?
SELECT * FROM employees WHERE department_id = "null"
List the name of the phone model launched in year 2002 and with the highest RAM size.
SELECT T2.Hardware_Model_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T1.Launch_year = 2002 ORDER BY T1.RAM_MiB DESC LIMIT 1;
What are the first names of all students who got a grade C in a class?
SELECT DISTINCT stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE enroll_grade = 'C'
What is the event of the match with a round larger than 2 and ended with a method of ko (kick)?
SELECT event FROM table_name_39 WHERE round > 2 AND method = "ko (kick)"
Who is performing in the back stage position for the song "Badlands"? Show the first name and the 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 = "Badlands" AND T1.StagePosition = "back"
what is the date of birth?
SELECT T1.driverid, t1.dob FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds DESC LIMIT 1
what is the school for Ivey armstrong?
SELECT school FROM table_name_90 WHERE name = "ivey armstrong"
What are the average height and weight across males (sex is M)?
SELECT avg(height) , avg(weight) FROM people WHERE sex = 'M'
what team has +1'25.337 for the time?
SELECT team FROM table_name_92 WHERE time = "+1'25.337"
Show the name of track and the number of races in each track.
SELECT T2.name , count(*) FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id
When dietrich fischer-dieskau is the olivier who is the conductor?
SELECT conductor FROM table_29728787_1 WHERE olivier = "Dietrich Fischer-Dieskau"
How many candidates are there?
SELECT count(*) FROM candidate
What is the lowest round for Georgia Tech?
SELECT MIN(round) FROM table_name_2 WHERE school = "georgia tech"
List the date, theme and sales of the journal which did not have any of the listed editors serving on committee.
SELECT date , theme , sales FROM journal EXCEPT SELECT T1.date , T1.theme , T1.sales FROM journal AS T1 JOIN journal_committee AS T2 ON T1.journal_ID = T2.journal_ID
Where was the 05/09/1973 venue?
SELECT venue FROM table_name_63 WHERE date = "05/09/1973"
What Money (£) has a Country of ireland?
SELECT money___£__ FROM table_name_96 WHERE country = "ireland"
Which player is from Northern Ireland?
SELECT player FROM table_name_42 WHERE country = "northern ireland"
In 1970, how many Middle Eastern & North African countries whose value for CO2 emissions from gaseous fuel consumption (kt) indicator is more than 600?
SELECT COUNT(T2.CountryCode) FROM Indicators AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Region = 'Middle East & North Africa' AND T1.IndicatorName = 'CO2 emissions FROM gaseous fuel consumption (kt)' AND T1.Year = 1970 AND T1.Value > 600
Name the high points for april 8
SELECT high_points FROM table_27722734_11 WHERE date = "April 8"
Which non-playoffs team had the most points in the regular season in the year 1998?
SELECT T2.tmID FROM players_teams AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.year = 1998 AND T1.PostGP = 0 ORDER BY T1.points DESC LIMIT 1
Could you please find all the names of the students who took some course and got a C?
SELECT T1.stu_fname , T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'C'
Which third party companies have at least 2 maintenance engineers or have at least 2 maintenance contracts? List the company id and name.
SELECT T1.company_id, T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Engineers AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id HAVING COUNT(*) >= 2 UNION SELECT T3.company_id, T3.company_name FROM Third_Party_Companies AS T3 JOIN Maintenance_Contracts AS T4 ON T3.company_id = T4.maintenance_contract_company_id GROUP BY T3.company_id HAVING COUNT(*) >= 2
Who is on the 2002 commission from district 3?
SELECT 2002 AS _commission FROM table_136027_2 WHERE district = "district 3"
What is the rating of item id 3?
select rating from review where i_id = 3
List all of the credit cards that had expired by 2007.
SELECT CardNumber FROM CreditCard WHERE ExpYear < 2007
Find the name of the source user with the highest average trust score.
SELECT T1.name FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.source_u_id GROUP BY T2.source_u_id ORDER BY avg(trust) DESC LIMIT 1
How many flights on the 1st of August 2018 were coming from Allentown, Pennsylvania?
SELECT COUNT(*) FROM Airlines WHERE FL_DATE = '2018/8/1' AND ORIGIN = 'ABE'
Please list the titles of the films that are released in 2006 and have a rental rate of $2.99.
SELECT title FROM film WHERE release_year = 2006 AND rental_rate = 2.99
What was Spain's score?
SELECT score FROM table_name_24 WHERE country = "spain"
What are the names of representatives and the dates of elections they participated in.
SELECT T2.Name , T1.Date FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID
how many male students of there
SELECT count ( * ) from student where sex = "M"
In which streets of the city of San Francisco are there restaurants that serve seafood?
SELECT T1.street_name FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'san francisco' AND T2.food_type = 'seafood' AND street_name IS NOT NULL
What is the Overall Record when Since Beginning of Big 12 is ou, 27-3?
SELECT overall_record FROM table_name_11 WHERE since_beginning_of_big_12 = "ou, 27-3"
How many cars has over 6 cylinders?
SELECT COUNT(*) FROM CARS_DATA WHERE Cylinders > 6;
Which game has the most sales in Japan?
SELECT T5.game_name FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id INNER JOIN game_platform AS T3 ON T2.game_platform_id = T3.id INNER JOIN game_publisher AS T4 ON T3.game_publisher_id = T4.id INNER JOIN game AS T5 ON T4.game_id = T5.id WHERE T1.region_name = 'Japan' ORDER BY T2.num_sales DESC LIMIT 1
How many picks had a round smaller than 6 and an overall bigger than 153?
SELECT SUM(pick) FROM table_name_47 WHERE round < 6 AND overall > 153
What is the LMS class of trains with numbers 14510-5?
SELECT LMS AS class FROM table_15412381_5 WHERE lms_nos = "14510-5"
When Benalla DFL is swanpool with less than 16 losses, what is the sum of Byes?
SELECT COUNT(byes) FROM table_name_39 WHERE benalla_dfl = "swanpool" AND losses < 16
What was the price of Bitcoin when it closed at the end of the day on 2013/4/29?
SELECT T2.close FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.date = '2013-04-29' AND T1.name = 'Bitcoin'
What is the result when the week is greater than 6 and the Buffalo Bills are the opponent?
SELECT result FROM table_name_43 WHERE week > 6 AND opponent = "buffalo bills"