sentence
stringlengths
3
347
sql
stringlengths
18
804
What is the stage reached for venue edmonton green?
SELECT stage_reached FROM table_name_23 WHERE venue = "edmonton green"
How many total gold medals did India receive?
SELECT gold FROM table_name_10 WHERE nation = "india"
What was the surface on march 2, 1997?
SELECT surface FROM table_name_91 WHERE date = "march 2, 1997"
Which Seasons have Entries larger than 52, and Poles of 33?
SELECT seasons FROM table_name_28 WHERE entries > 52 AND poles = 33
What was the resultado when E.E.U.U was the country?
SELECT resultado FROM table_27501971_2 WHERE country = "E.E.U.U"
How many seasons has John Mcfadden coached?
SELECT COUNT(seasons) FROM table_name_71 WHERE coach = "john mcfadden"
What is the nba draft for the player from the hometown of virginia beach, va?
SELECT nba_draft FROM table_11677760_1 WHERE hometown = "Virginia Beach, VA"
Which school has National Championships smaller than 2, and a Nickname of lions?
SELECT school FROM table_name_21 WHERE national_championships < 2 AND nickname = "lions"
Which Surface has a Tournament of st. petersburg , russia?
SELECT surface FROM table_name_53 WHERE tournament = "st. petersburg , russia"
Among the students who took the course Machine Learning Theory, how many of them are undergraduates?
SELECT COUNT(T1.student_id) FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.name = 'Machine Learning Theory' AND T1.type = 'UG'
What is the weight of the shortest person?
SELECT Weight FROM people ORDER BY Height ASC LIMIT 1
Find the players whose names contain letter 'a'.
SELECT DISTINCT pName FROM Player WHERE pName LIKE '%a%'
What was José María Olazábal's score?
SELECT to_par FROM table_name_68 WHERE player = "josé maría olazábal"
Which Year has a cause of firedamp and a Death toll larger than 11?
SELECT SUM(year) FROM table_name_87 WHERE cause = "firedamp" AND death_toll > 11
What is the name of the university with the highest score in teaching in the year 2011?
SELECT T3.university_name FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id INNER JOIN university AS T3 ON T3.id = T2.university_id WHERE T1.criteria_name = 'Teaching' AND T2.year = 2011 ORDER BY T2.score DESC LIMIT 1
List the names of technicians in ascending order of age.
SELECT Name FROM technician ORDER BY Age
how many students from age of 18
SELECT count ( * ) from student where age = 18
How many schools with the highest level of poverty have received a portion of a donation included corporate sponsored gift card?
SELECT COUNT(T1.schoolid) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.payment_included_campaign_gift_card = 't' AND T1.poverty_level = 'highest poverty'
How many actors are there?
SELECT count(*) FROM actor
Name the competition on august 25, 2007
SELECT competition FROM table_name_83 WHERE date = "august 25, 2007"
What is the most used instrument?
SELECT instrument FROM instruments GROUP BY instrument ORDER BY count(*) DESC LIMIT 1
How many voting records do we have?
SELECT count(*) FROM VOTING_RECORD
Which document has the most draft copies? List its document id and number of draft copies.
SELECT document_id , count(copy_number) FROM Draft_Copies GROUP BY document_id ORDER BY count(copy_number) DESC LIMIT 1;
What is the full address of business number 24?
SELECT T1.AddressLine1, T1.AddressLine2 FROM Address AS T1 INNER JOIN BusinessEntityAddress AS T2 ON T1.AddressID = T2.AddressID WHERE T2.BusinessEntityID = 24
Who was the girl on week 4 after week 3's Mikaela James?
SELECT week_4 FROM table_name_12 WHERE week_3 = "mikaela james"
How many items appear in the viewers column when the draw is 2?
SELECT COUNT(viewers) FROM table_27994983_8 WHERE draw = 2
What are all of the lots?
select * from Lots
what is the country when the score is 68-72-67=207?
SELECT country FROM table_name_75 WHERE score = 68 - 72 - 67 = 207
Find the first names of all professors in the Accounting department who is teaching some course and the class room.
SELECT T2.emp_fname , T1.class_room FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Accounting'
what is the 1st prize for may 21
SELECT SUM(1 AS st_prize___) AS $__ FROM table_name_19 WHERE date = "may 21"
What are the course codes for every class that the student with the last name Smithson took?
SELECT T1.crs_code FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num WHERE T3.stu_lname = 'Smithson'
Find all the payment dates for the payments with an amount larger than 10 and the payments handled by a staff person with the first name Elsa.
SELECT payment_date FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa'
Find the name of the storm that affected both Afghanistan and Albania regions.
SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Afghanistan' INTERSECT SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Albania'
Among the competitors with age ranges 24 and below, calculate the difference between the number of competitors who weighed greater than 70 kg and competitors who weighted less than 70 kg.
SELECT COUNT(CASE WHEN T1.weight > 70 THEN 1 ELSE NULL END) - COUNT(CASE WHEN T1.weight < 70 THEN 1 ELSE NULL END) FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id WHERE T2.age < 24
Where did Essendon play as the away team?
SELECT venue FROM table_name_83 WHERE away_team = "essendon"
Return the names of singers who are from UK and released an English song.
SELECT artist_name FROM artist WHERE country = "UK" INTERSECT SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = "english"
Find the payment method that is used most frequently.
SELECT payment_method FROM customers GROUP BY payment_method ORDER BY count(*) DESC LIMIT 1
Which county in northern California has the highest number of cities?
SELECT county FROM geographic WHERE region = 'northern california' GROUP BY county ORDER BY COUNT(city) DESC LIMIT 1
Find the first and last name of the author(s) who wrote the paper "Nameless, Painless".
SELECT t1.fname , t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = "Nameless , Painless"
What is the name and number in 1962 when livery was Br Bauxite?
SELECT number_ & _name FROM table_name_18 WHERE date = "1962" AND livery = "br bauxite"
Find the names of the clubs that have at least a member from the city with city code "HOU".
SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = "HOU"
What are the different district names in order of descending city area?
SELECT DISTINCT District_name FROM district ORDER BY city_area DESC
Among the customers from a place with more than 20,000 and less than 30,000 inhabitants, how many of them are Machine-op-inspcts?
SELECT COUNT(T1.GEOID) FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.OCCUPATION = 'Machine-op-inspct' AND T2.INHABITANTS_K > 20 AND T2.INHABITANTS_K < 30
What is the loan club with bbc sport as the start source and ended in 3 February?
SELECT loan_club FROM table_name_41 WHERE start_source = "bbc sport" AND ended = "3 february"
Show all main industry and total market value in each industry.
SELECT main_industry , sum(market_value) FROM company GROUP BY main_industry
For each journal_committee, find the editor name and the journal theme.
SELECT T2.Name , T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID
Name the number of processors for nec sx-4 vector processor
SELECT no_of_processors FROM table_27765443_2 WHERE cpu_type = "NEC SX-4 vector processor"
How many unemployed students are enlisted in the Army organization?
SELECT COUNT(T1.name) FROM enlist AS T1 INNER JOIN unemployed AS T2 ON T2.name = T1.name WHERE T1.organ = 'army'
How many regions had an hdi of 0.896?
SELECT COUNT(combined_gross_enrollment_ratio__2009_) FROM table_25042332_33 WHERE hdi = "0.896"
What was the average number of "goals for", scored in the club Real Oviedo that had a "goal difference" lower than -16 and fewer than 9 wins?
SELECT AVG(goals_for) FROM table_name_68 WHERE goal_difference < -16 AND club = "real oviedo" AND wins < 9
how many game are there
SELECT count ( * ) from game
What opponent had an attendance of 63,659?
SELECT opponent_number FROM table_name_78 WHERE attendance = "63,659"
what is the status date of the product name Book collection C ?
SELECT status_date FROM view_product_availability AS T1 JOIN products_for_hire AS T2 ON T1.product_id = T2.product_id WHERE product_name = "Book collection C"
What was the home team for the game with more than 25,000 crowd?
SELECT home_team FROM table_name_70 WHERE crowd > 25 OFFSET 000
What is the first names of the professors from the history department who do not teach a class.
SELECT T1.emp_fname FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History' EXCEPT SELECT T4.emp_fname FROM employee AS T4 JOIN CLASS AS T5 ON T4.emp_num = T5.prof_num
What is the average lead time of product ID 843? Calculate for its profit on net and indicate the full location to which the vendor is located.
SELECT T1.AverageLeadTime, T1.LastReceiptCost - T1.StandardPrice, T4.AddressLine1, T4.AddressLine2 , T4.City, T4.PostalCode FROM ProductVendor AS T1 INNER JOIN Vendor AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN BusinessEntityAddress AS T3 ON T1.BusinessEntityID = T3.BusinessEntityID INNER JOIN Address AS T4 ON T3.AddressID = T4.AddressID WHERE T1.ProductID = 843
How many customers are living in city "Lake Geovannyton"?
SELECT count(*) 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 WHERE t3.city = "Lake Geovannyton"
What are the names of players in team 1?
SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Team AS T3 ON T2.Team_Id = T3.Team_Id WHERE T3.Team_Id = 1 GROUP BY T1.Player_Name
Of the clients whose businesses are located in the city of Boston, calculate which of them has a higher average amount of payment.
SELECT T1.customerNumber FROM customers AS T1 INNER JOIN payments AS T2 ON T1.customerNumber = T2.customerNumber WHERE T1.city = 'Boston' GROUP BY T1.customerNumber ORDER BY SUM(T2.amount) / COUNT(T2.paymentDate) DESC LIMIT 1
How in prothrombin affected by glanzmann's thrombasthenia.
SELECT prothrombin_time FROM table_1226250_1 WHERE condition = "Glanzmann's thrombasthenia"
What date has the format of CD and catalog of alca-274?
SELECT date FROM table_name_72 WHERE format = "cd" AND catalog = "alca-274"
Show the people that have been governor the most times.
SELECT Governor FROM party GROUP BY Governor ORDER BY COUNT(*) DESC LIMIT 1
What is the Population of the Town with a Census Ranking of 1,379 of 5,008 and an Area km 2 smaller than 8.35?
SELECT MAX(population) FROM table_name_70 WHERE status = "town" AND census_ranking = "1,379 of 5,008" AND area_km_2 < 8.35
What is the type of glycosylase that has an E. coli of Muty?
SELECT type FROM table_name_11 WHERE e_coli = "muty"
Name the candidates for felix walker
SELECT candidates FROM table_2668329_18 WHERE incumbent = "Felix Walker"
Name the total number for period of validity for upper volta
SELECT COUNT(period_of_validity) FROM table_222666_1 WHERE former_country_name = "Upper Volta"
What is the low lap total for the under 4 grid car driven by juan pablo montoya?
SELECT MIN(laps) FROM table_name_65 WHERE grid < 4 AND driver = "juan pablo montoya"
Show all publishers which do not have a book in 1989.
SELECT publisher FROM book_club EXCEPT SELECT publisher FROM book_club WHERE YEAR = 1989
what is the lname of linda
SELECT LName FROM Student where Fname = 'Linda'
What is the average longitude of stations located in San Jose city?
SELECT avg ( long ) FROM station WHERE city = "San Jose"
What is the name of the most expensive product?
SELECT Name FROM Products WHERE Price = ( SELECT MAX(Price) FROM Products )
What is the highest cr number?
SELECT MAX(cr_no) FROM table_1886270_1
What are the positions and teams of pilots?
SELECT POSITION , Team FROM pilot
Give the name of the director of the movie in which Verna Felton was the voice actor for its character "Aunt Sarah".
SELECT T1.director FROM director AS T1 INNER JOIN `voice-actors` AS T2 ON T2.movie = T1.name WHERE T2.character = 'Aunt Sarah' AND T2.`voice-actor` = 'Verna Felton'
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"
What is the country ID of the movie with the title of "Pirates of the Caribbean: Dead Man's Chest"?
SELECT T2.COUNTry_id FROM movie AS T1 INNER JOIN production_COUNTry AS T2 ON T1.movie_id = T2.movie_id WHERE T1.title LIKE 'Pirates of the Caribbean: Dead Man%s Chest'
When 155 is the jersey what is the highest amount of different holders?
SELECT MAX(different_holders) FROM table_18676973_3 WHERE jerseys = 155
When is the first broadcast for episodes where Rufus's guest is Jack Whitehall?
SELECT first_broadcast FROM table_19930660_3 WHERE rufus_guest = "Jack Whitehall"
Calculate the average of authors for each paper from the year of 1990 to 2000.
SELECT CAST(COUNT(DISTINCT T2.AuthorId) AS REAL) / COUNT(DISTINCT T1.Title) FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Year BETWEEN 1990 AND 2000
Name the least 2 credits for straight hand
SELECT MIN(2 AS _credits) FROM table_148535_2 WHERE hand = "Straight"
For entries with a lost of 5, what is the sum of the draw entry?
SELECT SUM(draw) FROM table_name_23 WHERE lost = 5
How much more expensive in percentage is the product with the highest selling price from the product with the lowest selling price in the Clothing category?
SELECT (MAX(T1.ListPrice) - MIN(T1.ListPrice)) * 100 / MIN(T1.ListPrice) FROM Product AS T1 INNER JOIN ProductSubcategory AS T2 ON T1.ProductSubcategoryID = T2.ProductSubcategoryID INNER JOIN ProductCategory AS T3 ON T2.ProductCategoryID = T3.ProductCategoryID WHERE T3.Name = 'Clothing'
What is Tournament, when Margin is Victory of 6 Strokes?
SELECT tournament FROM table_name_30 WHERE margin_of_victory = "6 strokes"
How many don't have a banking industry?
SELECT count ( * ) FROM Companies WHERE Industry ! = "Banking"
show the names of editors that are on at least two journal committees?
SELECT T1.Name FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.Name HAVING COUNT ( * ) > = 2
Which Livery has a Description of 20t tanker, with a date later than 1941?
SELECT livery FROM table_name_32 WHERE description = "20t tanker" AND date > 1941
List all the films that Karl Berr starred in and rated as PG.
SELECT T3.title FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T1.first_name = 'KARL' AND T1.last_name = 'BERRY' AND T3.rating = 'PG'
Show the names of festivals that have nominated artworks of type "Program Talent Show".
SELECT T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID WHERE T2.Type = "Program Talent Show"
What 2009 has 345 as the 2007?
SELECT 2009 FROM table_name_33 WHERE 2007 = "345"
What are the names of the songs that are modern or sung in English?
SELECT song_name FROM song WHERE genre_is = "modern" OR languages = "english"
Who was the opponent at the game that had a loss of Harden (9-6)?
SELECT opponent FROM table_name_27 WHERE loss = "harden (9-6)"
What did the visiting team score at brunswick street oval?
SELECT away_team AS score FROM table_name_67 WHERE venue = "brunswick street oval"
How many branches where have more than average number of memberships are there?
SELECT count(*) FROM branch WHERE membership_amount > (SELECT avg(membership_amount) FROM branch)
Which allergy has most number of students affected?
SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY count(*) DESC LIMIT 1
How many different countries are all the swimmers from?
SELECT count(DISTINCT nationality) FROM swimmer
What position do the bc lions pick?
SELECT position FROM table_name_22 WHERE cfl_team = "bc lions"
What is the Label of the September 19, 2008 release in Germany?
SELECT label FROM table_name_25 WHERE date = "september 19, 2008" AND region = "germany"
In romantic movies, how many of them starred by John Travolta?
SELECT COUNT(*) FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T1.Genre = 'Romance' AND T3.Name = 'John Travolta'
Among the products under the office supplies category, what is the product that made the highest sales in the Central region?
SELECT T2.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.Category = 'Office Supplies' AND T2.Region = 'Central' ORDER BY T1.Sales DESC LIMIT 1
What number in season is the episode directed by Gene Stupnitsky?
SELECT no_in_season FROM table_17482534_1 WHERE directed_by = "Gene Stupnitsky"