sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What is the payment method of the order with an id of 11? | select T1.payment_method from customers as T1 join customer_orders as T2 on T1.customer_id = T2.customer_id where T2.order_id = 11 |
How many positions drafted players from Washington? | SELECT COUNT(position) FROM table_16729063_1 WHERE college = "Washington" |
what is the pole position for france? | SELECT pole_position FROM table_29686983_1 WHERE country = "France" |
Which staff handled least number of payments? List the full name and the id. | SELECT T1.first_name , T1.last_name , T1.staff_id FROM staff AS T1 JOIN payment AS T2 ON T1.staff_id = T2.staff_id GROUP BY T1.staff_id ORDER BY count(*) ASC LIMIT 1 |
On June 30, 2008 who what was the Republican: Jeff Sessions percentage? | SELECT republican AS :_jeff_sessions FROM table_16751596_12 WHERE dates_administered = "June 30, 2008" |
What were the years active where Asian Cup played as a captain is Iran 1976? | SELECT years_active FROM table_272865_20 WHERE asian_cup_played_as_a_captain = "Iran 1976" |
What is the status of rené hoppe? | SELECT status FROM table_name_10 WHERE athlete = "rené hoppe" |
What was the date of the game with the record of 18–10–2? | SELECT date FROM table_name_60 WHERE record = "18–10–2" |
How many companies are in the list? | SELECT count ( * ) FROM company WHERE Sales_in_Billion > 200 ORDER BY Sales_in_Billion , Profits_in_Billion DESC |
What is the City, when the Prize is €880,000? | SELECT city FROM table_name_26 WHERE prize = "€880,000" |
Which Against has a Date of 30/05/1981? | SELECT COUNT(against) FROM table_name_63 WHERE date = "30/05/1981" |
In the district called Tennessee 6, how many in total of first elected are there? | SELECT COUNT(first_elected) FROM table_1341577_43 WHERE district = "Tennessee 6" |
Show names of technicians in ascending order of quality rank of the machine they are assigned. | SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID ORDER BY T2.quality_rank |
List the document ids for any documents with the status code done and the type code paper. | SELECT document_id FROM Documents WHERE document_status_code = "done" AND document_type_code = "Paper"; |
What is the description of the color for most products? | SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY count(*) DESC LIMIT 1 |
What is the numbers of the thn unit with a power greater than 220? | SELECT numbers FROM table_name_49 WHERE power__horsepower_ > 220 AND type = "thn" |
What was the model's DirectX if it has a Core of 700 700 mhz? | SELECT directx FROM table_26860595_2 WHERE core___mhz__ = "700 700" |
Show the transportation method most people choose to get to tourist attractions. | SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1 |
What is the Portuguese Pluperfect when the French is Ils/Elles Avaient Entendu? | SELECT portuguese FROM table_name_25 WHERE french = "ils/elles avaient entendu" |
Show the names of artworks in ascending order of the year they are nominated in. | SELECT T2.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 ORDER BY T3.Year |
How many judges were there for the eliminated couple? | SELECT judges FROM table_26375386_23 WHERE result = "Eliminated" |
What was the score for an n/a location with the odds of p + 1? | SELECT result FROM table_name_61 WHERE location = "n/a" AND odds = "p + 1" |
How many distinct cities does the employees live in? | SELECT COUNT(DISTINCT city) FROM EMPLOYEE |
Which surface has a score in the final of 4–6, 3–6? | SELECT surface FROM table_name_77 WHERE score_in_the_final = "4–6, 3–6" |
What is the price of the dvds? | select product_price from Products where product_name = 'dvds' |
What was the score of the game where the venue was cairns convention centre? | SELECT score FROM table_name_54 WHERE venue = "cairns convention centre" |
Great! Can you update this list to show how many times each tourist attraction was visited? | SELECT T1.Name , count ( * ) FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING count ( * ) > = 2 |
who was the director of the episode with production code ad1a26? | SELECT directed_by FROM table_name_38 WHERE production_code = "ad1a26" |
What was the total To Par for Craig Wood? | SELECT SUM(to_par) FROM table_name_16 WHERE player = "craig wood" |
What is the status of the community with a census ranking of 2,418 of 5,008? | SELECT status FROM table_name_67 WHERE census_ranking = "2,418 of 5,008" |
Show the name and distance of the aircrafts with more than 5000 distance and which at least 5 people have its certificate. | SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid WHERE T2.distance > 5000 GROUP BY T1.aid ORDER BY count(*) >= 5 |
How many storms had death records? | SELECT count(*) FROM storm WHERE Number_Deaths > 0; |
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 name of the division that has had the lowest number of draft matches in the 2019 season? | SELECT T2.name FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T1.season = 2019 AND T1.FTR = 'D' GROUP BY T2.division ORDER BY COUNT(FTR) LIMIT 1 |
What is the name of the most recent movie? | SELECT title FROM Movie WHERE YEAR = (SELECT max(YEAR) FROM Movie) |
State the name of the pair of word that have id of 20 and 50? | 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.w1st = 20 AND T2.w2nd = 50 |
List all the first words of the biwords pair where the second word is 'antic'. | SELECT T1.word FROM words AS T1 INNER JOIN biwords AS T2 ON T1.wid = T2.w1st WHERE T2.w2nd = ( SELECT wid FROM words WHERE word = 'antic' ) |
Among the stations with 3 stores, how many stations have a station pressure of no more than 30 on February 18, 2014? | SELECT COUNT(station_nbr) FROM weather WHERE `date` = '2014-02-18' AND stnpressure < 30 AND station_nbr IN ( SELECT station_nbr FROM relation GROUP BY station_nbr HAVING COUNT(store_nbr) = 3 ) |
What is the episode # when the guests were julie nixon eisenhower and david eisenhower? | SELECT MIN(episode__number) FROM table_25691838_12 WHERE guest = "Julie Nixon Eisenhower and David Eisenhower" |
Find the grade studying in room 105. | SELECT DISTINCT grade FROM list WHERE classroom = 105 |
Which student is more satisfied with the course Machine Learning Theory, Willie Rechert or Laughton Antonio? | SELECT T1.f_name, T1.l_name FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE (T1.f_name = 'Laughton' OR T1.f_name = 'Willie') AND (T1.l_name = 'Antonio' OR T1.l_name = 'Rechert') AND T3.name = 'Machine Learning Theory' ORDER BY T2.sat DESC LIMIT 1 |
On what date was the attendance at TD Garden 18,624? | SELECT date FROM table_23274514_8 WHERE location_attendance = "TD Garden 18,624" |
Can you please tell me the name of that school and the enrollment? | SELECT school, enrollment FROM university WHERE affiliation ! = 'Public' |
What country does the player who joined the Vancouver Canucks originally hail from? | SELECT nationality FROM table_2886617_4 WHERE nhl_team = "Vancouver Canucks" |
What is their name and team? | what do you mean their?could you give more info ? | What is the name of the oldest technician? | SELECT Name FROM technician ORDER BY Age DESC LIMIT 1 |
Who is the outgoing manager when they were replaced by pablo centrone? | SELECT outgoing_manager FROM table_name_16 WHERE replaced_by = "pablo centrone" |
What was the year that had Anugerah Bintang Popular Berita Harian 23 as competition? | SELECT COUNT(year) FROM table_name_30 WHERE competition = "anugerah bintang popular berita harian 23" |
Find the id of the order whose shipment tracking number is "3452". | SELECT order_id FROM shipments WHERE shipment_tracking_number = "3452" |
What is the call sign of the MHz Frequency less than 94.9 and an ERP W of 170? | SELECT call_sign FROM table_name_35 WHERE frequency_mhz < 94.9 AND erp_w = 170 |
Which Skip has Ends Lost larger than 44, and Blank Ends of 10? | SELECT skip FROM table_name_80 WHERE ends_lost > 44 AND blank_ends = 10 |
What is the last year that someone is first elected? | SELECT MAX(first_elected) FROM table_1342359_2 |
What shows for 2006 when 2002 is 0–1? | SELECT 2006 FROM table_name_96 WHERE 2002 = "0–1" |
What are the allergy types and how many allergies correspond to each one? | SELECT allergytype , count(*) FROM Allergy_type GROUP BY allergytype |
How many problems does the product with the most problems have? List the number of the problems and product name. | SELECT COUNT(*), T1.product_name FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_name ORDER BY COUNT(*) DESC LIMIT 1 |
What region has a 5 rank? | SELECT region FROM table_name_25 WHERE rank = 5 |
Show statement id, statement detail, account detail for accounts. | SELECT T1.statement_id , T2.statement_details , T1.account_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id = T2.statement_id |
What is the name of the course that has the most student enrollment? | SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY COUNT ( * ) DESC LIMIT 1 |
What was the score of the Browns game against the San Francisco 49ers? | SELECT result FROM table_name_7 WHERE opponent = "san francisco 49ers" |
What are names of countries with the top 3 largest population? | SELECT Name FROM country ORDER BY Population DESC LIMIT 3 |
Which high income group countries are from Asia? | SELECT CountryCode, Region FROM Country WHERE (IncomeGroup = 'High income: OECD' OR IncomeGroup = 'High income: nonOECD') AND Region LIKE '%Asia%' |
What are the degrees conferred in "San Francisco State University" in 2001. | SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = "San Francisco State University" AND t2.year = 2001 |
Can you tell me the total number of 100s that has the Balls larger than 325, and the Runs smaller than 572? | SELECT COUNT(100 AS s) FROM table_name_44 WHERE balls > 325 AND runs < 572 |
What is the title of AC/DC's albums? | SELECT Title FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = "AC/DC" |
Great, what is the typical product price for this product? | SELECT typical_buying_price FROM products WHERE product_name = "chervil" |
What is the ratio between country with the highest number of infant deaths in 1971 and the lowest number of infant deaths in 1971? List the country with the highest number of infant deaths in 1971 and the lowest number of infant deaths in 1971. | SELECT CAST(MAX(value) AS REAL) / MIN(value) FROM indicators WHERE indicatorname = 'Number of infant deaths' AND year = '1971' UNION ALL SELECT countryname FROM ( SELECT countryname, MAX(value) FROM indicators WHERE indicatorname = 'Number of infant deaths' AND year = '1971' ) UNION SELECT countryname FROM ( SELECT countryname, MIN(value) FROM indicators WHERE indicatorname = 'Number of infant deaths' AND year = '1971' ) |
What airport is in Vietnam? | SELECT airport FROM table_name_77 WHERE country = "vietnam" |
Find the names of the artists who have produced English songs but have never received rating higher than 8. | SELECT DISTINCT artist_name FROM song WHERE languages = "english" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 8 |
List all the titles and their publishing journals from the 60's. | SELECT T1.Title, T1.JournalId FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.Year >= 1960 AND T1.Year <= 1970 |
What is total number of laps for bikes manufactured by KTM with a time of +3.578 and a grid number larger than 4? | SELECT COUNT(laps) FROM table_name_22 WHERE manufacturer = "ktm" AND time_retired = "+3.578" AND grid > 4 |
Can you tell me the last railways this builder has build? | SELECT Railway FROM railway GROUP BY Builder having Builder = "GWR Swindon" ORDER BY built DESC limit 1 |
Which Artist has the Label of Columbia and the Standard number of COCC-72073? | SELECT artist FROM table_name_86 WHERE label = "columbia" AND standard_number = "cocc-72073" |
In countries with constitutional monarchy, what is the percentage of cities located in the district of England? | SELECT CAST(SUM(CASE WHEN T1.District = 'England' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.GovernmentForm = 'Constitutional Monarchy' |
What team was the away team for the game with 916 in attendance? | SELECT away FROM table_name_45 WHERE attendance = 916 |
what is the average wins when percent is more than 0.4 and teams is chargers~? | SELECT AVG(wins) FROM table_name_53 WHERE percent > 0.4 AND teams = "chargers~" |
What is the earliest year with less than 3 points and Parmalat Forti Ford was the entrant? | SELECT MIN(year) FROM table_name_40 WHERE points < 3 AND entrant = "parmalat forti ford" |
How many students, who have a GPA between 3 to 4, failed a course? | SELECT COUNT(T2.student_id) FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id WHERE T2.grade IS NULL AND T1.gpa BETWEEN 3 AND 4 |
How many clubs were founded in the westfalenstadion stadium? | SELECT COUNT(founded) FROM table_26218124_1 WHERE stadium = "Westfalenstadion" |
Alana Boyd of group B with a 4.30 result has what nationality? | SELECT nationality FROM table_name_24 WHERE group = "b" AND result = "4.30" AND name = "alana boyd" |
From 1593 onwards, what is the difference between the number of comedy works and history works? | SELECT SUM(IIF(GenreType = 'Comedy', 1, 0)) - SUM(IIF(GenreType = 'History', 1, 0)) FROM works WHERE Date > 1593 |
For the Honkai Impact 3rd App, what is the highest sentiment polarity score and what genre does it belong to? | SELECT MAX(T2.Sentiment_Polarity), T1.Genres FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Honkai Impact 3rd' AND T2.Sentiment_Polarity > 0.5 GROUP BY T1.Genres |
What is the airport code of the airport with the most flights? | SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) DESC LIMIT 1 |
What start has a ford cosworth dfx as the engine, a year later than 1981, and kraco enterprises as the entrant? | SELECT start FROM table_name_22 WHERE engine = "ford cosworth dfx" AND year > 1981 AND entrant = "kraco enterprises" |
How many times did Tiger get second in the year where there were 11 cuts? | SELECT MAX(2 AS nd) FROM table_11570261_6 WHERE cuts_made = "11" |
Who directed the show with the production code k2708? | SELECT directed_by FROM table_name_1 WHERE production_code = "k2708" |
How many Students are below the age of 17? | SELECT count ( StuID ) FROM student where Age<17 |
List all the server of the phone complaints with a late response from the company. | SELECT DISTINCT T2.server FROM events AS T1 INNER JOIN callcenterlogs AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T1.`Submitted via` = 'Phone' AND T1.`Timely response?` = 'No' |
Which catalogue is from Japan? | SELECT catalogue FROM table_name_31 WHERE region = "japan" |
How many high risk violations do the restaurants in San Francisco have in total? | SELECT COUNT(T2.business_id) FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.city IN ('San Francisco', 'SF', 'S.F.', 'SAN FRANCISCO') AND T1.risk_category = 'High Risk' |
State number of legislators who are not the senator among female legislators. | SELECT COUNT(*) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.gender_bio = 'F' AND (T2.class IS NULL OR T2.class = '') |
When was the F4 7 series? | SELECT date FROM table_25572068_1 WHERE series = "F4 7" |
What kind of transaction type for the "HL Road Frame - Black, 48" order happened in 2012/12/13? | SELECT T1.TransactionType FROM TransactionHistory AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Name = 'HL Road Frame - Black, 48' AND STRFTIME('%Y-%m-%d',T1.TransactionDate) = '2013-07-31' |
What was the record of the game when Lebron James (4) had the high assists? | SELECT record FROM table_name_43 WHERE high_assists = "lebron james (4)" |
Which date had a sport of Academics? | SELECT date FROM table_name_70 WHERE sport = "academics" |
How many grids have a Time/Retired of gearbox, and Laps smaller than 3? | SELECT COUNT(grid) FROM table_name_98 WHERE time_retired = "gearbox" AND laps < 3 |
List out total number of projects which has no staff for researcher role ? | SELECT count ( * ) FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_Staff WHERE role_code = 'researcher' ) |
Which settlement has the cyrillic name сигет? | SELECT settlement FROM table_2562572_30 WHERE cyrillic_name_other_names = "Сигет" |
What is the most recent date for a singles final with the score of 1–6, 4–6, 5–7? | SELECT MAX(date) FROM table_name_77 WHERE score_in_the_final = "1–6, 4–6, 5–7" |
How many flights have a velocity larger than 200? | SELECT COUNT(*) FROM flight WHERE velocity > 200 |
Name the minimum for prohibition? | SELECT MIN(for_prohibition) FROM table_120778_1 |
Which college/junior/club teams nationality is canada and nhl team is minnesota north stars | SELECT college_junior_club_team FROM table_1213511_7 WHERE nationality = "Canada" AND nhl_team = "Minnesota North Stars" |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.