sentence
stringlengths
3
347
sql
stringlengths
18
804
How much freedom can did the people of Guinea experience in 2013?
SELECT freedom_in_the_world_2013 FROM table_1604579_2 WHERE country = "Guinea"
What is the mean vertical relief in feet when the rank is more than 40 and the location is va0573?
SELECT AVG(vertical_relief__ft_) FROM table_name_94 WHERE rank > 40 AND location = "va0573"
How many employees does role code ED have?
SELECT count ( * ) from employees where role_code = "ED"
What is the state where the title is listed as count?
SELECT state FROM table_name_63 WHERE title = "count"
What is Height in Ft., when Years With Spurs is 1973-74?
SELECT height_in_ft FROM table_name_87 WHERE years_with_spurs = "1973-74"
Which year had the most number of trips that started at stations in San Francisco?
SELECT SUBSTR(CAST(T1.start_date AS TEXT), INSTR(T1.start_date, ' '), -4) FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T2.city = 'San Francisco' GROUP BY T1.start_station_name ORDER BY COUNT(T1.id) DESC LIMIT 1
Which attractions did Vincent go to?
SELECT * FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Vincent"
What is the market share of Chabudai?
SELECT Market_Rate FROM furniture WHERE name = "Chabudai"
Calculate the percentage of running business among all business.
SELECT CAST(SUM(CASE WHEN active = 'true' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(business_id) FROM Business
Return the total revenue of companies with headquarters in Tokyo or Taiwan.
SELECT sum(revenue) FROM manufacturers WHERE Headquarter = 'Tokyo' OR Headquarter = 'Taiwan'
what is the virtual callsign if is wnet
SELECT _virtual_ FROM table_1979203_1 WHERE callsign = "WNET"
Among the players that weigh more than 90 kg, what is the name of the player that has the most attendance in the player's first 7 years of NHL career?
SELECT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T2.weight_in_kg > 90 AND T1.sum_7yr_GP = ( SELECT MAX(T1.sum_7yr_GP) FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T2.weight_in_kg > 90 )
Please show the team that has the most number of technicians.
SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1
What is the percentage of solutions for the method that needs to be compiled in the English methods?
SELECT CAST(SUM(CASE WHEN T1.WasCompiled = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(Lang) FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Lang = 'en'
what would be the name of the station?
SELECT t2.id,t2.network_name FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id where t1.precipitation = 10
who was running in the section pennsylvania 5
SELECT candidates FROM table_2668378_13 WHERE district = "Pennsylvania 5"
What player is from Seton Hall University?
SELECT player FROM table_name_24 WHERE school = "seton hall university"
Who was the EP winning team when the FM winning team was Brabham - Ford and the HM winning team was Osca?
SELECT ep_winning_team FROM table_29225103_2 WHERE fm_winning_team = "Brabham - Ford" AND hm_winning_team = "Osca"
How many perpetrators are there?
SELECT COUNT(*) FROM perpetrator
What are the last names of those teachers?
SELECT last_name FROM Teachers EXCEPT SELECT T1.last_name FROM Teachers AS T1 JOIN Detention AS T2 ON T1.teacher_id = T2.teacher_id
Where are the shelves where the down tube product was stored?
SELECT T2.Shelf FROM Product AS T1 INNER JOIN ProductInventory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'Down Tube'
What is the lowest value for Points, when Games is greater than 34, and when Name is Andrew Panko?
SELECT MIN(points) FROM table_name_98 WHERE games > 34 AND name = "andrew panko"
What is Place, when Player is "John Cook"?
SELECT place FROM table_name_49 WHERE player = "john cook"
When did eleonor magdalene of the palatinate-neuburg become duchess?
SELECT became_duchess FROM table_name_77 WHERE name = "eleonor magdalene of the palatinate-neuburg"
What's the number of the player from Boise State?
SELECT no FROM table_10015132_3 WHERE school_club_team = "Boise State"
What are the names of the singers who are not French citizens?
SELECT Name FROM singer WHERE Citizenship != "France"
Return the detail of the location named "UK Gallery".
SELECT Other_Details FROM LOCATIONS WHERE Location_Name = "UK Gallery"
What percentage of other candidates did the county which voted 52.1% for Kerry vote for?
SELECT MAX(others_number) FROM table_name_69 WHERE kerry_percentage = "52.1%"
What is the total quantity that Cindy Stewart order "Lexmark X 9575 Professional All-in-One Color Printer" in the south superstore?
SELECT SUM(T1.Quantity) FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T2.`Customer Name` = 'Cindy Stewart' AND T3.`Product Name` = 'Lexmark X 9575 Professional All-in-One Color Printer'
In which region have the most 1-star reviews been done?
SELECT T3.Region FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN state AS T3 ON T2.state_abbrev = T3.StateCode WHERE T1.Stars = 1 GROUP BY T3.Region ORDER BY COUNT(T3.Region) DESC LIMIT 1
What brand of vehicle won a race driven by Tazio Nuvolari?
SELECT winning_constructor FROM table_name_81 WHERE winning_drivers = "tazio nuvolari"
What episode number in the series had 2.528 million u.s. viewers?
SELECT no_in_series FROM table_24223834_3 WHERE us_viewers__in_millions_ = "2.528"
List out the number of object samples in image no.41 which are in the class of "kitchen"?
SELECT SUM(CASE WHEN T2.OBJ_CLASS = 'kitchen' THEN 1 ELSE 0 END) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 41
Of the arts-books and arts-design categories, which one has more podcasts and what is the numerical difference between them?
SELECT ( SELECT category FROM categories WHERE category = 'arts-books' OR category = 'arts-design' GROUP BY category ORDER BY COUNT(podcast_id) DESC LIMIT 1 ) "has more podcasts" , ( SELECT SUM(CASE WHEN category = 'arts-books' THEN 1 ELSE 0 END) - SUM(CASE WHEN category = 'arts-design' THEN 1 ELSE 0 END) FROM categories ) "differenct BETWEEN arts-books and arts-design"
What was Kilgore's (R) percentage when Potts (I) polled at 1%?
SELECT kilgore__r_ FROM table_name_95 WHERE potts__i_ = "1%"
How many instructors are in the department with the highest budget, and what is their average salary?
SELECT avg(T1.salary) , count(*) FROM instructor AS T1 JOIN department AS T2 ON T1.dept_name = T2.dept_name ORDER BY T2.budget DESC LIMIT 1
How many pages does the Catalan language have in Wikipedia?
SELECT pages FROM langs WHERE lang = 'ca'
What is the title of the film that has the highest high market estimation.
SELECT t1.title FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID ORDER BY high_estimate DESC LIMIT 1
I want the fastest lap for round of 16
SELECT fastest_lap FROM table_name_18 WHERE round = 16
State the phone name which has the least price on the list?
SELECT Name FROM phone AS T2 ORDER BY price ASC LIMIT 1
What are the first names of all students who took ACCT-211 and received a C?
SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211' AND T2.enroll_grade = 'C'
Return the id and full name of the customer who has the fewest accounts.
SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1
Provide the products list which were ordered in 1996 by the company in Norway.
SELECT T4.ProductName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID INNER JOIN Products AS T4 ON T3.ProductID = T4.ProductID WHERE T1.Country = 'Norway' AND STRFTIME('%Y', T2.OrderDate) = '1996'
What is the name of the ship with the largest tonnage?
SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1
What is Place, when Weapon is "35mm/Small arms fire"?
SELECT place FROM table_name_6 WHERE weapon = "35mm/small arms fire"
What type of car does Jeff Fuller drive?
SELECT car_s_ FROM table_2182170_1 WHERE driver_s_ = "Jeff Fuller"
What is the name of the customer who has the largest number of orders?
SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count ( * ) DESC LIMIT 1
Who is the constructor whose circuit was Oulton Park?
SELECT constructor FROM table_name_71 WHERE circuit = "oulton park"
Find the name of dorms that do not have amenity TV Lounge.
SELECT dorm_name FROM dorm EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge'
What is the lowest numbered lane of Sue Rolph with a rank under 5?
SELECT MIN(lane) FROM table_name_17 WHERE name = "sue rolph" AND rank < 5
Ranking higher than 2, what Team has Player Paolo Maldini?
SELECT team FROM table_name_52 WHERE rank > 2 AND name = "paolo maldini"
Find the number of departments in each school.
SELECT count(DISTINCT dept_name) , school_code FROM department GROUP BY school_code
Find the country of origin for the artist who made the least number of songs?
SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY count(*) LIMIT 1
Give me the product type, name and price for all the products supplied by supplier id 3.
SELECT T2.product_type_code, T2.product_name, T2.product_price FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 3
Which county has a median family income of $50,227?
SELECT county FROM table_name_99 WHERE median_family_income = "$50,227"
Who is the director of the fimm Biola Tak Berdawai?
SELECT director FROM table_13719788_1 WHERE original_title = "Biola tak berdawai"
can you give me the students with president vote 1004 | What attributes of that student do you want? | first and last names please
SELECT T1.LNAME, T1.FNAME FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.StuID WHERE T2.PRESIDENT_VOTE = "1004"
What is the capital of the country that has the Licancabur Mountain?
SELECT T4.Capital FROM mountain AS T1 INNER JOIN geo_mountain AS T2 ON T1.Name = T2.Mountain INNER JOIN province AS T3 ON T3.Name = T2.Province INNER JOIN country AS T4 ON T4.Province = T3.Name WHERE T1.Name = 'Licancabur'
Find the name of customers who are living in Colorado?
SELECT t1.customer_name 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.state_province_county = "Colorado"
Name the team in which the coach won the title 'NBA Coach of the Year' in 2010.
SELECT DISTINCT T1.tmID FROM coaches AS T1 INNER JOIN awards_coaches AS T2 ON T1.coachID = T2.coachID WHERE T2.year = 2010 AND T2.award = 'NBA Coach of the Year'
List down the name of venues in season 2.
SELECT T2.Venue_Name FROM Match AS T1 INNER JOIN Venue AS T2 ON T2.Venue_Id = T1.Venue_Id WHERE T1.Season_Id = 2 GROUP BY T2.Venue_Name
What is the title of episode that won the Best International TV Series Award in 2017?
SELECT T2.title FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE SUBSTR(T1.year, 1, 4) = '2017' AND T1.award = 'Best International TV Series' AND T1.result = 'Winner';
Return the dates of ceremony and the results of all music festivals
SELECT Date_of_ceremony , RESULT FROM music_festival
What are the maximum price and score of wines in each year?
SELECT max(Price) , max(Score) , YEAR FROM WINE GROUP BY YEAR
what's the electorate where election date is 16 cannot handle non-empty timestamp argument!
SELECT electorate FROM table_1193568_1 WHERE election_date = "16 Cannot handle non-empty timestamp argument!"
What is the result for opponent TCU?
SELECT result FROM table_name_89 WHERE opponent_number = "tcu"
Who is the player with a t7 place?
SELECT player FROM table_name_56 WHERE place = "t7"
How many Annual Meeting events happened in the United Kingdom region?
SELECT count(*) FROM region AS t1 JOIN party AS t2 ON t1.region_id = t2.region_id JOIN party_events AS t3 ON t2.party_id = t3.party_id WHERE t1.region_name = "United Kingdom" AND t3.Event_Name = "Annaual Meeting"
What is the distinguished service cross when the navy cross is Coast Guard commendation medal?
SELECT distinguished_service_cross FROM table_2104176_1 WHERE navy_cross = "Coast Guard Commendation Medal"
Who are the players played both in NHL and WHA. List the given name and first year they were in NHL and first year in WHA.
SELECT nameGiven, firstNHL, firstWHA FROM Master WHERE firstNHL IS NOT NULL AND firstWHA IS NOT NULL
What type of political party Sherrod Brown has in 2005?
SELECT T1.party FROM `current-terms` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.first_name = 'Sherrod' AND T2.last_name = 'Brown' AND T1.start LIKE '%2005%'
In the West, how many stores are there in the city whose land area is below 20,000,000?
SELECT SUM(CASE WHEN T1.Region = 'West' AND T2.`Land Area` < 20000000 THEN 1 ELSE 0 END) FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1.StateCode
What player has E as the to par, and The United States as the country?
SELECT player FROM table_name_6 WHERE to_par = "e" AND country = "united states"
Find the number of dog pets that are raised by female students (with sex F).
SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.petid = T3.petid WHERE T1.sex = 'F' AND T3.pettype = 'dog'
What is Tony O'Sullivan's county?
SELECT county FROM table_name_67 WHERE player = "tony o'sullivan"
What are the last names of staff with email addressed containing the substring "wrau"?
SELECT last_name FROM staff WHERE email_address LIKE "%wrau%"
What is the total number of Bronze when rank is 11, and the total is less than 1?
SELECT COUNT(bronze) FROM table_name_8 WHERE rank = "11" AND total < 1
Who was the writer that the director was Alice Troughton and the producer was Phil Collinson?
SELECT writer FROM table_name_89 WHERE producer = "phil collinson" AND director = "alice troughton"
Name the saka era for malayalam മിഥുനം
SELECT saka_era FROM table_169955_1 WHERE in_malayalam = "മിഥുനം"
Provide the genre of a movie title with a tagline of "A long time ago in a galaxy far, far away…".
SELECT T3.genre_name FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T3.genre_id = T2.genre_id WHERE T1.tagline = 'A long time ago in a galaxy far, far away...'
What is the id of the reviewer whose name has substring “Mike”?
SELECT rID FROM Reviewer WHERE name LIKE "%Mike%"
How many states that have some college students playing in the mid position but not in the goalie position.
SELECT COUNT(*) FROM (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')
Find the 5-star business in Ahwatukee, AZ and identify it's business category.
SELECT T1.business_id, T3.category_name FROM Business AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id WHERE T1.city = 'Ahwatukee' AND T1.stars = 5
What are the names, headquarters and founders of the company with the highest revenue?
SELECT name , headquarter , founder FROM manufacturers ORDER BY revenue DESC LIMIT 1
Which team is 9th in wickets?
SELECT fielding_team FROM table_1670921_1 WHERE wicket = "9th"
How many viewers were there in Sydney for the episode when there were 334000 in Melbourne?
SELECT sydney FROM table_24291077_4 WHERE melbourne = 334000
Among the criminal sexual assaults in the district of Adnardo Gutierrez, how many cases happened in the residence?
SELECT COUNT(T2.report_no) FROM District AS T1 INNER JOIN Crime AS T2 ON T2.district_no = T1.district_no INNER JOIN FBI_Code AS T3 ON T3.fbi_code_no = T2.fbi_code_no WHERE T3.title = 'Criminal Sexual Assault' AND T1.commander = 'Adnardo Gutierrez' AND T2.location_description = 'RESIDENCE'
What is the part 3 of the word in class 7a?
SELECT part_3 FROM table_1745843_8 WHERE class = "7a"
What are the movie titles with the highest average rating and what are those ratings?
SELECT T2.title , avg(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY avg(T1.stars) DESC LIMIT 1
Name the incumbent for candidates Joseph Hiester (dr) 83.2% Roswell Wells (f) 16.8%.
SELECT incumbent FROM table_2668401_12 WHERE candidates = "Joseph Hiester (DR) 83.2% Roswell Wells (F) 16.8%"
What is the name and country of origin for each artist who has released a song with a resolution higher than 900?
SELECT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.resolution > 900 GROUP BY T2.artist_name HAVING count(*) >= 1
Which positions were in Toronto in 2004?
SELECT position FROM table_10015132_2 WHERE years_in_toronto = "2004"
When semi final (2nd leg) is the round what is the highest attendance?
SELECT MAX(attendance) FROM table_28181401_4 WHERE round = "Semi Final (2nd leg)"
What is the precise location or coordinate where most of the robberies in Rogers Park occurred?
SELECT T2.latitude, T2.longitude FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T1.community_area_no = T2.community_area_no INNER JOIN FBI_Code AS T3 ON T2.fbi_code_no = T3.fbi_code_no WHERE T1.community_area_name = 'Rogers Park' AND T3.title = 'Robbery' AND T3.fbi_code_no = 3
How many lost stats have a played number of less than 8?
SELECT COUNT(lost) FROM table_name_1 WHERE played < 8
What is the total number of Yds/Att where Net Yds was 1818, and Rank was larger than 1?
SELECT COUNT(yds_att) FROM table_name_10 WHERE net_yds = 1818 AND rank > 1
What Opponent has a Site of razorback stadium • fayetteville, ar, and a Date of october 7, 1967?
SELECT opponent FROM table_name_29 WHERE site = "razorback stadium • fayetteville, ar" AND date = "october 7, 1967"
How many stories does that building have?
SELECT stories FROM buildings ORDER BY Height DESC LIMIT 1
Which continent has the most diverse languages?
SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Continent ORDER BY COUNT(*) DESC LIMIT 1
What player represented Vista Murrieta High School?
SELECT player FROM table_11677691_10 WHERE school = "Vista Murrieta High school"