sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What is the average number played for place 2 and more than 4 lost? | SELECT AVG(played__pj_) FROM table_name_18 WHERE place__posición_ = 2 AND lost__pp_ > 4 |
What date was the release when the format was lp? | SELECT date FROM table_name_21 WHERE format = "lp" |
Which country has at most 3 stadiums listed? | SELECT country FROM stadium GROUP BY country HAVING count(*) <= 3 |
Precisely how many staff members live in Connecticut? | SELECT count ( * ) FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id where T1.state_province_county = "Connecticut" |
What is employee id 163 full name? | SELECT first_name, last_name FROM employees WHERE employee_id = 163 |
How many students does LORIA ONDERSMA teaches? | SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "LORIA" AND T2.lastname = "ONDERSMA" |
For what round was the opponent mercedes paz with a result of 4–6, 6–1, 6–3? | SELECT round FROM table_name_95 WHERE opponent = "mercedes paz" AND result = "4–6, 6–1, 6–3" |
Among the menus that did not support taking out or booking in advance, how many of them were created before 1950? | SELECT COUNT(*) FROM Menu WHERE call_number IS NULL AND strftime('%Y', date) < '1950' |
What is the type of vocables that appears most frequently? | SELECT TYPE FROM vocals GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1 |
Name the episode for run time 25:05 | SELECT episode FROM table_2102782_1 WHERE run_time = "25:05" |
Which player's pick number was 25? | SELECT player FROM table_name_79 WHERE pick__number = 25 |
What about transactions with type code PUR? | Select date_of_transaction from transactions where transaction_type_code = "PUR" |
WHAT IS THE GRID WITH AN ACCIDENT AND HONDA MANUFACTURER? | SELECT MAX(grid) FROM table_name_72 WHERE time_retired = "accident" AND manufacturer = "honda" |
Which Home team has an Away team of fitzroy? | SELECT home_team FROM table_name_62 WHERE away_team = "fitzroy" |
How many draws were there with goals against that did not qualify for UEFA competitions? | SELECT drew FROM table_name_56 WHERE goals_against = "did not qualify for uefa competitions" |
When 441st bs, 7th bw is the unit what is the b-52 model? | SELECT b_52_model FROM table_18933037_3 WHERE unit = "441st BS, 7th BW" |
What is Lost, when Losing Bonus is "3", and when Club is "Bettws RFC"? | SELECT lost FROM table_name_64 WHERE losing_bonus = "3" AND club = "bettws rfc" |
Return the gender and name of artist who produced the song with the lowest resolution. | SELECT T1.gender , T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.resolution LIMIT 1 |
Which Constructor has a Grid of 17? | SELECT constructor FROM table_name_87 WHERE grid = 17 |
Find the list of cities that no customer is living in. | SELECT city FROM addresses WHERE NOT city IN (SELECT DISTINCT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id) |
List out the user id that has compliment type of photos. | SELECT T2.user_id FROM Compliments AS T1 INNER JOIN Users_Compliments AS T2 ON T1.compliment_id = T2.compliment_id WHERE T1.compliment_type = 'photos' |
Show me all the films not longer than 100 minutes? | SELECT title FROM film WHERE LENGTH < = 100 |
Which team started 2010? | SELECT team_name FROM table_17289224_1 WHERE season = "2010" |
What was segment C when segment D was fluorescent tubes? | SELECT segment_c FROM table_15187735_1 WHERE segment_d = "Fluorescent Tubes" |
How many suppliers for the part "hot spring dodger dim light" are in Vietnam? | SELECT COUNT(T3.s_name) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN supplier AS T3 ON T2.ps_suppkey = T3.s_suppkey INNER JOIN nation AS T4 ON T3.s_nationkey = T4.n_nationkey WHERE T1.p_name = 'hot spring dodger dim light' AND T4.n_name = 'VIETNAM' |
What is the sum of the laps with a grid less than 28, retirement time, and a ducati 1098 f08 bikes? | SELECT SUM(laps) FROM table_name_5 WHERE grid < 28 AND time = "retirement" AND bike = "ducati 1098 f08" |
What is the object class of the image with a bounding box of 0, 0, 135, 212? | SELECT T1.OBJ_CLASS FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.X = 0 AND T2.Y = 0 AND T2.W = 135 AND T2.H = 212 |
When the poll source is research 2000/daily kos, what is the total number of dates administered? | SELECT COUNT(dates_administered) FROM table_16751596_13 WHERE poll_source = "Research 2000/Daily Kos" |
state the open year of branch id 3? | SELECT Open_year FROM branch WHERE Branch_ID = 3 |
For all players who becomes coach after retirement, state the given name of coach and which teams and years did they coach? | SELECT DISTINCT T2.nameGiven, T3.name, T3.year FROM Coaches AS T1 INNER JOIN Master AS T2 ON T2.coachID = T1.coachID INNER JOIN Teams AS T3 ON T1.lgID = T3.lgID WHERE T2.playerID IS NOT NULL AND T2.coachID IS NOT NULL |
Which country has the most players in the Hall of Fame? | SELECT T1.birthCountry FROM Master AS T1 INNER JOIN HOF AS T2 ON T1.hofID = T2.hofID GROUP BY T1.birthCountry ORDER BY COUNT(T1.playerID) DESC LIMIT 1 |
what is the finish when the manager is tom kotchman and the record is 40-36? | SELECT finish FROM table_name_50 WHERE manager = "tom kotchman" AND record = "40-36" |
On what date was Game 1? | SELECT date FROM table_name_54 WHERE game = "game 1" |
What is To Par, when Place is "T9", and when Player is "Lee Trevino"? | SELECT to_par FROM table_name_23 WHERE place = "t9" AND player = "lee trevino" |
How many polling percentages were there in October 2008 when is was 30.8% in Aug 2008? | SELECT COUNT(oct_2008) FROM table_23680576_2 WHERE aug_2008 = "30.8%" |
In the papers classified as ML, how many cited butz01algorithmic? | SELECT COUNT(T1.paper_id) FROM paper AS T1 INNER JOIN cites AS T2 ON T1.paper_id = T2.citing_paper_id WHERE T1.class_label = 'ML' AND T2.cited_paper_id = 'butz01algorithmic' |
Among all the residential areas in Arecibo county, what is the zip_code of the one with the highest white population? | SELECT T1.zip_code FROM zip_data AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T2.county = 'ARECIBO' ORDER BY T1.white_population DESC LIMIT 1 |
What is zip code of customer with first name as Carole and last name as Bernhard? | SELECT T2.zip_postcode FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = "Carole" AND T1.last_name = "Bernhard" |
What is the rating and category of the podcast entitled Sitcomadon? | SELECT DISTINCT T3.rating, T1.category FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id INNER JOIN reviews AS T3 ON T3.podcast_id = T2.podcast_id WHERE T2.title = 'Sitcomadon' |
List the creation year, name and budget of each department. | SELECT creation , name , budget_in_billions FROM department |
Which events id does not have any participant with detail 'Kenyatta Kuhn'? | SELECT event_id FROM EVENTS EXCEPT SELECT T1.event_id FROM Participants_in_Events AS T1 JOIN Participants AS T2 ON T1.Participant_ID = T2.Participant_ID WHERE Participant_Details = 'Kenyatta Kuhn' |
Name the sex ratio lowest for population 4773138 | SELECT MAX(sex_ratio) FROM table_231623_3 WHERE population = 4773138 |
What is the highest salary among each team? List the team name, id and maximum salary. | SELECT T1.name , T1.team_id , max(T2.salary) FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id; |
What is the product description that matches that product ID? | SELECT T2.product_description FROM products_booked AS T1 JOIN products_for_hire AS T2 ON T1.product_id = T2.product_id WHERE T1.booked_amount = 102.76 |
List out patient names with calcium deficiency. | SELECT DISTINCT T1.first, T1.last FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Calcium' AND T2.VALUE < 8.6 |
What is the biggest discount among all orders for the part "burnished seashell gainsboro navajo chocolate"? | SELECT MAX(T1.l_discount) FROM lineitem AS T1 INNER JOIN part AS T2 ON T1.l_partkey = T2.p_partkey WHERE T2.p_name = 'burnished seashell gainsboro navajo chocolate' |
What is the highest region number with a 499 population? | SELECT MAX(region) FROM table_name_10 WHERE population = 499 |
What was the date of the game that had a decision of wall? | SELECT date FROM table_name_41 WHERE decision = "wall" |
Please name one attribute that business number 2 does not have. | SELECT T1.attribute_name FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T2.attribute_value LIKE 'none' LIMIT 1 |
How many menu items were created on 28th March 2011? | SELECT COUNT(*) FROM MenuItem WHERE created_at LIKE '2011-03-28%' |
What years did the Buick Skylark 320 get in production? | SELECT T2.model_year FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'buick skylark 320' |
What is the 17th c. pronunciation when the british is əʊ? | SELECT 17 AS th_c FROM table_name_68 WHERE british = "əʊ" |
Who was sent to the third island in week 1? | SELECT member FROM table_11764007_2 WHERE week_sent_to_third_island = "1" |
How many words are repeated on the Llista de conflictes armats page? | SELECT occurrences FROM pages_words WHERE pid = ( SELECT pid FROM pages WHERE title = 'Llista de conflictes armats' ) |
What are the nationalities that are shared by at least two people? | SELECT Nationality FROM people GROUP BY Nationality HAVING COUNT(*) >= 2 |
Find the id of the order which is shipped most recently. | SELECT order_id FROM shipments WHERE shipment_date = (SELECT max(shipment_date) FROM shipments) |
What is the FIS Nordic World Ski Championship years when the winter Olympics took place in 1968? | SELECT fis_nordic_world_ski_championships FROM table_name_93 WHERE winter_olympics = 1968 |
List the wheels and locations of the railways. | SELECT Wheels , LOCATION FROM railway |
what is the nationality of journalist ID 1 | select Nationality from journalist where journalist_ID = 1 |
What place had a score of 73-69-68=210? | SELECT place FROM table_name_86 WHERE score = 73 - 69 - 68 = 210 |
Who has a reported death of 6 march 1998? | SELECT name FROM table_name_63 WHERE reported_death_date = "6 march 1998" |
What label has a catalog of chem036cd? | SELECT label FROM table_name_2 WHERE catalog = "chem036cd" |
Who directed the eula goodnight movie after 1949? | SELECT director FROM table_name_97 WHERE year > 1949 AND role = "eula goodnight" |
Name the year for donlavey racing bill davis racing | SELECT year FROM table_2181798_1 WHERE team_s_ = "Donlavey Racing Bill Davis Racing" |
Which Opponent has a Date of march 16? | SELECT opponent FROM table_name_42 WHERE date = "march 16" |
Show customer ids who don't have an account. | SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Accounts |
What percentage of books written by Hirohiko make up the number of books published by Viz Media? | SELECT CAST(SUM(CASE WHEN T1.author_name = 'Hirohiko Araki' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM author AS T1 INNER JOIN book_author AS T2 ON T2.author_id = T1.author_id INNER JOIN book AS T3 ON T3.book_id = T2.book_id INNER JOIN publisher AS T4 ON T4.publisher_id = T3.publisher_id WHERE T4.publisher_name = 'VIZ Media' |
How many scientists are there? | SELECT count(*) FROM scientists |
What are the names of the two volumes that spend 3.0 weeks on top? | What do you mean by names? | I am sorry - what are the songs of the two volumes that spent 3.0 weeks on top? | select song from volume where weeks_on_top = 3.0 |
What is the description, code and the corresponding count of each service type? | SELECT T1.Service_Type_Description , T2.Service_Type_Code , COUNT(*) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T2.Service_Type_Code |
With a draw greater than 11 and the place smaller than 4 what was the televote? | SELECT televote FROM table_name_96 WHERE draw > 11 AND place < 4 |
Who was the runner-up, when the champion was Björn Borg after 1978? | SELECT runner_up FROM table_name_66 WHERE champion = "björn borg" AND year > 1978 |
Which Class has Laps of 31? | SELECT class FROM table_name_74 WHERE laps = 31 |
What is the difference between the events of device number -9222956879900150000 that can be located and those that are unable to be located? | SELECT SUM(IIF(latitude != 0 AND longitude != 0, 1, 0)) - SUM(IIF(latitude = 0 AND longitude = 0, 1, 0)) AS diff FROM events WHERE device_id = '-922956879900150000' |
Show all the distinct buildings that have faculty rooms. | SELECT DISTINCT building FROM Faculty |
what is the percentage for john kerry and dates administered is april 22, 2008? | SELECT democrat AS :_john_kerry FROM table_16751596_5 WHERE dates_administered = "April 22, 2008" |
races held after 2017 in spain circuits | SELECT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = "Spain" AND T1.year > 2017 |
Where was the fight that lasted 3 rounds and was won or loss by a decision? | SELECT location FROM table_name_65 WHERE round = 3 AND method = "decision" |
what is the enroll grade of 324257 | SELECT ENROLL_GRADE from ENROLL where STU_NUM = 324257 |
What are the start and end dates for incidents with incident type code "NOISE"? | SELECT date_incident_start , date_incident_end FROM Behavior_Incident WHERE incident_type_code = "NOISE" |
what is the city population of Attock District | SELECT City_Population FROM district where Headquartered_City = "Attock City" |
what is the maximum age for all people | SELECT max ( age ) FROM people |
What is the highest grossing movie without a song? | SELECT T1.movie_title FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T2.movie_title = T1.movie_title WHERE T2.song IS NULL ORDER BY CAST(REPLACE(trim(T1.total_gross, '$'), ',', '') AS REAL) DESC LIMIT 1 |
Name the status for unemployment rate being 6.7% | SELECT status FROM table_22815568_12 WHERE unemployment_rate = "6.7%" |
What is the date of the Cubs game when the Cubs had a record of 1-0? | SELECT date FROM table_name_2 WHERE record = "1-0" |
What is the transaction type code of transaction id 2? | SELECT t2.transaction_type_code FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE t2.transaction_id = 2 |
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 |
What is the Airline when the notes show aoc 135? | SELECT airline FROM table_name_51 WHERE notes = "aoc 135" |
What is the points when the try bonus is 1? | SELECT points_for FROM table_name_83 WHERE try_bonus = "1" |
Who had the fastest lap in the races won by Max Papis? | SELECT fastest_lap FROM table_11056278_3 WHERE winning_driver = "Max Papis" |
What are the minimum and maximum crime rate of counties? | SELECT MIN(Crime_rate), MAX(Crime_rate) FROM county_public_safety |
What is the name of the episode in which Jenn is eliminated? | SELECT episode_title FROM table_1272844_2 WHERE eliminated = "Jenn" |
What is the nationality of the player from UCLA? | SELECT nationality FROM table_name_4 WHERE school_club_team = "ucla" |
What was Johnny Rutherford's fastest lap while Al Unser was the pole position? | SELECT fastest_lap FROM table_10527215_3 WHERE winning_driver = "Johnny Rutherford" AND pole_position = "Al Unser" |
Which assets did not incur any fault log? List the asset model. | SELECT asset_model FROM Assets WHERE asset_id NOT IN (SELECT asset_id FROM Fault_Log) |
How many faculty members have 20 years of experience? | SELECT COUNT(designation) FROM table_17384764_1 WHERE experience = "20 years" |
What is the team with at least 2 technicians? | SELECT Team FROM technician GROUP BY Team HAVING COUNT(*) >= 2 |
Give id of the instructor who advises students in the History department. | SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id = T2.id WHERE T2.dept_name = 'History' |
What country does Ryanair belong to? | SELECT country FROM airlines WHERE name = "Ryanair" |
What is Kyle's id? | SELECT ID FROM Highschooler WHERE name = "Kyle" |
Subsets and Splits