sentence
stringlengths
3
347
sql
stringlengths
18
804
And how many devices from the list use the iOS platform?
SELECT count ( * ) FROM device where Software_Platform = "iOS"
hi, how many teachers have addresses with zip code "918"
SELECT count ( * ) FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id WHERE T1.zip_postcode = "918"
Name the howard baker for ronald reagan of 72%
SELECT howard_baker FROM table_name_46 WHERE ronald_reagan = "72%"
What was the score on 20/6/97?
SELECT score FROM table_name_9 WHERE date = "20/6/97"
Find the last name of the individuals that have been contact individuals of an organization.
SELECT DISTINCT t1.individual_last_name FROM individuals AS t1 JOIN organization_contact_individuals AS t2 ON t1.individual_id = t2.individual_id
The game that has a save of lynch (4) ended with what score?
SELECT score FROM table_name_41 WHERE save = "lynch (4)"
What year did a school leave that was founded in 1880?
SELECT left FROM table_11658094_3 WHERE founded = 1880
How many users who started yelping since 2012 have sent a high number of funny votes?
SELECT COUNT(user_id) FROM Users WHERE user_yelping_since_year = 2012 AND user_votes_funny LIKE 'High'
What language is the moviein that is on UMP movies network through Sky service?
SELECT language FROM table_name_87 WHERE genre = "movies" AND service = "sky" AND network = "ump movies"
Which languages are offered in the coverage area of klang petaling jaya shah alam?
SELECT language FROM table_1837570_1 WHERE coverage_area = "Klang Petaling Jaya Shah Alam"
For each zip code, return the average mean temperature of August there.
SELECT zip_code , avg(mean_temperature_f) FROM weather WHERE date LIKE "8/%" GROUP BY zip_code
How many votes did Obama get in Lake County?
SELECT MIN(obama_number) FROM table_20799905_1 WHERE county = "LAKE"
Who is the manager of FK Andijan?
SELECT manager FROM table_25527255_2 WHERE team = "FK Andijan"
Among all the customers in Germany, how many of them have an account balance of over 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 = 'GERMANY' AND T1.c_acctbal > 1000
haha I am sorry, Thanks again for your answer! :) Then could you please let me know which entrepreneur requested for the biggest amount of money?
SELECT Entrepreneur_ID from entrepreneur order by Money_Requested desc limit 1
Great! Can you tell me which ClaimID is associated with the largest claim amount?
SELECT claim_id FROM Claims order by amount_claimed desc limit 1
Find the average hours for the students whose tryout decision is no.
SELECT avg(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no'
How many number does Fordham school have?
SELECT COUNT(no) FROM table_10015132_14 WHERE school_club_team = "Fordham"
What was the home team's score when North Melbourne was the away team?
SELECT home_team AS score FROM table_name_39 WHERE away_team = "north melbourne"
Who served as an advisor for students who have treasurer votes in the spring election cycle?
SELECT DISTINCT T1.Advisor FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote WHERE T2.Election_Cycle = "Spring"
How many businesses in AZ state do not open on Thursday?
SELECT COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Checkins AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T2.label_time_4 LIKE 'None' AND T1.state LIKE 'AZ' AND T3.day_of_week LIKE 'Thursday'
Which region is "Columbia" in?
SELECT T2.RegionDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T1.TerritoryDescription = 'Columbia'
When esv ingolstadt is the oberbayern b what is the niederbayern?
SELECT niederbayern FROM table_23224961_1 WHERE oberbayern_b = "ESV Ingolstadt"
Which Scrapped/Sold has a Builder of derby, and a Name as rebuilt of ben madigan?
SELECT scrapped_sold FROM table_name_74 WHERE builder = "derby" AND name_as_rebuilt = "ben madigan"
What is Kerry J. Donley's First Election date?
SELECT first_election FROM table_name_23 WHERE name = "kerry j. donley"
In what year(s) did Raymond Floyd have a total of less than 291 and a To par of +10?
SELECT year_s__won FROM table_name_34 WHERE total < 291 AND to_par = "+10" AND player = "raymond floyd"
What is the fleet number when the transmission is Voith D863.4 and the engine is Cummins ISL?
SELECT fleet__number FROM table_19643196_1 WHERE transmission = "Voith D863.4" AND engine = "Cummins ISL"
What was the lowest attendance recorded at a game on September 28?
SELECT MIN(attendance) FROM table_name_79 WHERE date = "september 28"
What are the paths of solutions in repository "https://github.com/ecoffey/Bebop.git"
SELECT DISTINCT T2.Path FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Url = 'https://github.com/ecoffey/Bebop.git'
Show the most common apartment type code.
SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1
What year were the latest elections?
SELECT MAX(first_elected) FROM table_1341930_10
List top 3 highest Rating TV series. List the TV series's Episode and Rating.
SELECT Episode , Rating FROM TV_series ORDER BY Rating DESC LIMIT 3;
What were the total apps for Dunne in season where he had 0 league goals?
SELECT total_apps FROM table_2980024_1 WHERE league_goals = 0
Name the total number for mens single for 2002/2003
SELECT COUNT(mens_singles) FROM table_12193259_1 WHERE season = "2002/2003"
Find all the films rated PG, except those who cost more than 200 for replacement?
SELECT title FROM film WHERE rating = 'PG' EXCEPT SELECT title FROM film WHERE replacement_cost > 200
Show the years, book titles, and publishers for all books, in descending order by year.
SELECT YEAR , book_title , publisher FROM book_club ORDER BY YEAR DESC
What episode number in the season was written by Greg nelson and directed by Keith samples?
SELECT no FROM table_27547668_3 WHERE written_by = "Greg Nelson" AND directed_by = "Keith Samples"
What is the location coordinates of the bike station from which the bike for the trip that last the longest was borrowed?
SELECT T2.lat, T2.long FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T1.duration = ( SELECT MAX(T1.duration) FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.start_station_name )
What date has the format of cd?
SELECT date FROM table_name_40 WHERE format = "cd"
What is the score for the game with 213 attending?
SELECT score FROM table_name_3 WHERE attendance = "213"
In which year did London hold its earliest Olympic game?
SELECT T3.games_year FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T2.city_name = 'London' ORDER BY T3.games_year LIMIT 1
In which year did he finish 8th?
SELECT year FROM table_name_3 WHERE result = "8th"
What is the number of graduates in "San Francisco State University" in year 2004?
SELECT sum(t1.graduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = "San Francisco State University"
Among all the orders made by Aimee Bixby, how many of them chose the slowest delivery speed?
SELECT COUNT(DISTINCT T2.`Order ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Customer Name` = 'Aimee Bixby' AND T2.`Ship Mode` = 'Standard Class'
A list of the top 10 countries by average invoice size. List country name and average invoice size.
SELECT billing_country , AVG(total) FROM invoices GROUP BY billing_country ORDER BY AVG(total) DESC LIMIT 10;
Tell me the lowest bronze for panama and total larger than 8
SELECT MIN(bronze) FROM table_name_84 WHERE nation = "panama" AND total > 8
What is the average edispl for all volvos?
SELECT avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo';
What loss has 16,458 as an Att.?
SELECT loss FROM table_name_82 WHERE att = "16,458"
Can you tell me the names of the cities affected by storm?
SELECT region_name FROM region WHERE region_id IN ( SELECT region_id FROM affected_region )
What was the record for the game on March 25?
SELECT record FROM table_name_27 WHERE date = "march 25"
Hi, I was wondering how many users do not have tweets?
SELECT count ( * ) FROM user_profiles WHERE UID NOT IN ( SELECT UID FROM tweets )
What are the first names of all the different drivers in alphabetical order?
SELECT DISTINCT forename FROM drivers ORDER BY forename ASC
What is the competition type when the score is 1-1?
SELECT competition FROM table_name_44 WHERE score = "1-1"
What skip has denmark as the country?
SELECT skip FROM table_name_58 WHERE country = "denmark"
What score has money ($) greater than 400, with gene sarazen as the player?
SELECT score FROM table_name_99 WHERE money___$__ > 400 AND player = "gene sarazen"
Find the brand Id of the root beer which has the most number of customers who gave 1-star ratings.
SELECT BrandID FROM rootbeerreview WHERE StarRating = 1 GROUP BY BrandID ORDER BY COUNT(BrandID) DESC LIMIT 1
List each owner's first name, last name, and the size of his for her dog.
SELECT T1.first_name, T1.last_name, T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id
What are the numbers for any players from Washington?
SELECT no_s_ FROM table_name_94 WHERE school_club_team_country = "washington"
What region has a 2002 date, and a Catalog dos 195?
SELECT region FROM table_name_70 WHERE date = "2002" AND catalog = "dos 195"
What player's hometown is Washington, IN?
SELECT player FROM table_name_83 WHERE hometown = "washington, in"
What week # featured first solo as the theme?
SELECT week__number FROM table_21501564_1 WHERE theme = "First Solo"
Which Theme has a Result of eliminated?
SELECT theme FROM table_name_95 WHERE result = "eliminated"
How many sections does course ACCT-211 has?
SELECT count(DISTINCT class_section) FROM CLASS WHERE crs_code = 'ACCT-211'
What is the Title, when the Lyricist(s) is Yarosake, and when the Composer(s) is Yarosake?
SELECT title FROM table_name_69 WHERE lyricist_s_ = "yarosake" AND composer_s_ = "yarosake"
What are the names of representatives in descending order of votes?
SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes DESC
what is the minimum rank
SELECT MIN(rank) FROM table_11174272_1
What is the position of the player with a jersey # greater than 30 and a December 23, 1986 birthdate?
SELECT position FROM table_name_83 WHERE jersey__number > 30 AND birthdate = "december 23, 1986"
In geographic identifier from 10 to 30, how many of them has an income below 2000?
SELECT COUNT(GEOID) FROM Demog WHERE INCOME_K < 2000 AND GEOID >= 10 AND GEOID <= 30
Compute the average age of the members in the club "Tennis Club".
SELECT avg(t3.age) 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 t1.clubname = "Tennis Club"
What shows for opened for the Nascar Major Series?
SELECT opened FROM table_name_84 WHERE major_series = "nascar"
Who was the home team in the match with an away team of Millwall?
SELECT home_team FROM table_name_6 WHERE away_team = "millwall"
How many accounts have an address that is too long?
SELECT COUNT(*) FROM Address WHERE AddressLine2 <> ''
How many draws were there in played games?
SELECT drawn FROM table_17941032_2 WHERE "played" = "played"
Please list the three episodes with the highest number of votes for the worst star rating.
SELECT T1.title FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T2.stars = ( SELECT MIN(stars) FROM Vote ) ORDER BY T2.votes DESC LIMIT 3;
Show the locations of parties with hosts older than 50.
SELECT T3.Location FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T2.Age > 50
What is the year range of season 4?
SELECT season FROM table_22383603_1 WHERE no = 4
Which skip (club) had 31 PA and 9 blank ends?
SELECT skip__club_ FROM table_29546030_2 WHERE pa = 31 AND blank_ends = 9
Lastly, do you have his salary?
SELECT T2.name,T2.salary FROM department AS T1 JOIN instructor AS T2 ON T1.dept_name = T2.dept_name where T1.dept_name = 'Astronomy'
What is the date of the match that has the highest wager on the final result of a game?
SELECT Match_Date FROM `Match` ORDER BY Win_Margin DESC LIMIT 1
What is the number of Justin Jeffries?
SELECT COUNT(number) FROM table_name_31 WHERE name = "justin jeffries"
What is Away Team, when Home Team is "Boston United"?
SELECT away_team FROM table_name_30 WHERE home_team = "boston united"
Okay. Name and flags of ships not steered by any captain of Midshipman rank?
SELECT Name, flag FROM ship WHERE ship_id NOT IN ( SELECT ship_id FROM captain WHERE rank = 'Midshipman' )
please list out the paper id
SELECT paperID FROM papers
Provide me with the names of all the villages (German) that has 76.3% of Slovenes in 1951.
SELECT village__german_ FROM table_10798421_1 WHERE percent_of_slovenes_1951 = "76.3%"
Which country had a production (bbl/day) of 2,494,000 (10th)?
SELECT country FROM table_166346_1 WHERE production___bbl__day_ = "2,494,000 (10th)"
Who is the captain of the 2012 NRL season competition?
SELECT captain_s_ FROM table_name_75 WHERE competition = "2012 nrl season"
Name the least matches for not out being 44
SELECT MIN(matches) FROM table_21486890_1 WHERE not_out = 44
What is the first and last name of the students who are not in the largest major?
SELECT fname , lname FROM student WHERE major != (SELECT major FROM student GROUP BY major ORDER BY count(*) DESC LIMIT 1)
What engine has an output of ps (kw; hp) @4700 rpm?
SELECT engine FROM table_name_85 WHERE output = "ps (kw; hp) @4700 rpm"
Name the team for school of milford
SELECT team FROM table_name_44 WHERE school = "milford"
What is the percentage of female audiences who viewed movies with rating 2?
SELECT CAST(SUM(IIF(T2.u_gender = 'F', 1, 0)) AS REAL) * 100 / COUNT(T2.userid) FROM u2base AS T1 INNER JOIN users AS T2 ON T1.userid = T2.userid WHERE T1.rating = 2
What is the result of districk georgia's 1st?
SELECT result FROM table_27021001_1 WHERE district = "Georgia's 1st"
how tall is someone who is able to wear 33-24-35
SELECT height FROM table_27515452_3 WHERE sizes = "33-24-35"
In what tie were Leeds United the away team?
SELECT MAX(tie_no) FROM table_17736890_5 WHERE away_team = "Leeds United"
List the name of teachers whose hometown is not `` Little Lever Urban District '' .
SELECT name FROM teacher WHERE hometown <> "little lever urban district"
What's the compression ratio of the model with L35 RPO and 5 applications?
SELECT compression_ratio FROM table_20007413_6 WHERE rpo = "L35" AND applications = 5
What Season has Goals greater than 0 and less than 33 Apps?
SELECT season FROM table_name_34 WHERE goals > 0 AND apps < 33
Which payment method is used by most customers?
SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1
Who led in assists on January 17, and with how many?
SELECT high_assists FROM table_27712702_9 WHERE date = "January 17"
Which customer status code has least number of customers?
SELECT customer_status_code FROM Customers GROUP BY customer_status_code ORDER BY COUNT(*) LIMIT 1