sentence
stringlengths
3
347
sql
stringlengths
18
804
What was the playoff advancement during the year 1998?
SELECT playoffs FROM table_1570003_2 WHERE year = 1998
Who is riding the Ducati 999 RS in Round 7?
SELECT rider FROM table_name_31 WHERE rounds = "7" AND motorcycle = "ducati 999 rs"
When was episode 2x11 aired for the first time?
SELECT first_broadcast FROM table_19930660_2 WHERE episode = "2x11"
What is the bowling skill of SC Ganguly?
SELECT T1.Bowling_Skill FROM Bowling_Style AS T1 INNER JOIN Player AS T2 ON T2.Bowling_skill = T1.Bowling_Id WHERE T2.Player_Name = 'SC Ganguly'
What was the score of the game with a loss of Mercedes (0-1)?
SELECT score FROM table_name_47 WHERE loss = "mercedes (0-1)"
What are the names and distances of aircraft that have more than 5000 distance and there are at least 5 people who 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 animal type allergies exist?
SELECT count(*) FROM Allergy_type WHERE allergytype = "animal"
What is the credit rating of the company whose average lead time is 16 days for a standard price of 18.9900 and whose last receipt date is August 27, 2011?
SELECT T2.CreditRating FROM ProductVendor AS T1 INNER JOIN Vendor AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.StandardPrice = 18.9900 AND T1.AverageLeadTime = 16 AND STRFTIME('%Y-%m-%d', T1.LastReceiptDate) = '2011-08-27'
Please list all album titles in alphabetical order.
SELECT Title FROM ALBUM ORDER BY Title
What is the total number of Lane, when Mark is "7.93", and when React is less than 0.145?
SELECT COUNT(lane) FROM table_name_8 WHERE mark = 7.93 AND react < 0.145
Which FA Cup has a Total smaller than 1?
SELECT AVG(fa_cup) FROM table_name_24 WHERE total < 1
Which company launched in 1996 and has a Hanzi of 凤凰卫视中文台?
SELECT name FROM table_name_36 WHERE launch = "1996" AND hanzi = "凤凰卫视中文台"
Which Make has a Pos of 3?
SELECT make FROM table_name_58 WHERE pos = 3
When did series 6 start?
SELECT start_date FROM table_24057191_2 WHERE series = 6
and can you tell me the name of that product?
SELECT name from products where price = ( select min ( Price ) FROM Products )
What is the score in the 6 atlas stones event of the player who got 2 (6 in 30.89s) in the 3 dead lift event?
SELECT COUNT(event_6_atlas_stones) FROM table_24302700_6 WHERE event_3_dead_lift = "2 (6 in 30.89s)"
Who is the home team for the stadium located in Berlin?
SELECT home_team FROM table_name_73 WHERE state = "berlin"
What is the name of campus with id 19?
SELECT distinct T1.Campus FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t2.Campus = 19
Name the points won for 1230
SELECT points AS won FROM table_23501776_16 WHERE points = 1230
What are all the names of the customers? | Did you mean customer details in the table? | Yes
SELECT customer_details FROM customers
What was Lambert's song choice in the top 13?
SELECT song_choice FROM table_21501511_1 WHERE week__number = "Top 13"
How many clubs have players with the position "Right Wing"?
SELECT count ( * ) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T2.Position = "Right Wing"
What is the difference between average glucose reading for patients in the 20s and 50s?
SELECT SUM(CASE WHEN ROUND((strftime('%J', T2.DATE) - strftime('%J', T1.birthdate)) / 365) BETWEEN 20 AND 30 THEN T2.VALUE ELSE 0 END) / COUNT(CASE WHEN ROUND((strftime('%J', T2.DATE) - strftime('%J', T1.birthdate)) / 365) BETWEEN 20 AND 30 THEN T2.PATIENT END) - SUM(CASE WHEN ROUND((strftime('%J', T2.DATE) - strftime('%J', T1.birthdate)) / 365) BETWEEN 50 AND 60 THEN T2.VALUE ELSE 0 END) / COUNT(CASE WHEN ROUND((strftime('%J', T2.DATE) - strftime('%J', T1.birthdate)) / 365) BETWEEN 50 AND 60 THEN T2.PATIENT END) AS difference FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Glucose'
What years show Model of 2.0 tdi (cr) dpf?
SELECT years FROM table_name_62 WHERE model = "2.0 tdi (cr) dpf"
Where was the game played when 71,060 people attended?
SELECT game_site FROM table_name_31 WHERE attendance = "71,060"
How much Vitamin A is in Sherry beef?
SELECT T2.vitamin_a FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.title = 'Sherried Beef'
How many bronze medals for the nation with less than 1 total?
SELECT MAX(bronze) FROM table_name_79 WHERE total < 1
how about the rooms that do not have any reservations ?
SELECT avg ( beds ) FROM rooms WHERE roomid NOT IN ( SELECT DISTINCT room FROM reservations )
who is Toonmax owner? | Did you want the owner of the program named Toonmax? | yes
SELECT owner from program where name = "Toonmax"
For upper Arlington, what was the median household income?
SELECT median_house__hold_income FROM table_1840495_2 WHERE place = "Upper Arlington"
How many distinct kinds of injuries happened after season 2010?
SELECT count(DISTINCT T1.injury) FROM injury_accident AS T1 JOIN game AS T2 ON T1.game_id = T2.id WHERE T2.season > 2010
WHAT IS THE PLAYER WITH 287?
SELECT player FROM table_name_26 WHERE total = 287
What is the lowest Grid for jj lehto with over 51 laps?
SELECT MIN(grid) FROM table_name_81 WHERE laps > 51 AND driver = "jj lehto"
Which episode number drew in 3.84 million viewers in the U.S.?
SELECT MAX(series__number) FROM table_14929574_3 WHERE us_viewers__million_ = "3.84"
What is every score at the location of Verizon Center and points of 68?
SELECT score FROM table_23486853_8 WHERE location = "Verizon Center" AND points = 68
Show the album names and ids for albums that contain tracks with unit price bigger than 1.
SELECT T1.Title , T2.AlbumID FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId WHERE T2.UnitPrice > 1 GROUP BY T2.AlbumID
Which Venue resulted in AUS by 229 runs?
SELECT venue FROM table_name_80 WHERE result = "aus by 229 runs"
list the salaries in ascending order
SELECT salary FROM Employee ORDER BY salary ASC
Find the total revenue of companies of each founder.
SELECT sum(revenue) , founder FROM manufacturers GROUP BY founder
List down the name of countries whereby English is their official language.
SELECT T1.Name FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'English' AND T2.IsOfficial = 'T'
Find the names and average salaries of all departments whose average salary is greater than 42000.
SELECT dept_name, AVG(salary) FROM instructor GROUP BY dept_name HAVING AVG(salary) > 42000
timothy truman worked on what dates
SELECT publication_dates FROM table_1420954_1 WHERE artist_s_ = "Timothy Truman"
What is the name of the marketing region that the store Rob Dinning belongs to?
SELECT T1.Marketing_Region_Name FROM Marketing_Regions AS T1 JOIN Stores AS T2 ON T1.Marketing_Region_Code = T2.Marketing_Region_Code WHERE T2.Store_Name = "Rob Dinning"
Among the patients with hypertension, what is the average of their diastolic blood pressure?
SELECT AVG(T1.VALUE) FROM observations AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient INNER JOIN conditions AS T3 ON T2.patient = T3.PATIENT WHERE T3.DESCRIPTION = 'Hypertension' AND T1.DESCRIPTION = 'Diastolic Blood Pressure'
What are the different ids and stop durations of all the drivers whose stop lasted longer than the driver in the race with the id 841?
SELECT DISTINCT driverid , STOP FROM pitstops WHERE duration > (SELECT min(duration) FROM pitstops WHERE raceid = 841)
How many students that are undergoing the pre-phase of qualification have advisors?
SELECT COUNT(T1.p_id_dummy) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.inPhase = 'Pre_Quals' AND T2.student = 1
What are the crime rates of counties that contain cities that have white percentages of over 90?
SELECT T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID WHERE T1.White > 90
What is the record of the Hartford Whalers home team with the April 13 game date?
SELECT record FROM table_name_7 WHERE home = "hartford whalers" AND date = "april 13"
Show the transaction type code that occurs the most frequently.
SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1
How many total miles recorded for the racer who finished in 1:05:33?
SELECT miles__km_ FROM table_17802778_1 WHERE race_time = "1:05:33"
Who is Team D when Carmen Ada is team C?
SELECT team_d FROM table_name_61 WHERE team_c = "carmen ada"
What is the average occurrence of the word "grec" on each Wikipedia page that has this word?
SELECT CAST(SUM(T2.occurrences) AS REAL) / COUNT(T1.wid) FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid WHERE T1.word = 'grec'
What are the order details of the products with price higher than 2000?
SELECT T1.Other_Item_Details FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_price > 2000
How many distinct nationalities are there?
SELECT count(DISTINCT Nationality) FROM people
What are the names of the states that have 2 to 4 employees living there?
SELECT T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.state_province_county HAVING count(*) BETWEEN 2 AND 4;
What student id corresponds to the oldest student?
SELECT StuID FROM Student WHERE age = (SELECT max(age) FROM Student)
Which network has bob costas as the studio host and darren pang as the ice level reporters?
SELECT network FROM table_22485543_1 WHERE studio_host = "Bob Costas" AND ice_level_reporters = "Darren Pang"
What is the district name for district id 15?
SELECT district_name from district where district_id = 15
What is the product that has the highest average rating from the mountain product line?
SELECT T2.Name FROM ProductReview AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T2.ProductLine = 'M' GROUP BY T2.Name ORDER BY CAST(SUM(T1.Rating) AS REAL) / COUNT(T1.ProductID) DESC LIMIT 1
What is the id and salary of the employee named Mark Young?
SELECT eid , salary FROM Employee WHERE name = 'Mark Young'
What is the Year 10 5th Quads with NC as Open 1st VIII and NC as a Year 10 3rd Quads?
SELECT year_10_5th_quad FROM table_name_16 WHERE open_1st_viii = "nc" AND year_10_3rd_quad = "nc"
Does the sky calcio 6 hd have PPV?
SELECT ppv FROM table_15887683_4 WHERE television_service = "Sky Calcio 6 HD"
Which Venue has Notes of 58.25 m, and a Competition of world championships?
SELECT venue FROM table_name_33 WHERE notes = "58.25 m" AND competition = "world championships"
What are the names of the stations which serve both "Ananthapuri Express" and "Guruvayur Express" trains?
SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id WHERE T3.Name = "Ananthapuri Express" INTERSECT SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id WHERE T3.Name = "Guruvayur Express"
What date does the Home team of Richmond have?
SELECT date FROM table_name_32 WHERE home_team = "richmond"
List the venues of debates in ascending order of the number of audience.
SELECT Venue FROM debate ORDER BY Num_of_Audience
How many years did player Id "healygl01" play?
SELECT COUNT(year) FROM Goalies WHERE playerID = 'healygl01'
What are the emails of the professionals living in either the state of Hawaii or the state of Wisconsin?
SELECT email_address FROM Professionals WHERE state = 'Hawaii' OR state = 'Wisconsin'
What are the name and id of the team with the most victories in 2008 postseason?
SELECT T2.name , T1.team_id_winner FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T1.year = 2008 GROUP BY T1.team_id_winner ORDER BY count(*) DESC LIMIT 1;
Show the average amount of transactions for different lots.
SELECT T2.lot_id , avg(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id
What is the average education level of customers from the place with the highest average income per month?
SELECT AVG(T1.EDUCATIONNUM) FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID ORDER BY T2.INCOME_K DESC LIMIT 1
What is the 1996 when the 1994 is A, the 2003 is A, and the 2001 is 1R?
SELECT 1996 FROM table_name_23 WHERE 1994 = "a" AND 2003 = "a" AND 2001 = "1r"
Among the customers, list customers' company names and addresses who paid more than average in freight.
SELECT DISTINCT T1.CompanyName, T1.Address FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Freight > ( SELECT AVG(Freight) FROM Orders )
Which highest wins number had Kawasaki as a team, 95 points, and a year prior to 1981?
SELECT MAX(wins) FROM table_name_9 WHERE team = "kawasaki" AND points = 95 AND year < 1981
User No."63469" has got "1" like for a tip to the Yelp business, which city is that business located in?
SELECT T1.city FROM Business AS T1 INNER JOIN Tips AS T2 ON T1.business_id = T2.business_id WHERE T2.likes = 1 AND T2.user_id = 63469
What is the name and salary for employee with id 242518965?
SELECT name, salary FROM Employee WHERE eid = 242518965
What object class is in the X and Y coordinates of 126 and 363?
SELECT T1.IMG_ID, T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.X = 126 AND T1.Y = 363
who is the builder of Object Number 1975-7006?
SELECT builder FROM railway WHERE ObjectNumber = "1975-7006"
Which ship was sunk at 01:00?
SELECT name_of_ship FROM table_name_96 WHERE fate = "sunk at" AND time = "01:00"
Show the names of aircrafts that are associated with both an airport named "London Heathrow" and an airport named "London Gatwick"
SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Heathrow" INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Gatwick"
What is Average Height, when Weight is less than 93, when Spike is less than 336, and when Block is 305?
SELECT AVG(height) FROM table_name_82 WHERE weight < 93 AND spike < 336 AND block = 305
Which team had the most same starting players througout the season? Give the full name of the team.
SELECT DISTINCT T1.tmID FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T2.GP = T2.GS
What is the percentage of player who won "All-Defensive First Team" from 1980 - 2000 is from 'NY'.
SELECT COUNT(DISTINCT T1.playerID) FROM players AS T1 INNER JOIN awards_players AS T2 ON T1.playerID = T2.playerID WHERE T1.birthState = 'NY' AND T2.award = 'All-Defensive First Team' AND T2.year BETWEEN 1980 AND 2000
Calculate the total profit made by chocolate floral blue coral cyan.
SELECT SUM(T3.l_extendedprice * (1 - T3.l_discount) - T2.ps_supplycost * T3.l_quantity) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN lineitem AS T3 ON T2.ps_partkey = T3.l_partkey AND T2.ps_suppkey = T3.l_suppkey WHERE T1.p_name = 'chocolate floral blue coral cyan'
What is the name of the grape whose wine products had the highest average price?
SELECT T1.Grape FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape GROUP BY T2.Grape ORDER BY AVG ( Price ) DESC LIMIT 1
Calculate the difference between the 2020 population and the 2010 population for the districts represented by Griffin Tim.
SELECT T1.population_2020 - T1.population_2010 FROM zip_data AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T2.district = T3.cognress_rep_id WHERE T3.first_name = 'Griffin' AND T3.last_name = 'Tim'
What is the lowest amount of draws with less than 12 wins and less than 30 played?
SELECT MIN(draws) FROM table_name_27 WHERE wins < 12 AND played < 30
In what Season was Colin Miller (TAS) the Player?
SELECT season FROM table_name_34 WHERE player = "colin miller (tas)"
What is the average population ratio of the countries in which organizations were established in 1947?
SELECT T1.Population / T1.Area FROM country AS T1 INNER JOIN organization AS T2 ON T1.Code = T2.Country WHERE STRFTIME('%Y', T2.Established) = '1947'
When καθ are the letters what is the nickname?
SELECT nickname FROM table_28436909_4 WHERE letters = "ΚΑΘ"
Find the id, forename and number of races of all drivers who have at least participated in two races?
SELECT T1.driverid , T1.forename , count(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING count(*) >= 2
What average drawn has a played greater than 42?
SELECT AVG(drawn) FROM table_name_21 WHERE played > 42
Which county's population is lowest?
SELECT county_name FROM county order by population asc limit 1
In Season 20 Episode 11, how many times was Doofus included in the credit list?
SELECT COUNT(*) FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T1.nickname = 'Doofus' AND T2.credited = 'true' AND T2.episode_id = 'S20-E11';
Who played Blackpool when Blackpool was at home?
SELECT away_team FROM table_name_2 WHERE home_team = "blackpool"
What type is the race with the vicenza to marostica course?
SELECT type FROM table_name_29 WHERE course = "vicenza to marostica"
What was the catalog when the label was frontiers records?
SELECT catalog FROM table_name_61 WHERE label = "frontiers records"
What are all the details of the organisations described as 'Sponsor'? Sort the result in an ascending order.
SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_type_description = 'Sponsor' ORDER BY organisation_details
can you show a list of order date?
SELECT order_date FROM customer_orders
What is the date of the match with Brother Elephants as the opponent and a save of ||4,117?
SELECT date FROM table_name_49 WHERE opponent = "brother elephants" AND save = "||4,117"