sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Tell me the scoring average for year less than 1998 and wins more than 3 | SELECT scoring_average FROM table_name_92 WHERE year < 1998 AND wins > 3 |
how about the most number of routes that an airline runs? | SELECT count ( * ) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.name ORDER BY count ( * ) DESC LIMIT 1 |
What is the D48 when D 43 is plurality ↑?? | SELECT d_48 FROM table_name_27 WHERE d_43 = "plurality ↑" |
What is the average Rank for a lane smaller than 3 with a nationality of Australia? | SELECT AVG(rank) FROM table_name_55 WHERE lane < 3 AND nationality = "australia" |
How many ends lost when skip is Kevin Koe and stolen ends are more than 6? | SELECT COUNT(ends_lost) FROM table_name_62 WHERE skip = "kevin koe" AND stolen_ends > 6 |
Which country's material was concrete when the span metres were less than 270, span feet is more than 837, and the year opened was 1943? | SELECT country FROM table_name_36 WHERE material = "concrete" AND span_metres < 270 AND span_feet > 837 AND year_opened = "1943" |
What is Winner, when Date is 5 Sep? | SELECT winner FROM table_name_43 WHERE date = "5 sep" |
How many courses were taught by more than 4 people? | SELECT COUNT(*) FROM ( SELECT COUNT(course_id) FROM taughtBy GROUP BY course_id HAVING COUNT(course_id) > 4 ) |
How many fourth places were there in 2003? | SELECT COUNT(fourth_place) FROM table_1149495_1 WHERE year = "2003" |
Who had the high rebounds in the game with a final score of w 140-108? | SELECT high_rebounds FROM table_17382360_9 WHERE score = "W 140-108" |
In which years cars were produced weighing no less than 3000 and no more than 4000 ? | select distinct year from cars_data where weight between 3000 and 4000; |
When Gary Player was the runner-up, what was the margin of victory? | SELECT margin_of_victory FROM table_name_28 WHERE runner_s__up = "gary player" |
Which students have allergies? | Do you want to return their first and last names or other info? | Just names | SELECT t2.fname , t2.lname FROM Has_allergy AS T1 JOIN Student as T2 on T1.StuID = T2.StuID |
How many interactions did Lorri Simons have with medical professionals between 2010 and 2017? What percentage of encounters are attributed to prenatal visits? | SELECT COUNT(T1.patient) , CAST(SUM(CASE WHEN T2.DESCRIPTION = 'Prenatal visit' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.patient) FROM patients AS T1 INNER JOIN encounters AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Lorri' AND T1.last = 'Simonis' AND strftime('%Y', T2.DATE) BETWEEN '2010' AND '2017' |
What are the student ids for students over 20 years old? | SELECT StuID FROM Student WHERE age > 20 |
How many singers are from each country? | SELECT country , count(*) FROM singer GROUP BY country |
How many documents are with document type code BK for each product id? | SELECT count(*) , project_id FROM Documents WHERE document_type_code = "BK" GROUP BY project_id |
What score has a to par greater than 15, money ($) greater than 116, with billy burke as the player? | SELECT score FROM table_name_81 WHERE to_par > 15 AND money___$__ > 116 AND player = "billy burke" |
Which Lead has Hans Frauenlob as a Third? | SELECT lead FROM table_name_62 WHERE third = "hans frauenlob" |
How many customers are named Charles in Sacramento? | SELECT COUNT(CustomerID) FROM customers WHERE First = 'Charles' AND City = 'Sacramento' |
What are the keywords of the least popular episode? | SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id ORDER BY T1.votes LIMIT 1; |
how many trips started from south van ness and ended at san fransisco | SELECT count ( * ) FROM station AS T1 JOIN trip AS T2 JOIN station AS T3 JOIN trip AS T4 ON T1.id = T2.start_station_id AND T2.id = T4.id AND T3.id = T4.end_station_id WHERE T1.city = "South Van Ness" AND T3.city = "San Fransisco" |
What is the distance for the 5 September race? | SELECT distance FROM table_name_69 WHERE date = "5 september" |
Name number first elected for tennessee 2? | SELECT COUNT(first_elected) FROM table_1341586_43 WHERE district = "Tennessee 2" |
what records have a score of l 109–116 2 ot | SELECT record FROM table_11964047_7 WHERE score = "L 109–116 2 OT" |
What Japanese show on NHK had average ratings of 9.2%? | SELECT japanese_title FROM table_name_26 WHERE tv_station = "nhk" AND average_ratings = "9.2%" |
What is the average rating of songs for each language? | SELECT avg(rating) , languages FROM song GROUP BY languages |
What's the white for a black of Anand, a result of ½–½, 39 moves, and an opening of d37 queen's gambit declined? | SELECT white FROM table_name_20 WHERE black = "anand" AND result = "½–½" AND moves = 39 AND opening = "d37 queen's gambit declined" |
What is the average number of students for schools with a pupil to teacher ratio of 25.1? | SELECT AVG(students) FROM table_name_25 WHERE pupil_teacher_ratio = 25.1 |
Among all the customers in Brazil, how many of them have an account balance of less than 1000? | SELECT COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T2.n_name = 'BRAZIL' AND T1.c_acctbal < 1000 |
List the Episode of all TV series sorted by rating. | SELECT Episode FROM TV_series ORDER BY rating |
How many of the legislators are female? | SELECT COUNT(gender_bio) FROM current WHERE gender_bio = 'F' |
Give customer No.106936's region name. | SELECT T3.r_name FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_nationkey = T2.c_nationkey INNER JOIN region AS T3 ON T1.n_regionkey = T3.r_regionkey WHERE T2.c_custkey = 106936 |
Which School's Mascot is Raiders? | SELECT school FROM table_name_28 WHERE mascot = "raiders" |
Which stage had tabriz petrochemical team in the team classification? | SELECT stage FROM table_name_68 WHERE team_classification = "tabriz petrochemical team" |
What is the earliest season that Pisico Bình ðinh is team 2? | SELECT MIN(season) FROM table_name_95 WHERE team_2 = "pisico bình ðinh" |
Name the most game for record 4-0 | SELECT MAX(game) FROM table_22815259_1 WHERE record = "4-0" |
List the names of buildings with at least 200 feet of height and with at least 20 floors. | SELECT name FROM building WHERE height_feet >= 200 AND floors >= 20 |
When was the outcome runner-up with a score of 4–6, 3–6? | SELECT date FROM table_name_49 WHERE outcome = "runner-up" AND score = "4–6, 3–6" |
What is listed for the Class that's got a Team of Cagiva and Points of 4? | SELECT class FROM table_name_17 WHERE team = "cagiva" AND points = 4 |
Who is the most valuable player in QMJHL league during the 2004-2005 season? | SELECT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON BETWEEN '2004' AND '2005' AND T1.LEAGUE = 'QMJHL' ORDER BY T1.P DESC LIMIT 1 |
What is the total number of byes when the wins were 9? | SELECT COUNT(byes) FROM table_name_59 WHERE wins = 9 |
What are the wines that have prices lower than 50 and have appelations in Monterey county? | SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = "Monterey" AND T2.price < 50 |
when was the loan ended when the country is ghana? | SELECT ended FROM table_name_37 WHERE country = "ghana" |
List the distinct names of the instructors, ordered by name. | SELECT DISTINCT name FROM instructor ORDER BY name |
What is the overall pick number that Derrick Harvey was when he was picked in a round after round 1? | SELECT MIN(overall) FROM table_name_26 WHERE name = "derrick harvey" AND round > 1 |
Which Radon has Atomic property of outer shell electron configuration? | SELECT radon FROM table_name_65 WHERE atomic_property = "outer shell electron configuration" |
What college did delray brooks go to? | SELECT college FROM table_name_23 WHERE player = "delray brooks" |
Which house has an abbreviation of D? | SELECT house FROM table_name_24 WHERE abbr = "d" |
Which college did the player who went to the Boston Patriots go to? | SELECT college FROM table_name_8 WHERE team = "boston patriots" |
What was the session at the circuit of lowes motor speedway? | SELECT session FROM table_name_70 WHERE circuit = "lowes motor speedway" |
What are the first and last names of all students with the sex "F"? | SELECT fname,lname FROM Student WHERE sex = "F" |
How many Liquidat (c) have a purpose of dual (machine & hand composition)? | SELECT COUNT(liquidat__) AS °c_ FROM table_name_94 WHERE purpose = "dual (machine & hand composition)" |
How many reviews made by user whose ID is 3 are long? | SELECT COUNT(review_length) FROM Reviews WHERE user_id = 3 AND review_length LIKE 'Long' |
what's the department with incumbent being enrique ona | SELECT department FROM table_1331313_1 WHERE incumbent = "Enrique Ona" |
Construction start of phase ii has what operation start? | SELECT operation_start FROM table_name_51 WHERE construction_start = "phase ii" |
list the first name and last name of students with grade A | SELECT T1.Fname, T1.Lname FROM STUDENT AS T1 JOIN Enrolled_in AS T2 ON T1.STUID = T2.STUID WHERE T2.GRADE = "A" |
After pick number 158, what is the next round a USC player was picked? | SELECT MIN(round) FROM table_name_20 WHERE school = "usc" AND pick > 158 |
What is the average price of cars with 8 cylinders? | SELECT AVG(T2.price) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.cylinders = 8 |
Which students in third grade are not taught by teacher COVIN JEROME? Give me the last names of the students. | SELECT DISTINCT T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 3 AND T2.firstname != "COVIN" AND T2.lastname != "JEROME" |
State the gender of users who use the device "-9222956879900150000". | SELECT gender FROM gender_age WHERE device_id = -9222956879900150000 |
What are the names of shops that do not have any devices in stock? | SELECT Shop_Name FROM shop WHERE Shop_ID NOT IN (SELECT Shop_ID FROM stock) |
What is Away Team, when Tie No is 4? | SELECT away_team FROM table_name_16 WHERE tie_no = "4" |
Which vocal type is the most frequently appearing type? | SELECT TYPE FROM vocals GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1 |
List the project details of the projects with the research outcome described with the 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%' |
What name has a qual 2 of 1:46.025? | SELECT name FROM table_name_33 WHERE qual_2 = "1:46.025" |
What is the Region that has a Total GDP (€ bn ) of €11,745.353? | SELECT region FROM table_name_58 WHERE total_gdp__€_bn__ = "€11,745.353" |
List down the districts belong to the country headed by Adolf Ogi. | SELECT T2.District FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = 'Adolf Ogi' |
When jordan fa cup is the tournament how many draws? | SELECT COUNT(draws) FROM table_2985714_2 WHERE tournament = "Jordan FA Cup" |
What were the air-dates of the episodes before episode 4 that had a BBC One weekly ranking of 6? | SELECT airdate FROM table_name_34 WHERE episode_no < 4 AND bbc_one_weekly_ranking = 6 |
Please show me the starting years for them | select Starting_Year from technician where Team = 'CLE' or team = 'CWS' |
Among papers that were published in 2005, provide the author name of paper with key words of "LOAD; IDE; SNP; haplotype; asso- ciation studies". | SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Year = 2005 AND T1.Keyword = 'KEY WORDS: LOAD IDE SNP haplotype asso- ciation studies' |
Name the average year for manly-warringah sea eagles | SELECT AVG(year) FROM table_name_13 WHERE opponent = "manly-warringah sea eagles" |
When 1 active, 1 inactive is the canadian chapters how many founding dates are there? | SELECT COUNT(founding_date) FROM table_28436909_4 WHERE canadian_chapters = "1 Active, 1 Inactive" |
What was the winning score when the runner-up was Beth Daniel and the margin of victory was 7 strokes? | SELECT winning_score FROM table_name_42 WHERE runner_s__up = "beth daniel" AND margin_of_victory = "7 strokes" |
What are the names of the wrestlers and their elimination times? | SELECT T1.Time,T2.name FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID |
What business category is the Yelp business which got the most 5 star reviews in? | SELECT T1.category_name FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id INNER JOIN Reviews AS T4 ON T3.business_id = T4.business_id WHERE T4.review_stars = 5 GROUP BY T1.category_name ORDER BY COUNT(T1.category_name) DESC LIMIT 1 |
Which air date has 5 for # in season? | SELECT airdate FROM table_name_50 WHERE _number_in_season = 5 |
Please list the names of all the suppliers for the part with the highest retail price. | SELECT T3.s_phone 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 WHERE T1.p_name = 'hot spring dodger dim light' ORDER BY T1.p_size DESC LIMIT 1 |
Which team won by wickets in match ID 335993? | SELECT T1.Team_Name FROM Team AS T1 INNER JOIN Match AS T2 ON T1.team_id = T2.match_winner INNER JOIN Player_Match AS T3 ON T1.Team_Id = T3.Team_Id INNER JOIN Win_By AS T4 ON T2.Win_Type = T4.Win_Id WHERE T2.Match_Id = '335993' GROUP BY T1.Team_Name |
How many percentage figures are given for the urban population when the total population number is 14685? | SELECT COUNT(urban), __percentage FROM table_16645_1 WHERE population__000_ = 14685 |
Name the sum of year for 2nd position for junior race | SELECT SUM(year) FROM table_name_40 WHERE position = "2nd" AND event = "junior race" |
What is the sum of Points, when the Performer is fe-mail? | SELECT SUM(points) FROM table_name_64 WHERE performer = "fe-mail" |
What position does Eric Hosmer play? | SELECT Position FROM player WHERE Player = "Eric Hosmer" |
Which sales person achieved the highest sales YTD? What is the projected yearly sales quota in 2011 for this person? | SELECT T1.BusinessEntityID, SUM(T1.SalesQuota) FROM SalesPerson AS T1 INNER JOIN SalesPersonQuotaHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE STRFTIME('%Y', T2.QuotaDate) = '2011' GROUP BY T1.BusinessEntityID ORDER BY SUM(T1.SalesYTD) DESC LIMIT 1 |
what is the rating of resolution 512 | SELECT rating from song where resolution = 512 |
What is the Studio of the Film with a Gross rental of $7,500,000? | SELECT studio FROM table_name_33 WHERE gross_rental = "$7,500,000" |
What types of stations are located in Cebu? | SELECT station_type FROM table_28794440_1 WHERE location = "Cebu" |
What about the Accounting department? | SELECT count ( * ) FROM department AS T1 JOIN course AS T2 ON T1.dept_code = T2.dept_code WHERE dept_name = "Accounting" |
List the number of customers that did not have any payment history. | SELECT count(*) FROM Customers WHERE customer_id NOT IN ( SELECT customer_id FROM Customer_Payments ); |
what race name had a uci rating of cn? | SELECT race_name FROM table_27887723_1 WHERE uci_rating = "CN" |
Which film was made before 2002? | SELECT film FROM table_name_1 WHERE year < 2002 |
What club scored 143 goals? | SELECT club FROM table_name_71 WHERE goals = "143" |
How much is the average score for New York state? | SELECT average FROM table_12338595_1 WHERE state = "New York" |
When nº is 3, what are all the ministires? | SELECT COUNT(ministries) FROM table_21422977_1 WHERE nº = 3 |
Find the types and details for all premises and order by the premise type. | SELECT premises_type , premise_details FROM premises ORDER BY premises_type |
Who is the owner of the radio frequency of 0 101.5 fm? | SELECT owner FROM table_name_90 WHERE frequency = "0 101.5 fm" |
Perfect! Can you tell me what is the total combined budget of these two departments? | select sum ( Budget_in_Billions ) from department where creation = ( SELECT creation FROM department GROUP BY creation ORDER BY count ( * ) DESC LIMIT 1 ) |
Name the numbers of the nba draft where the player went to kentucky | SELECT nba_draft FROM table_11677760_31 WHERE college = "Kentucky" |
Who directed the episode with production code 4akj08? | SELECT directed_by FROM table_19929970_1 WHERE production_code = "4AKJ08" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.