sentence
stringlengths
3
347
sql
stringlengths
18
804
How many countries have governments that are republics?
SELECT count(*) FROM country WHERE GovernmentForm = "Republic"
What is the average BMI of an All-star player?
SELECT AVG(CAST(T1.weight AS REAL) / (T1.height * T1.height)) FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID
How many points did ginger have when she was ranked 5th on a 350cc class bike?
SELECT COUNT(points) FROM table_name_73 WHERE class = "350cc" AND rank = "5th"
What about the numbers of papers published by University of Oxford?
SELECT count ( DISTINCT t1.title ) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = "University of Oxford"
What mark has over 813 points in the United States, and a 0.152 react?
SELECT mark FROM table_name_51 WHERE points > 813 AND country = "united states" AND react > 0.152
What day was the attendance at the staples center 18,176?
SELECT date FROM table_13619135_7 WHERE location_attendance = "Staples Center 18,176"
What is the smallest frames per minute when the pixels are 5.0
SELECT least_compression_at_24_fps FROM table_1251878_3 WHERE mpix = "5.0"
What is the total number of episodes where alexa wyatt is the writer?
SELECT COUNT(series__number) FROM table_16175064_3 WHERE writer_s_ = "Alexa Wyatt"
What was the attendance at Moorabbin Oval?
SELECT AVG(crowd) FROM table_name_41 WHERE venue = "moorabbin oval"
Find the number of scientists involved for the projects that require more than 300 hours.
SELECT count(*) , T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project WHERE T1.hours > 300 GROUP BY T1.name
Who won 2nd place when albertina fransisca mailoa was the winner of the putri pariwisata contest?
SELECT 1 AS st_runner_up FROM table_24014744_1 WHERE putri_pariwisata_indonesia = "Albertina Fransisca Mailoa"
What is the Arena o Kazan?
SELECT arena__capacity_ FROM table_name_19 WHERE town = "kazan"
Give the mean GNP and total population of nations which are considered US territory.
SELECT avg(GNP) , sum(population) FROM country WHERE GovernmentForm = "US Territory"
How many times did Charles Jarrott report?
SELECT COUNT(report) FROM table_18893428_1 WHERE driver = "Charles Jarrott"
What actor was nominated for or won an award before 1971?
SELECT actor FROM table_name_94 WHERE year < 1971
What is the average administrative panel of the composition nominated by Taoiseach 0 times with a total less than 4?
SELECT AVG(administrative_panel) FROM table_name_36 WHERE nominated_by_the_taoiseach = 0 AND total < 4
Name the married filing jointly or qualified widow(er) with head of household being $117,451–$190,200
SELECT married_filing_jointly_or_qualified_widow_er_ FROM table_name_61 WHERE head_of_household = "$117,451–$190,200"
Provide a list of directors from the 1990s.
SELECT T2.director FROM movies_total_gross AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name AND CAST(SUBSTR(release_date, INSTR(release_date, ', ') + 1) AS int) BETWEEN 1990 AND 2000 GROUP BY T2.director
List all of the information about the music department's casts and crews.
SELECT DISTINCT person, name, birthdate, birth_name, birth_place , birth_region, birth_country, height_meters, nickname FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T2.category = 'Music Department';
Does Yelp business No."4960" have TV?
SELECT DISTINCT CASE WHEN T1.attribute_name LIKE 'Has TV' THEN 'yes' ELSE 'no' END FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T2.business_id = 4960
On what Date was the Home team Detroit Red Wings with a Record of 10–41–6?
SELECT date FROM table_name_61 WHERE home = "detroit red wings" AND record = "10–41–6"
Which work order transaction number has the highest product quantity?
SELECT TransactionID FROM TransactionHistory WHERE TransactionType = 'W' ORDER BY Quantity DESC LIMIT 1
What is the sum of the goals on 2007-06-16?
SELECT SUM(goals) FROM table_name_16 WHERE date = "2007-06-16"
Show the names of all reviewers.
SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name
What is the average total for 0 bronze?
SELECT AVG(total) FROM table_name_98 WHERE bronze < 0
Find the number of projects which each scientist is working on and scientist's name.
SELECT count(*) , T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name
Which country had the game that Away team made the most goals?
SELECT T2.country FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division GROUP BY T2.country ORDER BY SUM(T1.FTAG) DESC LIMIT 1
What is Record, when Event is "UFC 40"?
SELECT record FROM table_name_57 WHERE event = "ufc 40"
How many seed entries are there when points are 2175?
SELECT COUNT(seed) FROM table_29572583_19 WHERE points = 2175
What is the size of the crowd for the home team of Footscray?
SELECT crowd FROM table_name_28 WHERE home_team = "footscray"
State the email id of custormer id 1?
select email from customer where customerid = '1'
How many of the matches are Superover?
SELECT SUM(CASE WHEN T2.win_type = 'wickets' THEN 1 ELSE 0 END) FROM `Match` AS T1 INNER JOIN Win_By AS T2 ON T1.Win_Type = T2.Win_Id
How many hours does a mid need to play to meet the minimum?
SELECT min ( T2.HS ) FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID where T1.ppos = "mid" GROUP BY T1.pPos
How long does track Fast As a Shark has?
SELECT milliseconds FROM tracks WHERE name = "Fast As a Shark";
Which Earnings ($) is the lowest one that has a Rank of 1, and Events smaller than 22?
SELECT MIN(earnings___) AS $__ FROM table_name_60 WHERE rank = 1 AND events < 22
What is the average number of honorary professors in the economics department with 1 lecturer?
SELECT AVG(honorary_professors) FROM table_name_9 WHERE lecturers = 1 AND department = "economics"
What's the score at Olympic Stadium Tokyo, Japan?
SELECT score FROM table_name_49 WHERE venue = "olympic stadium tokyo, japan"
Which College/Junior/Club Team (league) does Matthew Bartkowski play for?
SELECT college_junior_club_team__league_ FROM table_name_31 WHERE player = "matthew bartkowski"
How many customers paid over the amount of 10 on August 2005?
SELECT COUNT(customer_id) FROM payment WHERE SUBSTR(payment_date, 1, 7) LIKE '2005-08'
What is the wheel arrangement of the locomotive with number 6 or 4?
SELECT wheel_arrangement FROM table_name_95 WHERE number = "6 or 4"
What is the city_code of the city that the most students live in?
SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY count(*) DESC LIMIT 1
What is the profession of Skaj Vikler, who entered the house on day 1 and was evicted on day 29?
SELECT profession FROM table_name_1 WHERE entered_the_house = "day 1" AND evicted = "day 29" AND name = "skaj vikler"
How about employee number?
SELECT T4.EMP_NUM FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code GROUP BY T3.dept_code ORDER BY count ( * ) DESC LIMIT 1
Name the league for 1994
SELECT league FROM table_name_16 WHERE year = "1994"
For how long did the complaint filed on 2017/3/27 by Rachel Hicks last?
SELECT T2.ser_time FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T1.first = 'Rachel' AND T1.last = 'Hicks' AND T2.`Date received` = '2017-03-27'
How many claim processing stages are there in total?
SELECT count(*) FROM claims_processing_stages
WHAT IS Val-de-Marne WITH Seine-Saint-Denis of 4.0%?
SELECT val_de_marne FROM table_name_52 WHERE seine_saint_denis = "4.0%"
Who wrote the episode with 7.52 million US viewers?
SELECT written_by FROM table_28688313_1 WHERE us_viewers__in_millions_ = "7.52"
Which store owns the fewest items?
SELECT * FROM inventory GROUP BY store_id ORDER BY count ( * ) asc LIMIT 1
Find the names of scientists who are not working on the project with the highest hours.
SELECT name FROM scientists EXCEPT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects)
Who did the Toronto Blue Jays play against where the score was 4 - 2?
SELECT opponent FROM table_name_66 WHERE score = "4 - 2"
What was the margin of victory when the winning score was −5 (69-69-73=211)?
SELECT margin_of_victory FROM table_name_21 WHERE winning_score = −5(69 - 69 - 73 = 211)
Indicate the address of the company Eastern Connection whose contact name is Ann Devon.
SELECT Address FROM Customers WHERE CompanyName = 'Eastern Connection' AND ContactName = 'Ann Devon'
What is the yacht type of Icap Leopard?
SELECT yacht AS type FROM table_25561560_2 WHERE yacht = "ICAP Leopard"
WHo won men's singles in 1994?
SELECT mens_singles FROM table_14904221_1 WHERE year = 1994
How many percent more of the Forks for the repository of solution No.53546 than No.1502?
SELECT CAST(SUM(CASE WHEN T2.Id = 53546 THEN T1.Forks ELSE 0 END) - SUM(CASE WHEN T2.Id = 1502 THEN T1.Forks ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN T2.Id = 1502 THEN T1.Forks ELSE 0 END) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId
What students aren't taught by Otha Moyer? | Did you want to return their full names? | Yes please
SELECT DISTINCT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom EXCEPT SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "OTHA" AND T2.lastname = "MOYER"
What was the loss of the game when the record was 32–34?
SELECT loss FROM table_name_52 WHERE record = "32–34"
Show the station name and number of trains in each station.
SELECT T2.name , count(*) FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id GROUP BY T1.station_id
what is the integrated in which the holding allied-unrelated is many?
SELECT holding FROM table_11944282_1 WHERE allied_unrelated = "Many"
What visitor has march 26 as the date?
SELECT visitor FROM table_name_17 WHERE date = "march 26"
what is the enrollment of cranbrook school
SELECT enrollment from school where school = "Cranbrook School"
List the last name of all current legislators who live in California.
SELECT T1.last_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.state = 'CA' GROUP BY T1.last_name
What was the method in round 1 of the UFC 20 event?
SELECT method FROM table_name_87 WHERE round = 1 AND event = "ufc 20"
Find the number of vocal types used in song "Demon Kitty Rag"?
SELECT count(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Demon Kitty Rag"
What is the most common type?
SELECT TYPE FROM operate_company GROUP BY TYPE ORDER BY count ( * ) DESC LIMIT 1
Which company placed the order with the id 10257?
SELECT T1.CompanyName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.OrderID = 10257
What is the average number of passengers carried via air transport per year by Bulgaria between 1970 to 1980? Indicate the country's system of trade.
SELECT AVG(T1.Value), T2.SystemOfTrade FROM Indicators AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.IndicatorName = 'Air transport, passengers carried' AND T1.Year >= 1970 AND T1.Year < 1981 AND T1.CountryName = 'Bulgaria'
When the earning per share is listed as 22.0 what is the year to april?
SELECT COUNT(year_to_april) FROM table_18077713_1 WHERE earnings_per_share__¢_ = "22.0"
What are the makers and models?
SELECT Maker , Model FROM MODEL_LIST;
List all high rebound entries from May 11.
SELECT high_rebounds FROM table_22654073_13 WHERE date = "May 11"
Find the name and capacity of products with price greater than 700 (in USD).
SELECT catalog_entry_name , capacity FROM Catalog_Contents WHERE price_in_dollars > 700
Tell me title name for all course ids....
SELECT course_id, title FROM course
Which location has 111 as the days held?
SELECT location FROM table_name_4 WHERE days_held = "111"
What is Celta's Agg.?
SELECT agg FROM table_name_81 WHERE team_1 = "celta"
The sales of how many territories is Nancy Davolio in charge of?
SELECT COUNT(T2.TerritoryID) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.FirstName = 'Nancy' AND T1.LastName = 'Davolio'
In what barony are both the townland Dawstown and the civil parish Matehy located?
SELECT barony FROM table_30120566_1 WHERE townland = "Dawstown" AND civil_parish = "Matehy"
Where was the match held when the result was win, and tko as the method?
SELECT location FROM table_name_32 WHERE res = "win" AND method = "tko"
What is the Winter in 1906?
SELECT winter FROM table_name_99 WHERE year = 1906
Find the cities which were once a host city after 2010?
SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T2.year > 2010
What is every value for TDP if model is x53xx?
SELECT tdp FROM table_2467150_2 WHERE model__list_ = "X53xx"
What year was the diesel fuel propulsion, with a length of 40', and numbers (quanity ordered) of 3701-3729 (29 buses), retired?
SELECT year AS Retired FROM table_name_2 WHERE fuel_propulsion = "diesel" AND length = "40'" AND numbers__quantity_ordered_ = "3701-3729 (29 buses)"
In which country Swan River ' Perth located ?
SELECT country FROM MATCH where Location = 'Swan River , Perth'
Excellent! Which had the greatest number of votes?
SELECT Player_name FROM player ORDER BY Votes DESC LIMIT 1
Which complex used the Soyuz (r) launcher to facilitate 14 orbital flights?
SELECT launch_complex FROM table_name_35 WHERE launcher = "soyuz (r)" AND flights = "14 orbital"
What are the first name and last name of Linda Smith's advisor?
SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T2.fname = "Linda" AND T2.lname = "Smith"
What is the latest year that Cicely Tyson is the Golden Globe Award actor?
SELECT MAX(year) FROM table_name_76 WHERE actor = "cicely tyson"
Please show the police forces and the number of counties with each police force.
SELECT Police_force , COUNT(*) FROM county_public_safety GROUP BY Police_force
Which episode of The simpson 20s: Season 20 has received the most nominations? Indicate the title.
SELECT T2.title FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id GROUP BY T1.episode_id ORDER BY COUNT(*) DESC LIMIT 1;
What are the names of the criteria under Center for World University Rankings?
SELECT T2.criteria_name FROM ranking_system AS T1 INNER JOIN ranking_criteria AS T2 ON T1.id = T2.ranking_system_id WHERE T1.system_name = 'Center for World University Rankings'
What is every origin for the destination of Manchester?
SELECT origin FROM table_3005999_1 WHERE destination = "Manchester"
Please show different types of artworks with the corresponding number of artworks of each type.
SELECT TYPE , COUNT(*) FROM artwork GROUP BY TYPE
What is Player, when Country is "England", and when Place is "T7"?
SELECT player FROM table_name_50 WHERE country = "england" AND place = "t7"
What is the id of the reviewer named Daniel Lewis?
SELECT rID FROM Reviewer WHERE name = "Daniel Lewis"
What is the rank of player Jason Dunstall?
SELECT rank FROM table_name_55 WHERE player = "jason dunstall"
How many songs have a resolution below 800?
SELECT count ( T2.song_name ) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.resolution < 800
When was the game developed by Microvision released?
SELECT initial_release_date FROM table_12744399_1 WHERE developer = "Microvision"
What were property taxes in a year when total revenue was $40,891,700 after 2002?
SELECT property_taxes FROM table_name_33 WHERE year > 2002 AND total_revenue = "$40,891,700"
Which Weekly Rank for a Live Final Show has an Official Ratings (millions) greater than 5.2?
SELECT weekly_rank FROM table_name_8 WHERE official_ratings__millions_ > 5.2 AND show = "live final"
Who is the script supervisor of the series in episode tt0629204?
SELECT T2.name FROM Credit AS T1 INNER JOIN Person AS T2 ON T2.person_id = T1.person_id WHERE T1.episode_id = 'tt0629204' AND T1.role = 'script supervisor'