sentence
stringlengths
3
347
sql
stringlengths
18
804
What is the id, name and nationality of the architect who built most mills?
SELECT T1.id , T1.name , T1.nationality FROM architect AS T1 JOIN mill AS T2 ON T1.id = T2.architect_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1
What is the year to april when the revenue is 434.8 million dollars?
SELECT year_to_april FROM table_18077713_1 WHERE revenue__us_$million_ = "434.8"
Name the goalies who are good at left hand and also has become a coach after retirement. Name all teams he had played before.
SELECT DISTINCT firstName, lastName, T3.name FROM Goalies AS T1 INNER JOIN Master AS T2 ON T2.playerID = T1.playerID INNER JOIN Teams AS T3 ON T1.lgID = T3.lgID WHERE T1.playerID IS NOT NULL AND T2.coachID IS NOT NULL AND T2.shootCatch = 'L' AND T2.pos = 'G'
how many Lessons there
SELECT count ( * ) FROM Lessons
What is the lowest week number that had a game on December 3, 1967?
SELECT MIN(week) FROM table_name_97 WHERE date = "december 3, 1967"
Name the womens singles for korea open super series
SELECT womens_singles FROM table_14496232_2 WHERE tour = "Korea Open Super Series"
What is the average capacity of each cinema?
SELECT avg ( capacity ) from cinema
What is the method against Björn Bregy?
SELECT method FROM table_name_29 WHERE opponent = "björn bregy"
How many caps does stephen hoiles have?
SELECT SUM(caps) FROM table_name_96 WHERE player = "stephen hoiles"
How many touchdowns were there when Heston was in play?
SELECT MAX(touchdowns) FROM table_14342592_7 WHERE player = "Heston"
What is the amount of match points for a club that lost 18 and has 11 bonus points?
SELECT match_points FROM table_name_6 WHERE lost = "18" AND bonus_points = "11"
How much does the rental cost for address id 3?
SELECT monthly_rental from Student_Addresses where address_id = 3
What are airport names at City 'Aberdeen'?
SELECT AirportName FROM AIRPORTS WHERE City = "Aberdeen"
What is the highest number lost with more than 29 points and an against less than 19?
SELECT MAX(lost) FROM table_name_58 WHERE points > 29 AND against < 19
What is the e-mail address of the employee who switched departments for the most times?
SELECT T2.EmailAddress FROM EmployeeDepartmentHistory AS T1 INNER JOIN EmailAddress AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID GROUP BY T2.BusinessEntityID ORDER BY COUNT(T1.DepartmentID) DESC LIMIT 1
Can you give me the billing cities for these invoices? | here are the billing cities of the invoices from the state in the USA with the most invoices | How about postal codes for these invoices?
SELECT DISTINCT billing_postal_code FROM invoices WHERE billing_state = ( SELECT billing_state FROM invoices WHERE billing_country = "USA" GROUP BY billing_state ORDER BY COUNT ( * ) DESC LIMIT 1 )
What is the name of party with most number of members?
SELECT T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id ORDER BY count(*) DESC LIMIT 1
Among the users who received low compliments from other users, which users joined Yelp in 2012?
SELECT DISTINCT T2.user_id FROM Users AS T1 INNER JOIN Users_Compliments AS T2 ON T1.user_id = T2.user_id WHERE T1.user_yelping_since_year = 2012 AND T2.number_of_compliments = 'Low'
What are the average, maximum and total revenues of all companies?
SELECT avg(revenue) , max(revenue) , sum(revenue) FROM manufacturers
Which school is in Riverside, CA?
SELECT school FROM table_name_76 WHERE hometown = "riverside, ca"
@ Chicago had a high points of what?
SELECT high_points FROM table_17355408_7 WHERE team = "@ Chicago"
What are the names and ids of all countries with at least one car maker?
SELECT T1.CountryName , T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING count(*) >= 1;
Which Position has a School/Club Team of illinois?
SELECT position FROM table_name_89 WHERE school_club_team = "illinois"
What is the maximum, minimum and average years spent working on a school bus?
SELECT max(years_working) , min(years_working) , avg(years_working) FROM school_bus
Please list the phone numbers of all the suppliers for the parts ordered in order no.1.
SELECT T2.s_phone FROM lineitem AS T1 INNER JOIN supplier AS T2 ON T1.l_suppkey = T2.s_suppkey WHERE T1.l_orderkey = 1
Which Swimming has a Total larger than 35, and a Volleyball of 1?
SELECT swimming FROM table_name_96 WHERE total > 35 AND volleyball = "1"
What was the result in a year before 2013 that the nomination category was Presenter Talent Show?
SELECT result FROM table_name_52 WHERE year < 2013 AND category = "presenter talent show"
Which Total has a Bronze larger than 12, and a Silver larger than 772, and a Country of thailand?
SELECT SUM(total) FROM table_name_70 WHERE bronze > 12 AND silver > 772 AND country = "thailand"
What are the official languages of the country where you can find the city with the least population?
SELECT T2.Language FROM City AS T1 INNER JOIN CountryLanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.IsOfficial = 'T' ORDER BY T1.Population ASC LIMIT 1
In what language is the Lyrics of the release on August 10, 2005 with Catalog number of TOCP-66427?
SELECT lyrics FROM table_name_48 WHERE date = "august 10, 2005" AND catalog_number = "tocp-66427"
Excellent! Can you now list for me all of the staff IDs that have researcher as their role code?
SELECT staff_id FROM Project_Staff where role_code = 'researcher'
What are the names and other details for accounts corresponding to the customer named Meaghan Keeling?
SELECT T1.account_name , T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Meaghan" AND T2.customer_last_name = "Keeling"
What is the total overall in round 1, in which Charles White was a player?
SELECT SUM(overall) FROM table_name_2 WHERE player = "charles white" AND round < 1
Return the name, phone number and email address for the customer with the most orders.
SELECT T1.customer_name , T1.customer_phone , T1.customer_email FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id ORDER BY count(*) DESC LIMIT 1
What is the review length of user 35026 to business with business ID 2?
SELECT review_length FROM Reviews WHERE user_id = 35026 AND business_id = 2
Which formats have a region of Europe and Catalog value of WEBB185?
SELECT format_s_ FROM table_name_28 WHERE region = "europe" AND catalog = "webb185"
What horror movies have a running time of at least 2? Please list movie IDs.
SELECT T1.movieid FROM movies2directors AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid WHERE T2.runningtime >= 2 AND T1.genre = 'Horror'
How many years has Sasol Jordan Yamaha as an Entrant?
SELECT AVG(year) FROM table_name_79 WHERE entrant = "sasol jordan yamaha"
Which coach has 0 conference titles, more than 2 seasons, higher than 87 losses and 0 NCAA?
SELECT coach FROM table_name_18 WHERE conference_titles = "0" AND seasons > 2 AND losses > 87 AND ncaa = "0"
After season 2010 how many different kinds of injuries were there?
SELECT count ( DISTINCT T1.injury ) FROM injury_accident AS T1 JOIN game AS T2 ON T1.game_id = T2.id WHERE T2.season > 2010
What is the class of the co-driver emanuele pirro jj lehto?
SELECT class FROM table_name_58 WHERE co_drivers = "emanuele pirro jj lehto"
What are the names and seatings for all tracks opened after 2000, ordered by seating?
SELECT name , seating FROM track WHERE year_opened > 2000 ORDER BY seating
actually i mean which movie rating is high | Would you like the movie with the greatest number of rating stars? | exactly
SELECT * FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID ORDER BY T1.stars DESC LIMIT 1
What is the movie id and rating date of the movie with 5 stars?
SELECT mID , ratingDate FROM Rating where stars = 5
What is FM 99.9's Format?
SELECT format FROM table_name_78 WHERE frequency = "fm 99.9"
Give the full name of the legislators with an independent party.
SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.party = 'Independent' GROUP BY T1.official_full_name
What position does Boggs play?
SELECT position FROM table_25517718_3 WHERE player = "Boggs"
What are characteristic names used at least twice across all products?
SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name HAVING COUNT(*) >= 2
Which week was the game on December 14, 1967?
SELECT week FROM table_name_27 WHERE date = "december 14, 1967"
What is the sum of Gold with Participants that are 4 and a Silver that is smaller than 0?
SELECT SUM(gold) FROM table_name_81 WHERE participants = 4 AND silver < 0
Show the name of the party that has the most delegates.
SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party ORDER BY COUNT(*) DESC LIMIT 1
How many strategy games are there?
SELECT COUNT(CASE WHEN T1.genre_name = 'Strategy' THEN T2.id ELSE NULL END) FROM genre AS T1 INNER JOIN game AS T2 ON T1.id = T2.genre_id
How many wins are there for the Races of 12/12?
SELECT wins FROM table_name_36 WHERE races_† = "12/12"
What are the average extra runs given in the second innings of every match?
SELECT AVG(Innings_No) FROM Extra_Runs WHERE Innings_No = 2
How many years in all was less than 105,005 the total for the year?
SELECT COUNT(year) FROM table_name_59 WHERE total_for_year < 105 OFFSET 005
In what district was Tim Holden the incumbent?
SELECT district FROM table_1341453_40 WHERE incumbent = "Tim Holden"
Show the names of conductors that have conducted more than one orchestras.
SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID HAVING COUNT(*) > 1
Among Daisey Lamball's orders, how many were shipped via International shipping?
SELECT COUNT(*) FROM customer AS T1 INNER JOIN cust_order AS T2 ON T1.customer_id = T2.customer_id INNER JOIN shipping_method AS T3 ON T3.method_id = T2.shipping_method_id WHERE T1.first_name = 'Daisey' AND T1.last_name = 'Lamball' AND T3.method_name = 'International'
Show the ids of all the faculty members who participate in an activity and advise a student.
SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student
If the representative is Dave Hall, when was the term limited?
SELECT term_limited FROM table_26131768_4 WHERE representative = "Dave Hall"
How many different kinds of lens brands are there?
SELECT count(DISTINCT brand) FROM camera_lens
Name the date for irish points being 89
SELECT date FROM table_22875369_3 WHERE irish_points = 89
What schools were founded before 1890?
SELECT School FROM school WHERE Founded < 1890
Which items from store 1 have the highest units sold during rainy day?
SELECT T2.item_nbr FROM weather AS T1 INNER JOIN sales_in_weather AS T2 ON T1.`date` = T2.`date` INNER JOIN relation AS T3 ON T2.store_nbr = T3.store_nbr AND T1.station_nbr = T3.station_nbr WHERE T2.store_nbr = 1 AND T1.codesum LIKE '%' OR 'RA' OR '%' GROUP BY T2.item_nbr ORDER BY T2.units DESC LIMIT 1
State the number of states in the United Kingdom.
SELECT COUNT(State) AS State_number FROM location WHERE Country = 'United Kingdom'
On what day did tommy ellis drive?
SELECT date FROM table_28178756_1 WHERE driver = "Tommy Ellis"
What is the week for Result of w 28-17?
SELECT week FROM table_name_70 WHERE result = "w 28-17"
What club is R. H. C. Human who has a right arm medium pace bowling style a member of?
SELECT club FROM table_name_41 WHERE bowling_style = "right arm medium pace" AND name = "r. h. c. human"
If the velocity angle is ln[(1 + √5)/2] ≅ 0.481, what is the condition/parameter?
SELECT condition_parameter FROM table_15314901_1 WHERE velocity_angle_η_in_i_radians = "ln[(1 + √5)/2] ≅ 0.481"
What's the record on April 12 when the location was The Omni?
SELECT record FROM table_name_25 WHERE location_attendance = "the omni" AND date = "april 12"
how many earn below the average?
SELECT count ( * ) FROM Employee WHERE salary < ( SELECT avg ( salary ) FROM Employee )
What is the Team 2 with a Team 1 that is milli piyango sk?
SELECT team_2 FROM table_name_34 WHERE team_1 = "milli piyango sk"
What are the names of all the states with college students playing in the mid position but no goalies?
SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie'
WHAT IS THE BOOKMARKING, TAGGING, RATING AND COMMENTS WITH NO LIST MANAGEMENT, NO CHARTING, NO WEB PUBLISHING, OF MICROSOFT EXCHANGE SERVER?
SELECT bookmarking, _tagging, _rating_and_comments FROM table_name_1 WHERE list_management = "no" AND charting = "no" AND web_publishing = "no" AND name = "microsoft exchange server"
What are the release dates for songs in 2003?
SELECT release_date FROM table_12588029_3 WHERE year = 2003
What was the playing surface for the Tournament of Great Britain F16?
SELECT surface FROM table_name_44 WHERE tournament = "great britain f16"
What are the different majors?
SELECT DISTINCT Major FROM Student
how many number of storms for each region?
SELECT T1.region_name , count ( * ) FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id
what is the debut year for player terry fulton with games less than 51?
SELECT AVG(debut_year) FROM table_name_83 WHERE player = "terry fulton" AND games < 51
What's the IHSAA class of the Red Devils?
SELECT ihsaa_class FROM table_name_77 WHERE mascot = "red devils"
What is the invoice number and invoice date for the invoice with most number of transactions?
SELECT T2.invoice_number , T2.invoice_date FROM Financial_transactions AS T1 JOIN Invoices AS T2 ON T1.invoice_number = T2.invoice_number GROUP BY T1.invoice_number ORDER BY count(*) DESC LIMIT 1
How many aircrafts have distance between 1000 and 5000?
SELECT count(*) FROM Aircraft WHERE distance BETWEEN 1000 AND 5000
How many churches have a wedding in year 2016?
SELECT COUNT(DISTINCT church_id) FROM wedding WHERE YEAR = 2016
What are the minutes of the Player from Real Madrid Club with a Rank of 7 or larger?
SELECT SUM(minutes) FROM table_name_73 WHERE rank > 7 AND club = "real madrid"
How many golds for nations with over 0 silvers, over 1 total, and over 3 bronze?
SELECT COUNT(gold) FROM table_name_40 WHERE silver > 0 AND total > 1 AND bronze > 3
What is the average number of institutions? | Average number of institutions over what? | What is the institution type with the largest number of institutions?
SELECT TYPE FROM institution GROUP BY TYPE ORDER BY count ( * ) DESC LIMIT 1
Name the candidates for georgia 8
SELECT candidates FROM table_1341604_11 WHERE district = "Georgia 8"
How many addresses are in the district of California?
SELECT count(*) FROM address WHERE district = 'California'
How many kicks did he get in the year when he played 7 games?
SELECT kicks FROM table_name_61 WHERE games = "7"
In what Week is the Opponent the New Orleans Saints?
SELECT AVG(week) FROM table_name_43 WHERE opponent = "new orleans saints"
Which city does student Linda Smith live in?
SELECT city_code FROM Student WHERE Fname = "Linda" AND Lname = "Smith";
What is the 1st party during the 1857 election?
SELECT 1 AS st_party FROM table_name_34 WHERE election = "1857"
Which Team has a Record of 17–8?
SELECT team FROM table_name_74 WHERE record = "17–8"
What is the percentage of users who are in the same behavior category as "Academic Information"?
SELECT SUM(IIF(T1.category = 'Academic Information', 1.0, 0)) / COUNT(T2.app_id) AS per FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T1.label_id = T2.label_id
find the average age
select avg ( age ) from person
What is the venue for week 1?
SELECT venue FROM table_name_58 WHERE week = "1"
list the name for the largest amount of donation
SELECT donator_name FROM endowment ORDER BY amount DESC LIMIT 1
Find and list the full name of customers who rented more than five types of movies.
SELECT T.first_name, T.last_name FROM ( SELECT T1.first_name, T1.last_name, COUNT(T1.customer_id) AS num FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id INNER JOIN film_category AS T5 ON T4.film_id = T5.film_id GROUP BY T1.first_name, T1.last_name ) AS T WHERE T.num > 5
What about the icao? | the icao of Aloha Airlines is AAH | What's the call sign of airline id 5?
SELECT callsign from airlines where alid = 5
Which year opened is located in west mifflin, pennsylvania?
SELECT year_opened FROM table_name_50 WHERE location = "west mifflin, pennsylvania"