sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What number is on the car that Geoffrey Bodine drives? | SELECT MIN(_number) FROM table_2182170_1 WHERE driver_s_ = "Geoffrey Bodine" |
Show the membership level with most number of members. | SELECT LEVEL FROM member GROUP BY LEVEL ORDER BY COUNT(*) DESC LIMIT 1 |
For the question “What US state or territory do you work in?”, how many people gave "Kansas" as the answer? | SELECT COUNT(T1.UserID) FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T2.questiontext LIKE 'What US state or territory do you work in?' AND T1.AnswerText = 'Kansas' |
How many title's crew members are working from Casting Department? | SELECT COUNT(*) FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T2.category = 'Casting Department'; |
how many orders does the customer with the most orders have? | SELECT count ( * ) FROM Orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count ( * ) DESC LIMIT 1 |
Who directed the episode that was watched by 2.67 million U.S. viewers? | SELECT directed_by FROM table_29747178_3 WHERE us_viewers__million_ = "2.67" |
What is the season total number if the primary (South) winners is Ridings High 'A'? | SELECT COUNT(season) FROM table_23014923_1 WHERE primary__south__winners = "Ridings High 'A'" |
What is the sum of the averages when there are 68 caps and less than 9 goals? | SELECT SUM(average) FROM table_name_16 WHERE caps = 68 AND goals < 9 |
Name the date for series 2-2 | SELECT date FROM table_17622423_12 WHERE series = "2-2" |
State name of students who have the longest duration of absense from school and do not have payment due. | SELECT T1.name FROM longest_absense_from_school AS T1 INNER JOIN no_payment_due AS T2 ON T1.name = T2.name WHERE T2.bool = 'neg' ORDER BY T1.month DESC LIMIT 1 |
Which state has 5179 (gw×h) of renewable energy without hydrogen power?wha | SELECT state FROM table_25244412_1 WHERE renewable_electricity_w_o_hydro__gw•h_ = 5179 |
List the names of all players in team Avangard Omsk in season 2000-2001. | SELECT DISTINCT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2000-2001' AND T1.TEAM = 'Avangard Omsk' |
What is the league goals when the total goals is 179? | SELECT MAX(league_goals) FROM table_29701419_2 WHERE total_goals = 179 |
Which school did the player then go to Auburn? | SELECT school FROM table_11677691_7 WHERE college = "Auburn" |
What are the Points after 1991? | SELECT COUNT(points) FROM table_name_49 WHERE year > 1991 |
On the album titled “Loud” who was the other performer on the song directed by Melina Matsoukas? | SELECT other_performer_s_ FROM table_name_4 WHERE director_s_ = "melina matsoukas" AND album = "loud" |
When did they play Utah at home? | SELECT date FROM table_name_38 WHERE home = "utah" |
What Dave Douglas' Place? | SELECT place FROM table_name_66 WHERE player = "dave douglas" |
Find the email of the user whose name contains the word "Swift" | SELECT email FROM user_profiles WHERE name LIKE '%Swift%' |
When columbia, south carolina is the hometown what is the lowest age? | SELECT MIN(age) FROM table_1859855_2 WHERE hometown = "Columbia, South Carolina" |
What are the names and parties of representatives? | SELECT Name , Party FROM representative |
What number value has the Other transliteration of muoy roy? | SELECT value FROM table_name_90 WHERE other = "muoy roy" |
Which episode has the highest number of vote of the star score? | SELECT episode_id FROM Vote ORDER BY votes DESC LIMIT 1; |
What apartment type codes and apartment numbers do the buildings managed by "Kyle" have? | SELECT T2.apt_type_code , T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_manager = "Kyle" |
Name the total number of grounds for essendon | SELECT COUNT(ground) FROM table_16388047_1 WHERE home_team = "Essendon" |
How many enzymes do not have any interactions? | SELECT count(*) FROM enzyme WHERE id NOT IN ( SELECT enzyme_id FROM medicine_enzyme_interaction ); |
What mintage for the royal canadian mint engravers before 2008 that has an issue price of $102.95? | SELECT mintage FROM table_name_98 WHERE artist = "royal canadian mint engravers" AND year < 2008 AND issue_price = "$102.95" |
Who are the major users from Australia? | SELECT major_users FROM table_29474407_11 WHERE country_of_origin = "Australia" |
Against whom did the Spartans score 73 points? | SELECT opponent FROM table_22860990_3 WHERE spartans_points = 73 |
When did Prime Minister Agathe Uwilingiyimana's mandate end? | SELECT mandate_end FROM table_name_44 WHERE office = "prime minister" AND name_a = "agathe uwilingiyimana" |
Show flags of ships? | SELECT name, flag FROM ship |
What is a login name of Dee A Larkin? | SELECT login_name FROM customers WHERE Customer_first_name = "Dee" AND Customer_middle_initial = "A" AND Customer_last_name = "Larkin" |
Which Opponent that has a Week smaller than 7 on september 12, 1988? | SELECT opponent FROM table_name_41 WHERE week < 7 AND date = "september 12, 1988" |
Find the average age of the dogs who went through treatments. | SELECT avg(age) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments ) |
What is the solution path for the method "IQ.Data.DbQueryProvider.CanBeEvaluatedLocally"? | SELECT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Name = 'IQ.Data.DbQueryProvider.CanBeEvaluatedLocally' |
Show me the departure date and arrival date for all flights from Los Angeles to Honolulu. | SELECT departure_date , arrival_date FROM Flight WHERE origin = "Los Angeles" AND destination = "Honolulu" |
Give me the times and numbers of all trains that go to Chennai, ordered by time. | SELECT TIME , train_number FROM train WHERE destination = 'Chennai' ORDER BY TIME |
In which round was Gabriel Veiga the opponent? | SELECT round FROM table_name_42 WHERE opponent = "gabriel veiga" |
What is Opening, when White is Kramnik, when Year is less than 2001, and when Tournament is "Siemens Giants"? | SELECT opening FROM table_name_77 WHERE white = "kramnik" AND year < 2001 AND tournament = "siemens giants" |
What type of engine does the model with model designation 97F00 have? | SELECT engine FROM table_20866024_3 WHERE model_designation = "97F00" |
Great! Can you tell me which, if any, customers on this list appear more than once? | SELECT T2.customer_name From customer_address_history AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id JOIN addresses AS T3 ON T1.address_id = T3.address_id GROUP BY T2.customer_name having count ( * ) > 1 |
What is the first year that there was a Satellite Award? | SELECT MIN(year) FROM table_name_90 WHERE festival_organization = "satellite award" |
How many car models were produced by the maker with full name American Motor Company? | SELECT count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company'; |
Name the best when runs of 1088 and matches more than 11 | SELECT best FROM table_name_4 WHERE matches > 11 AND runs = 1088 |
How many customers in state of CA? | SELECT count(*) FROM customers WHERE state = "CA"; |
Who publishes Wolverine? | SELECT publisher FROM table_name_67 WHERE character_s_ = "wolverine" |
What team has less than 64 goals against, 101 goals for, and a Points 2 total of 63? | SELECT team FROM table_name_20 WHERE goals_against < 64 AND points_2 = 63 AND goals_for = 101 |
which episode was Transmitted on wednesday if the episode of "438 magic: the gathering mini masters tournament" was transmitted on thursday? | SELECT wednesday FROM table_18173916_8 WHERE thursday = "438 Magic: The Gathering Mini Masters Tournament" |
What are the faculty id and the number of students each faculty has? | SELECT T1.FacID , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID |
Which countries do not have a stadium that was opened after 2006? | SELECT country FROM stadium EXCEPT SELECT country FROM stadium WHERE opening_year > 2006 |
Great! Can you update the list to show the number of different institutions in each building? | SELECT T1.name , count ( * ) FROM building AS T1 JOIN institution AS T2 ON T1.building_id = T2.building_id GROUP BY T1.building_id |
What is the latest date that orders were sent by supplier id 4? | Did you mean date of supplied from or to? | Supplied to. | SELECT date_supplied_to FROM Product_Suppliers where supplier_id = 4 order by date_supplied_to desc limit 1 |
What frequency is the xfm station, which is part of the talk music genre? | SELECT frequency FROM table_name_71 WHERE genre = "talk music" AND station = "xfm" |
How many of the reviews for the app "Brit + Co" have a comment? | SELECT COUNT(App) FROM user_reviews WHERE App = 'Brit + Co' AND Translated_Review IS NOT NULL |
How many courses have more than one prerequisite? | select count ( * ) from ( SELECT T1.title FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING count ( * ) > 1 ) |
What is every entry for 1982-83 for rank 1? | SELECT 1982 AS _83 FROM table_22606461_10 WHERE rank = 1 |
What job is at red bank? | SELECT occupation FROM table_name_90 WHERE residence = "red bank" |
What is the average height of all players from the college "Yale University"? | SELECT avg ( T1.height ) FROM player AS T1 JOIN player_college AS T2 ON T1.player_id = T2.player_id JOIN college AS T3 ON T3.college_id = T2.college_id WHERE T3.name_full = 'Yale University' |
How many reg GP for rick vaive in round 1? | SELECT SUM(reg_gp) FROM table_name_19 WHERE player = "rick vaive" AND rd__number < 1 |
What is the rating of each restaurant reviews on Atlantic Ave? | SELECT T1.review FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_name = 'atlantic ave' |
How many products does the company Exotic Liquids supply? | SELECT COUNT(T1.ProductName) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Exotic Liquids' |
list out the student name | SELECT name FROM student |
What are the names and ids of customers whose address contains TN? | SELECT customer_name , customer_id FROM customers WHERE customer_address LIKE "%TN%" |
What are the maximum and minimum resolution of songs whose duration is 3 minutes? | SELECT max(T2.resolution) , min(T2.resolution) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE "3:%" |
What was the score against san antonio? | SELECT score FROM table_13619053_4 WHERE team = "San Antonio" |
When was the train 2053 built? | SELECT build_date FROM table_1057316_1 WHERE serial_number = "2053" |
Who are the opponents of Missouri that have an overall record of MU, 3-1? | SELECT missouri_vs FROM table_16201038_5 WHERE overall_record = "MU, 3-1" |
What are the electric companies drawing power from Itaipu? | SELECT entities FROM table_19001916_2 WHERE supply_point = "Itaipu" |
How many workshops did each author submit to? Return the author name and the number of workshops. | SELECT T2.Author , COUNT(DISTINCT T1.workshop_id) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author |
How many roles did Julia Roberts play in the series? | SELECT COUNT(T1.role) FROM Credit AS T1 INNER JOIN Person AS T2 ON T2.person_id = T1.person_id WHERE T2.name = 'Julia Roberts' |
How much does product ID 8 cost? | SELECT product_price from products where product_id = 8 |
Who wrote the episode with a production code greater than 1.4 direcyed by rick wallace? | SELECT written_by FROM table_name_5 WHERE prod_code > 1.4 AND directed_by = "rick wallace" |
What were the shots below par when the winning score was 67-64-63-71-66=331? | SELECT to_par FROM table_247955_2 WHERE winning_score = 67 - 64 - 63 - 71 - 66 = 331 |
Which vehicle has a Grid of 13? | SELECT constructor FROM table_name_5 WHERE grid = 13 |
Please provide a list of every nation where English is spoken and utilized entirely. | SELECT T1.Name FROM country AS T1 INNER JOIN language AS T2 ON T1.Code = T2.Country WHERE T2.Name = 'English' AND T2.Percentage = 100 |
What the B Score when the total is 16.125 and the position is less than 7? | SELECT SUM(b_score) FROM table_name_10 WHERE position < 7 AND total = 16.125 |
Which player had a position of QB for Texas Tech? | SELECT player FROM table_name_84 WHERE pos = "qb" AND college = "texas tech" |
Which Record has a Match Report of recap, and a Result of l 30–20? | SELECT record FROM table_name_92 WHERE match_report = "recap" AND result = "l 30–20" |
What are flight numbers of flights arriving at Airport "APG"? | SELECT FlightNo FROM FLIGHTS WHERE DestAirport = "APG" |
who is the incumbent where the candidates is william v. chappell, jr. (d) unopposed? | SELECT incumbent FROM table_1341672_10 WHERE candidates = "William V. Chappell, Jr. (D) Unopposed" |
when fairburn is bigger than 54.0, how many years? | SELECT COUNT(year) FROM table_20142629_2 WHERE fairburn > 54.0 |
What is the total amount of grant money given to each organization and what is its id? | SELECT sum(grant_amount) , organisation_id FROM Grants GROUP BY organisation_id |
What venue did South Melbourne play as the away team? | SELECT venue FROM table_name_61 WHERE away_team = "south melbourne" |
Find the name of companies whose revenue is greater than the average revenue of all companies. | SELECT name FROM manufacturers WHERE revenue > (SELECT avg(revenue) FROM manufacturers) |
What was the score on January 12? | SELECT score FROM table_name_27 WHERE date = "january 12" |
Name the country for johannesburg | SELECT country FROM table_name_35 WHERE city = "johannesburg" |
What are the employee ids and job ids for employees who make less than the lowest earning employee with title MK_MAN? | SELECT employee_id , job_id FROM employees WHERE salary < ( SELECT min(salary) FROM employees WHERE job_id = 'MK_MAN' ) |
What is the highest account balance of customers with checking accounts? | SELECT max ( balance ) from checking |
Who were the incumbent(s) when the result was a retired democratic-republican hold and the first elected representative was in 1816> | SELECT incumbent FROM table_2668336_19 WHERE result = "Retired Democratic-Republican hold" AND first_elected = "1816" |
What Vehicle Flight # has Pilot Peterson and Velocity (km/h) of 649? | SELECT vehicle_flight__number FROM table_name_31 WHERE pilot = "peterson" AND velocity__km_h_ = 649 |
Which country has doosan infracore as then company name? | SELECT country FROM table_237199_1 WHERE company_name = "Doosan Infracore" |
What is the average Position with less than 57 against and the team is Juventus? | SELECT AVG(position) FROM table_name_19 WHERE against < 57 AND team = "juventus" |
Namethe school team for season 2008 | SELECT school_club_team FROM table_15463188_7 WHERE season = "2008" |
what city has a game of friendly and an opponent of tunisia? | SELECT city FROM table_name_42 WHERE type_of_game = "friendly" AND opponent = "tunisia" |
Which Venue has a Opponents of halmstad and a Score of 1-1? | SELECT venue FROM table_name_84 WHERE opponents = "halmstad" AND score = "1-1" |
How many Total matches happened in 2003? | SELECT total_matches FROM table_name_20 WHERE year = "2003" |
Find the number of routes for each source airport and the airport name. | SELECT count(*), T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name |
What is the highest number of artists on Scarface? | SELECT MAX(number) FROM table_name_67 WHERE artist = "scarface" |
Find the name of the genre that is most frequent across all tracks. | SELECT T1.Name FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId GROUP BY T2.GenreId ORDER BY COUNT(*) DESC LIMIT 1 |
Which Points is the lowest one that has a Year larger than 1974, and a Rank of 15th? | SELECT MIN(points) FROM table_name_75 WHERE year > 1974 AND rank = "15th" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.