sentence
stringlengths
3
347
sql
stringlengths
18
804
For grants that have descriptions of Regular and Initial Applications, what are their start dates?
SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Regular' INTERSECT SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Initial Application'
How many voice actors for the movie Aladdin?
SELECT COUNT('voice-actor') FROM `voice-actors` WHERE movie = 'Aladdin'
Name the surface for 12 september 2006
SELECT surface FROM table_name_3 WHERE date = "12 september 2006"
Which Championship was louise suggs the runner-up by 3 strokes?
SELECT championship FROM table_name_8 WHERE runner_s__up = "louise suggs" AND margin = "3 strokes"
Which Game 1 has a fullback?
SELECT game_1 FROM table_name_88 WHERE position = "fullback"
How many average wins does bruce fleisher have?
SELECT AVG(wins) FROM table_name_40 WHERE player = "bruce fleisher"
Who had the high assists when the score was w 107–95 (ot)?
SELECT high_assists FROM table_27715173_6 WHERE score = "W 107–95 (OT)"
What did the away team Carlton score?
SELECT away_team AS score FROM table_name_29 WHERE away_team = "carlton"
who is the champion when the year is earlier than 2012, the runner-up (average in final) is steve beaton (97.16)?
SELECT champion FROM table_name_25 WHERE year < 2012 AND runner_up__average_in_final_ = "steve beaton (97.16)"
How many times is the position lb and the overall is less than 46?
SELECT COUNT(pick) FROM table_name_25 WHERE position = "lb" AND overall < 46
What is the lowest overall year?
SELECT MIN(year) FROM table_16677738_1
How many different facilities are there?
SELECT count ( * ) FROM Apartment_Facilities
what is the margin of victory when the runner-up is amy alcott and the winning score is –9 (72-68-67=207)?
SELECT margin_of_victory FROM table_name_78 WHERE runner_s__up = "amy alcott" AND winning_score = –9(72 - 68 - 67 = 207)
What was the competition on October 21, 2003?
SELECT competition FROM table_name_83 WHERE date = "october 21, 2003"
Find the number of scientists involved for the projects that require less than 300 hours
SELECT count ( distinct Scientist ) FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project WHERE T1.hours < 300
List the films' titles which were rented on 24th May,2005.
SELECT T1.title FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id INNER JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id WHERE SUBSTR(T3.rental_date, 1, 10) = '2005-05-24'
How many military deaths were there when there were 1,615 total casualties?
SELECT military_deaths FROM table_name_92 WHERE total_casualties = "1,615"
Who was the opponent at the game that had a loss of Saarloos (7-7)?
SELECT opponent FROM table_name_7 WHERE loss = "saarloos (7-7)"
Name the date for zi yan jie zheng opponent
SELECT date FROM table_name_64 WHERE opponents = "zi yan jie zheng"
Excellent! Can you show the class time and class room for ACCt-211?
SELECT CLASS_TIME,CLASS_ROOM from CLASS where CRS_CODE = 'ACCT-211'
Failures larger than 0, and a Successes of 1 has what lowest partial failures?
SELECT MIN(partial_failures) FROM table_name_64 WHERE failures > 0 AND successes = 1
Who directed # (season #) is 1 ( 2 )?
SELECT directed_by FROM table_28210383_1 WHERE _number__season__number_ = "1 ( 2 )"
Which company's type is joint venture, and has principle activities listed as Cargo Airline and an incorporation of China?
SELECT company FROM table_name_37 WHERE type = "joint venture" AND principal_activities = "cargo airline" AND incorporated_in = "china"
Calculate the total quantity of products that are gifts.
SELECT SUM(T2.Quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Price = 0
What was the score and game outcome when High Points was andre miller (17)?
SELECT score FROM table_17323042_11 WHERE high_points = "Andre Miller (17)"
What was the reason for change when the successor was William Milnes, Jr. (C)?
SELECT reason_for_change FROM table_2417345_4 WHERE successor = "William Milnes, Jr. (C)"
What is the total number of Length Feet, when Parish is Clarendon, when Km From Kingston is 71.2, and when Length Meters is less than 21.3?
SELECT COUNT(length_feet) FROM table_name_97 WHERE parish = "clarendon" AND km_from_kingston = 71.2 AND length_meters < 21.3
What was the winning score in the tournament, ending with Birdie Kim as a runner-up?
SELECT winning_score FROM table_1940012_2 WHERE runner_s__up = "Birdie Kim"
Sort the each workshop in alphabetical order of the venue. Return the date and venue of each workshop.
SELECT Date , Venue FROM workshop ORDER BY Venue
Find the maximum and minimum durations of tracks in milliseconds.
SELECT max(Milliseconds) , min(Milliseconds) FROM TRACK
Where is the European Grand Prix held? | Do you want to return the location, country or latitude and longitude? | Country please.
SELECT distinct T2.country FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T1.name = 'European Grand Prix'
What were the lowest laps of Tarso Marques?
SELECT MIN(laps) FROM table_name_69 WHERE driver = "tarso marques"
Name the station and city with the most borrowed bike.
SELECT T2.start_station_name, T1.city FROM station AS T1 INNER JOIN trip AS T2 ON T2.start_station_name = T1.name GROUP BY T2.start_station_name ORDER BY COUNT(T2.start_station_name) DESC LIMIT 1
What is the average pick after Round 2?
SELECT AVG(pick) FROM table_name_33 WHERE round > 2
On July 15, 1984 what surface was used?
SELECT surface FROM table_name_15 WHERE date = "july 15, 1984"
What was the location when the stolen ends is 12 and shot pct is 77%?
SELECT locale FROM table_1543845_63 WHERE stolen_ends = 12 AND shot_pct = "77%"
Where is the University at Albany located?
SELECT location FROM table_12936521_2 WHERE institution = "University at Albany"
What country won gold in the year(s) that Chinese Taipei won bronze?
SELECT gold FROM table_name_50 WHERE bronze = "chinese taipei"
In what year did the team compete in the USISL Pro League?
SELECT year FROM table_1939214_1 WHERE league = "USISL Pro league"
Which country has more than 2 members?
SELECT Country FROM member GROUP BY Country HAVING COUNT ( * ) > 2
What was the Record on the Date May 8?
SELECT record FROM table_name_15 WHERE date = "may 8"
Margin of victory on no. 4 was?
SELECT margin_of_victory FROM table_21649285_2 WHERE no = 4
What are the descriptions of all the project outcomes?
SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code
What was the home team that played Geelong?
SELECT home_team AS score FROM table_name_43 WHERE away_team = "geelong"
Provide the directions for all the trains that have 2 or less cars.
SELECT T1.direction FROM trains AS T1 INNER JOIN ( SELECT train_id, MAX(position) AS trailPosi FROM cars GROUP BY train_id ) AS T2 ON T1.id = T2.train_id WHERE T2.trailPosi <= 2
What were the amount of rebounds in game 2?
SELECT high_rebounds FROM table_23248910_11 WHERE game = 2
What is the low grid total for a retired due to steering in under 15 laps?
SELECT MIN(grid) FROM table_name_21 WHERE time_retired = "steering" AND laps < 15
What is the reviewer name, film title, movie rating, and rating date for every movie ordered by reviewer name, movie title, then finally rating?
SELECT T3.name , T2.title , T1.stars , T1.ratingDate FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID ORDER BY T3.name , T2.title , T1.stars
What was the year when the diameter was 729 km?
SELECT year_named FROM table_name_59 WHERE diameter__km_ = 729
Provide the sunrise time recorded by the home weather station of store no.30 on 2014/2/21.
SELECT T1.sunrise FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T1.`date` = '2014-02-21' AND store_nbr = 30
What is the lowest FA cup that has mohd faizal desa as the player, with a total greater than 0?
SELECT MIN(fa_cup) FROM table_name_22 WHERE player = "mohd faizal desa" AND total > 0
What is the social number of the person who made the most complaints?
SELECT T1.social FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID GROUP BY T1.client_id ORDER BY COUNT(T1.client_id) DESC LIMIT 1
How many employees have salary between 100000 and 200000?
SELECT count(*) FROM Employee WHERE salary BETWEEN 100000 AND 200000
Which makers designed more than 3 car models? List full name and the id.
SELECT T1.FullName , T1.Id FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) > 3;
What is the average quantity of each order for the book "Life Without Fear"?
SELECT CAST(SUM(T2.qty) AS REAL) / COUNT(T1.title_id) FROM titles AS T1 INNER JOIN sales AS T2 ON T1.title_id = T2.title_id WHERE T1.title = 'Life Without Fear'
List all the types of forms.
SELECT DISTINCT form_type_code FROM forms
What are the distinct battle names which are between bulgarian commander 'Kaloyan' and latin commander 'Baldwin I'?
SELECT name FROM battle WHERE bulgarian_commander = 'Kaloyan' AND latin_commander = 'Baldwin I'
What organization had the founding date of 1998-11-08?
SELECT organization FROM table_2538117_12 WHERE founding_date = "1998-11-08"
Find the first name of students not enrolled in any course.
SELECT Fname FROM STUDENT WHERE StuID NOT IN (SELECT StuID FROM ENROLLED_IN)
What is the ratio of author with affiliation and without affiliation?
SELECT CAST(SUM(CASE WHEN Affiliation IS NULL THEN 1 ELSE 0 END) AS REAL) / COUNT(*) FROM Author
What was the type of game with a 1:6 result?
SELECT type_of_game FROM table_name_5 WHERE results¹ = "1:6"
How many areas are named West Isles?
SELECT COUNT(area_km_2) FROM table_170969_2 WHERE official_name = "West Isles"
What is the Date if the Site is Shriver Field?
SELECT date FROM table_name_34 WHERE site = "shriver field"
In district Pennsylvania 11, what was the total numbers of results?
SELECT COUNT(results) FROM table_1805191_39 WHERE district = "Pennsylvania 11"
Name the record on june 22
SELECT record FROM table_name_89 WHERE date = "june 22"
What is the Year for Jazz club of Houston?
SELECT years_for_jazz FROM table_name_54 WHERE school_club_team = "houston"
How many percent of senators were from class 1?
SELECT CAST(SUM(CASE WHEN class = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM `historical-terms` WHERE type = 'sen'
Which delegates are from counties with population smaller than 100000?
SELECT T2.Delegate FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population < 100000
What are the Student names who have played Gname The Vanishing of Eric Calder.
SELECT T3.Fname, T3.lname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid JOIN Student AS T3 ON T3.Stuid = T1.Stuid WHERE T2.Gname = "The Vanishing of Eric Calder"
How many players played as a captain in season year 2008?
SELECT COUNT(T1.Player_Id) FROM Player_Match AS T1 INNER JOIN Match AS T2 ON T1.Match_Id = T2.Match_Id INNER JOIN Rolee AS T3 ON T1.Role_Id = T3.Role_Id WHERE T3.Role_Desc = 'Captain' AND T2.Match_Date LIKE '2008%'
How many film are there?
SELECT COUNT(*) FROM film
Find the last name of the first ever contact person of the organization with the highest UK Vat number.
SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id JOIN individuals AS t3 ON t2.individual_id = t3.individual_id WHERE t1.uk_vat_number = (SELECT max(uk_vat_number) FROM organizations) ORDER BY t2.date_contact_to ASC LIMIT 1
When 5 is the l what is the lowest amount of stolen ends?
SELECT MIN(stolen_ends) FROM table_29565541_2 WHERE l = 5
Show the details of all trucks in the order of their license number.
SELECT truck_details FROM trucks ORDER BY truck_licence_number
What is the numerical value of those two companies' revenues?
SELECT name,Revenue FROM manufacturers WHERE revenue < ( SELECT min ( revenue ) FROM manufacturers WHERE headquarter = 'Austin' )
Name the total number of districts for rob teplitz
SELECT COUNT(district) FROM table_1979619_3 WHERE representative = "Rob Teplitz"
What are all the order #s from the week "top 6"?
SELECT order__number FROM table_29756040_1 WHERE week__number = "Top 6"
What school year is vaucluse public school?
SELECT years FROM table_name_10 WHERE school = "vaucluse public school"
What network is working in 2014?
SELECT network FROM table_name_19 WHERE year = 2014
What was the Cowboys' record for Nov. 5, 1966?
SELECT record FROM table_22801165_1 WHERE date = "Nov. 5"
In California, how many representatives ended their term in 1995?
SELECT COUNT(*) FROM `current-terms` WHERE state = 'CA' AND type = 'rep' AND end LIKE '1995%'
Name the number of appearances for yugoslavia
SELECT COUNT(appearances¹) FROM table_24565004_20 WHERE nationality² = "Yugoslavia"
When the pick was below 42 and the player was Chris Horton, what's the highest Overall pick found?
SELECT MAX(overall) FROM table_name_15 WHERE name = "chris horton" AND pick < 42
how many orders do each of them have?
SELECT COUNT ( * ) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY COUNT ( * ) DESC LIMIT 10
Find the total student enrollment for different affiliation type schools.
SELECT SUM(enrollment), affiliation FROM university GROUP BY affiliation
What is the title of the first crime movie ever released?
SELECT T1.title FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id WHERE T3.genre_name = 'Crime' ORDER BY T1.release_date LIMIT 1
List the store ID of the films with a rental rate greater than the 60% of average rental rate of all listed films.
SELECT T2.store_id FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id WHERE T1.rental_rate > ( SELECT AVG(T1.rental_rate) * 0.6 FROM film AS T1 )
Where is the history department?
SELECT dept_address FROM department WHERE dept_name = 'History'
Indicate the release year of the game with more than 200000 sales in Japan.
SELECT DISTINCT T3.release_year FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id INNER JOIN game_platform AS T3 ON T2.game_platform_id = T3.id WHERE T2.num_sales * 100000 > 200000 AND T1.region_name = 'Japan'
Can you list the ages of all the artists from United States?
SELECT age from artist where country = "United States"
What are the names, details and data types of the characteristics which are never used by any product?
SELECT characteristic_name , other_characteristic_details , characteristic_data_type FROM CHARACTERISTICS EXCEPT SELECT t1.characteristic_name , t1.other_characteristic_details , t1.characteristic_data_type FROM CHARACTERISTICS AS t1 JOIN product_characteristics AS t2 ON t1.characteristic_id = t2.characteristic_id
What are the results of a first elected prior to year 1982?
SELECT results FROM table_name_48 WHERE first_elected < 1982
What is the Facility ID that has a City of license of wheeling, and a ERP kW less than 4.5?
SELECT MAX(facility_id) FROM table_name_52 WHERE city_of_license = "wheeling" AND erp_kw < 4.5
what is the date (from) where the notes are apeldoornsche tramweg-maatschappij?
SELECT date__from_ FROM table_12562214_1 WHERE notes = "Apeldoornsche Tramweg-Maatschappij"
Can you tell me the Team that has the Date of march 17?
SELECT team FROM table_name_77 WHERE date = "march 17"
How many wins were there in 1994?
SELECT SUM(wins) FROM table_name_20 WHERE year = 1994
Where is Rix from?
SELECT nat FROM table_name_36 WHERE name = "rix"
Name the sum of rank for silver less than 0
SELECT SUM(rank) FROM table_name_55 WHERE silver < 0
In what venue was the Batting team India who featured partners Sachin Tendulkar and Rahul Dravid?
SELECT venue FROM table_name_15 WHERE batting_team = "india" AND batting_partners = "sachin tendulkar and rahul dravid"
What are the different product names? What is the average product price for each of them?
SELECT Product_Name , avg(Product_Price) FROM PRODUCTS GROUP BY Product_Name