sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
what is the 3-dart average of raymond van barneveld | SELECT 3 AS _dart_average FROM table_20301877_2 WHERE player = "Raymond van Barneveld" |
What's the agregation method for the indicator whose value is 133 in 1960 for the Arab World? | SELECT T2.AggregationMethod FROM Indicators AS T1 INNER JOIN Series AS T2 ON T1.IndicatorName = T2.IndicatorName INNER JOIN Country AS T3 ON T1.CountryCode = T3.CountryCode WHERE T3.ShortName = 'Arab World' AND T1.Value = 133 AND T1.Year = 1960 |
Which driver's grid is 6? | SELECT driver FROM table_name_79 WHERE grid = "6" |
What non-English American film/s has received the lowest user ratings? Mention the movie's I.D. | SELECT T2.movieid FROM movies AS T1 INNER JOIN u2base AS T2 ON T1.movieid = T2.movieid WHERE T1.isEnglish = 'F' AND T1.country = 'USA' ORDER BY T2.rating LIMIT 1 |
What country is ranked 79? | SELECT country FROM table_name_19 WHERE rank = 79 |
Which region was on June 8, 2004? | SELECT region FROM table_name_7 WHERE date = "june 8, 2004" |
List the name of artworks whose type is not "Program Talent Show". | SELECT Name FROM artwork WHERE TYPE != "Program Talent Show" |
Give the number of device models for "中兴" phone brand. | SELECT COUNT(device_id) FROM phone_brand_device_model2 WHERE device_model = '中兴' |
How many points have an Engine of ferrari tipo 033 v6 tc, and a Year larger than 1987? | SELECT SUM(pts) FROM table_name_37 WHERE engine = "ferrari tipo 033 v6 tc" AND year > 1987 |
List the title of all Cartoons showed on TV Channel with series name "Sky Radio". | SELECT T2.Title FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T1.series_name = "Sky Radio" |
Alright! Can you now show me his checking account balance? | SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid where T1.name = "Weeks" |
What is the name of the community with an area of 30.75 sq. km.? | SELECT official_name FROM table_171361_1 WHERE area_km_2 = "30.75" |
Describe the full names, emails and intelligence of the students with the highest capability and salary. | SELECT f_name, l_name, email, intelligence FROM student WHERE student_id IN ( SELECT student_id FROM RA WHERE salary = 'high' AND capability = ( SELECT MAX(capability) FROM RA ) ) |
What is the average pick # from the Quebec Major Junior Hockey League player Samuel Carrier? | SELECT AVG(pick__number) FROM table_name_11 WHERE league_from = "quebec major junior hockey league" AND player = "samuel carrier" |
Tell me the version for 1940-45 | SELECT version FROM table_name_71 WHERE year = "1940-45" |
How many sales people are handling all the customers? | SELECT COUNT(EmployeeID) FROM Employees |
How much higher in percentage does the word "grec" occur on the page titled "Àbac" than on the page titled "Astronomia"? | SELECT CAST((SUM(CASE WHEN T3.title = 'Àbac' THEN T2.occurrences END) - SUM(CASE WHEN T3.title = 'Astronomia' THEN T2.occurrences END)) AS REAL) * 100 / SUM(CASE WHEN T3.title = 'Astronomia' THEN T2.occurrences END) FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid INNER JOIN pages AS T3 ON T2.pid = T3.pid WHERE T1.word = 'grec' |
What is the sum of budgets of the Marketing and Finance departments? | SELECT sum(budget) FROM department WHERE dept_name = 'Marketing' OR dept_name = 'Finance' |
What is 1st Leg, when Team 1 is "Makedonija"? | SELECT 1 AS st_leg FROM table_name_52 WHERE team_1 = "makedonija" |
Which label has the catalog CDZAP22? | SELECT label FROM table_name_65 WHERE catalog = "cdzap22" |
Which October is the lowest one that has an Opponent of washington capitals? | SELECT MIN(october) FROM table_name_38 WHERE opponent = "washington capitals" |
Name the most bronze for silver more than 6 and total less than 127 with gold less than 11 | SELECT MAX(bronze) FROM table_name_17 WHERE silver > 6 AND total < 127 AND gold < 11 |
What is the sum of wins for teams with against under 1067? | SELECT SUM(wins) FROM table_name_16 WHERE against < 1067 |
What is the highest to par that is less than 153 | SELECT MAX(to_par) FROM table_name_54 WHERE total < 153 |
Who was the artist for the album, Christmas under the reunion label with the guitar? | SELECT artist FROM table_name_67 WHERE label = "reunion" AND credit = "guitar" AND album = "christmas" |
How many total credits are offered by each department? | SELECT sum(credits) , dept_name FROM course GROUP BY dept_name |
Show the names of players coached by the rank 1 coach. | SELECT T3.Player_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID WHERE T2.Rank = 1 |
How many matches in 2009 had win margins of less than 10? | SELECT COUNT(Match_Id) FROM `Match` WHERE Match_Date LIKE '2009%' AND Win_Margin < 10 |
On which award show was Bad Girls nominated for Most Popular Drama in 2004? | SELECT award_show FROM table_name_66 WHERE year = 2004 AND category = "most popular drama" |
What are the opening and closing time of business id 1 for day id 2? | SELECT opening_time, closing_time FROM Business_Hours WHERE business_id = 1 AND day_id = 2 |
how many time was points 6675? | SELECT COUNT(points) AS won FROM table_26218783_7 WHERE points = 6675 |
What is the average year in which the finish position was 13th? | SELECT AVG(year) FROM table_name_30 WHERE position = "13th" |
What is the fewest number of points for clubs with less than 2 draws and more than 8 matches played? | SELECT MIN(points) FROM table_name_38 WHERE drawn < 2 AND played > 8 |
What gas station is the oldest one based on open year | Which kind of information about this gas station do you want? | Which gas station location is the oldest based on its open year. | SELECT Location from gas_station order by open_year limit 1 |
What is the most frequently ordered product? Tell me the detail of the product | SELECT t2.product_details FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY count(*) DESC LIMIT 1 |
Around what time frame release a Sampling Rate of 12-bit 40khz? | SELECT SUM(release_date) FROM table_name_63 WHERE sampling_rate = "12-bit 40khz" |
How many faculty members participate in an activity? | SELECT COUNT(DISTINCT FacID) FROM Faculty_participates_in |
What upper middle income country under East Asia & Pacific region which covers the topic about Social Protection & Labor: Migration
? Indicate the short name of the said country. | SELECT DISTINCT T1.ShortName FROM Country AS T1 INNER JOIN footnotes AS T2 ON T1.CountryCode = T2.CountryCode INNER JOIN Series AS T3 ON T2.Seriescode = T3.SeriesCode WHERE T1.IncomeGroup = 'Upper middle income' AND T1.Region = 'East Asia & Pacific' AND T3.Topic = 'Social Protection & Labor: Migration' |
Find the distinct ages of students who have secretary votes in the fall election cycle. | SELECT DISTINCT T1.Age FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Secretary_Vote WHERE T2.Election_Cycle = "Fall" |
How many films are categorized as horror? | SELECT COUNT(T1.film_id) FROM film_category AS T1 INNER JOIN category AS T2 ON T1.category_id = T2.category_id WHERE T2.name = 'Horror' |
Name the college that has an overall larger than 187 and a round smaller than 7 for the defensive end position. | SELECT college FROM table_name_46 WHERE overall > 187 AND round < 7 AND position = "defensive end" |
What was the method of fight completion for the Mars: Attack 1 event? | SELECT method FROM table_name_4 WHERE event = "mars: attack 1" |
How many kinds of different ratings are listed? | SELECT COUNT(DISTINCT rating) FROM film |
Provide the number of orders by Daisey Lamball in 2021. | SELECT COUNT(*) FROM cust_order AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'Daisey' AND T2.last_name = 'Lamball' AND STRFTIME('%Y', T1.order_date) = '2021' |
Describe the ordered products which were the most overdue from required date. | SELECT DISTINCT T3.ProductName FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE DATEDIFF(T1.ShippedDate, T1.RequiredDate) < 0 |
What is the full name of players origin from Finland? | SELECT DISTINCT firstName, lastName FROM Master WHERE birthCountry = 'Finland' |
Which City has the Bahawalpur Stags Team? | SELECT city FROM table_name_98 WHERE team = "bahawalpur stags" |
Return the text of tweets about the topic 'intern'. | SELECT text FROM tweets WHERE text LIKE '%intern%' |
Which Total has a Nation of united states, and a Bronze larger than 3? | SELECT MAX(total) FROM table_name_4 WHERE nation = "united states" AND bronze > 3 |
How many figures are provided for December 28 for Rosario? | SELECT COUNT(december_28) FROM table_29217650_1 WHERE movies = "Rosario" |
Who was the Centerfold Model on 9-03? | SELECT centerfold_model FROM table_name_79 WHERE date = "9-03" |
Find the the customer details and id for the customers who had more than one policy. | SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.Customer_id GROUP BY T1.customer_id HAVING count(*) > 1 |
What is the total number of silver medals of the nation with more than 16 total medals? | SELECT COUNT(silver) FROM table_name_40 WHERE total > 16 |
What is the height associated with Paraguay? | SELECT height__ft_ FROM table_25461827_2 WHERE country = "Paraguay" |
what is the reported birth date when the reported age is 110 years, 185 days? | SELECT reported_birth_date FROM table_name_58 WHERE reported_age = "110 years, 185 days" |
What date was the game at Dowdy-Ficklen stadium • Greenville, NC, with 27,321 in attendance? | SELECT date FROM table_name_96 WHERE site = "dowdy-ficklen stadium • greenville, nc" AND attendance = "27,321" |
What is the Winning score on oct 22, 2000? | SELECT winning_score FROM table_name_93 WHERE date = "oct 22, 2000" |
How many services are there? | SELECT count(*) FROM services |
Among the users who are trailists when rating the movie "When Will I Be Loved", how many of them have rated "1" on the movie? | SELECT COUNT(T1.user_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'When Will I Be Loved' AND T1.rating_score = 1 AND T1.user_trialist = 1 |
Which Cashes has a Match Play smaller than 13, and a Events of 7? | SELECT COUNT(cashes) FROM table_name_97 WHERE match_play < 13 AND events = 7 |
How many bids does Atlantic 10 have? | SELECT _number_of_bids FROM table_name_98 WHERE conference = "atlantic 10" |
Which Name had the Rank, 15? | SELECT name FROM table_name_54 WHERE rank = 15 |
What is the title of episode 155 in the series? | SELECT title FROM table_27988540_1 WHERE no_in_series = 155 |
How many rebounds per game did Andrej Džaković average when playing 35 minutes per game? | SELECT rebounds_per_game FROM table_28547289_1 WHERE minutes_per_game = "35" |
What are the names of reviewers who had rated 3 star and 4 star? | SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars = 3 INTERSECT SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars = 4 |
Which winery is the wine that has the highest score from? | SELECT Winery FROM WINE ORDER BY SCORE DESC LIMIT 1 |
which poll source does the highest oppose rate come from? | SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1 |
What is the university ID of the university with the largest student staff ratio? | SELECT university_id FROM university_year ORDER BY student_staff_ratio DESC LIMIT 1 |
For how many years was the location at Beijing? | SELECT SUM(year) FROM table_name_7 WHERE location = "beijing" |
How many orders were delivered in 2021? | SELECT COUNT(*) FROM order_status AS T1 INNER JOIN order_history AS T2 ON T1.status_id = T2.status_id WHERE T1.status_value = 'Delivered' AND STRFTIME('%Y', T2.status_date) = '2021' |
Show the names of members in ascending order of their rank in rounds. | SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID ORDER BY Rank_in_Round ASC |
What is Notes, when Year is "2010"? | SELECT notes FROM table_name_96 WHERE year = 2010 |
List the full name of the customer who purchased the most quantity of products. | SELECT T1.FirstName, T1.LastName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID ORDER BY T2.Quantity DESC LIMIT 1 |
List the project details of the projects with the research outcome described with substring 'published'. | SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code = T3.outcome_code WHERE T3.outcome_description LIKE '%Published%' |
Which weather station does store no.20 belong to? | SELECT station_nbr FROM relation WHERE store_nbr = 20 |
When is the original airing on channel 4 with being alive as the title? | SELECT original_airing_on_channel_4 FROM table_22170495_6 WHERE title = "Being Alive" |
Which city does the customer who finished transaction no.103545 live in? | SELECT T1.City FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.TransactionID = 103545 |
What school did the forward whose number is 10 belong to? | SELECT school_club_team_country FROM table_11734041_2 WHERE no_s_ = "10" AND position = "Forward" |
List the level of education and income of customers ages from 30 to 55 with a true response. | SELECT T1.EDUCATIONNUM, T3.INCOME_K FROM Customers AS T1 INNER JOIN Mailings1_2 AS T2 ON T1.ID = T2.REFID INNER JOIN Demog AS T3 ON T1.GEOID = T3.GEOID WHERE T1.age >= 30 AND T1.age <= 55 AND T2.RESPONSE = 'true' |
Of the matches that were won by runs by team 1, what percentage have team 1 won the toss and decided to field? | SELECT CAST(COUNT(CASE WHEN T1.Team_1 = T1.Match_Winner = T1.Toss_Winner THEN 1 ELSE 0 END) AS REAL) * 100 / TOTAL(T1.Team_1) FROM `Match` AS T1 INNER JOIN Win_By AS T2 ON T1.Win_Type = T2.Win_Id INNER JOIN Toss_Decision AS T3 ON T1.Toss_Decide = T3.Toss_Id WHERE T3.Toss_Name = 'field' AND T2.Win_Type = 'runs' |
display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara excluding Clara. | SELECT first_name , last_name , hire_date FROM employees WHERE department_id = ( SELECT department_id FROM employees WHERE first_name = "Clara") AND first_name != "Clara" |
Find the difference between the average royalty of titles published by US and non US publishers? | SELECT (CAST(SUM(CASE WHEN T2.country = 'USA' THEN T1.royalty ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.country = 'USA' THEN 1 ELSE 0 END)) - (CAST(SUM(CASE WHEN T2.country != 'USA' THEN T1.royalty ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.country != 'USA' THEN 1 ELSE 0 END)) FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id INNER JOIN roysched AS T3 ON T1.title_id = T3.title_id |
List the software platform shared by the greatest number of devices. | SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1 |
what's the saturday time with wednesday being 10:00-5:00 | SELECT saturday FROM table_11019212_1 WHERE wednesday = "10:00-5:00" |
What Social AO has an External CO of elena buscher, and a President of harm van leeuwen? | SELECT social_ao FROM table_name_39 WHERE external_co = "elena buscher" AND president = "harm van leeuwen" |
Count the number of rooms that are not in the Lamberton building. | SELECT count(*) FROM classroom WHERE building != 'Lamberton' |
Wat is the tax source system code and master customer id of the taxes related to each parking fine id? | SELECT T1.source_system_code , T1.master_customer_id , T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Parking_Fines AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id |
What is Win-Loss, when Win % is .456? | SELECT win_loss FROM table_name_60 WHERE win__percentage = ".456" |
What was the score for the game on February 29? | SELECT score FROM table_name_10 WHERE date = "february 29" |
What is the area of Mangamahu primary school? | SELECT area FROM table_name_54 WHERE name = "mangamahu primary school" |
What team was he on when he had 10 f/laps? | SELECT team FROM table_24491017_1 WHERE f_laps = 10 |
What is the mintage of the coin with a Toronto Maple Leafs theme and an issue price below 24.95? | SELECT mintage FROM table_name_76 WHERE theme = "toronto maple leafs" AND issue_price < 24.95 |
Who did the Jets play in the Meadowlands on week 14? | SELECT opponent FROM table_name_46 WHERE game_site = "the meadowlands" AND week = 14 |
what is stations' total passengers? | Do you mean sum of total passengers in all stations? | yes | SELECT sum ( Total_Passengers ) FROM station |
Which wine products have the highest average price? | Do you mean which grape whose wine products has the highest average price? | Yes, Which grapes are in the wine products that have 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 |
What host has an original air date of june 11, 2007? | SELECT host FROM table_name_11 WHERE original_airdate = "june 11, 2007" |
Find the id of the appointment with the most recent start date? | SELECT appointmentid FROM appointment ORDER BY START DESC LIMIT 1 |
What is the episode that has mafia keyword? | SELECT T1.episode FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T2.Keyword = 'mafia' |
Please list the occupations of the customers with an education level of 11. | SELECT DISTINCT OCCUPATION FROM Customers WHERE EDUCATIONNUM = 11 |
what is the most silver when bronze is more than 0, total is more than 1, gold is more than 0 and the nation is china (chn)? | SELECT MAX(silver) FROM table_name_62 WHERE bronze > 0 AND total > 1 AND gold > 0 AND nation = "china (chn)" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.