sentence
stringlengths
3
347
sql
stringlengths
18
804
Among the teams that had more wins than loses in the year 2006, how many of them have over 100 points?
SELECT COUNT(tmID) FROM Teams WHERE year = 2006 AND W > L AND Pts > 100
What are the notes of the death events which has substring 'East'?
SELECT note FROM death WHERE note LIKE '%East%'
What was head count in 2010 where the farm production is 6.9?
SELECT MAX(2010 AS _population__000_) FROM table_13618358_1 WHERE agri_culture_b = "6.9"
Which money has player Jack Fleck with t1 place?
SELECT money___$__ FROM table_name_4 WHERE place = "t1" AND player = "jack fleck"
How many journalists are there?
SELECT count(*) FROM journalist
What original channel is associated with B Mountain Channel 9?
SELECT original_channel FROM table_name_39 WHERE b_mountain_channel = "9"
Who danced the Cha-Cha-Cha on November 18, 2008?
SELECT pair FROM table_name_2 WHERE dance = "cha-cha-cha" AND date = "november 18, 2008"
How many figures for Other in the district where the GN division is 95?
SELECT COUNT(other) FROM table_23777640_1 WHERE gn_divisions = 95
What is Round, when Tournament is "Paris"?
SELECT round FROM table_name_61 WHERE tournament = "paris"
What is Club Source [I ], when Name is "Andrew McCombie Category:Articles With hCards"?
SELECT club_source_[i_] FROM table_name_14 WHERE name = "andrew mccombie category:articles with hcards"
Which gene is ongoing and has an intramuscular route of administration?
SELECT gene FROM table_name_42 WHERE route_of_administration = "intramuscular" AND status = "ongoing"
What is the attendance that has a record of 43-28?
SELECT attendance FROM table_name_86 WHERE record = "43-28"
How many Bronze medals did the Nation with 0 Silver receive?
SELECT MAX(bronze) FROM table_name_37 WHERE silver < 0
List the names of climbers whose country is not Switzerland.
SELECT Name FROM climber WHERE Country != "Switzerland"
Who was the winner in the Tournament of Graz-Seiersberg?
SELECT winner FROM table_name_56 WHERE tournament = "graz-seiersberg"
When did NASA launch the wide field infrared explorer (wire)?
SELECT launch_date FROM table_name_11 WHERE space_agency = "nasa" AND name = "wide field infrared explorer (wire)"
How many distinct locations have the things with service detail 'Unsatisfied' been located in?
SELECT count ( DISTINCT T2.Location_Code ) FROM Things AS T1 JOIN Timed_Locations_of_Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.service_details = 'Unsatisfied'
How many ids are in part_fault_id...Tell me total number
SELECT count ( distinct part_fault_id ) from skills_required_to_fix
Of all the claims, what was the earliest date when any claim was made?
SELECT Date_Claim_Made FROM Claims ORDER BY Date_Claim_Made ASC LIMIT 1
Who was the Japan open runner up?
SELECT runner_up FROM table_name_21 WHERE tournament = "japan open"
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
Among professors with the highest popularity, how many of their students have research capability of 5?
SELECT COUNT(T1.student_id) FROM RA AS T1 INNER JOIN prof AS T2 ON T1.prof_id = T2.prof_id WHERE T1.capability = 5 ORDER BY T2.popularity DESC LIMIT 1
Provide business ids with opening hours 10AM on Saturday.
SELECT DISTINCT business_id FROM Business_Hours WHERE day_id = 6 AND opening_time = '10AM'
Find the name of the document that has been accessed the greatest number of times, as well as the count of how many times it has been accessed?
SELECT document_name , access_count FROM documents ORDER BY access_count DESC LIMIT 1
Name the average wins outdoor with rank more than 4 and wins less than 3 with outdoor wins more than 0
SELECT AVG(wins__outdoor_) FROM table_name_61 WHERE rank > 4 AND wins__total_ < 3 AND wins__indoor_ > 0
List in alphabetic order all different amenities.
SELECT amenity_name FROM dorm_amenity ORDER BY amenity_name
Which ERP W has a Frequency MHz larger than 89.1, and a City of license of de queen, arkansas?
SELECT erp_w FROM table_name_54 WHERE frequency_mhz > 89.1 AND city_of_license = "de queen, arkansas"
What's the total when the gold is less than 0 and silver is less than 1?
SELECT AVG(total) FROM table_name_95 WHERE silver = 1 AND gold < 0
Which membership card has more than 5 members?
SELECT Membership_card FROM member GROUP BY Membership_card HAVING count(*) > 5
What was the record on March 22?
SELECT record FROM table_name_58 WHERE date = "march 22"
Please list the names of the courses taken by Laughton Antonio.
SELECT T3.name FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T1.f_name = 'Laughton' AND T1.l_name = 'Antonio'
Find the name of dorms that can accommodate more than 300 students.
SELECT dorm_name FROM dorm WHERE student_capacity > 300
What Position did Aaron Williams play?
SELECT position FROM table_name_12 WHERE player = "aaron williams"
List the top 10 USA movies, by descending order, from the highest to the lowest, the user rating.
SELECT T1.movieid FROM u2base AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid WHERE T2.country = 'USA' GROUP BY T1.movieid ORDER BY AVG(T1.rating) DESC LIMIT 10
What is the quantity when the seats number was 16 and the class was kss 1913?
SELECT quantity FROM table_name_67 WHERE seats = 16 AND class = "kss 1913"
How many documents do not have expense reports?
SELECT count ( * ) FROM Documents WHERE document_id NOT IN ( SELECT document_id FROM Documents_with_expenses )
What is the name of the player who is a height of 182?
SELECT player FROM table_name_84 WHERE height = 182
What date were the high assists rondo (5) and the high rebounds rondo (10)?
SELECT date FROM table_name_18 WHERE high_assists = "rondo (5)" AND high_rebounds = "rondo (10)"
WHAT WAS THE SURFACE MADE OF WHEN THE OPPONENT WAS GEORGE KHRIKADZE?
SELECT surface FROM table_16741821_8 WHERE opponent = "George Khrikadze"
How many parks does Atlanta city have?
SELECT count(*) FROM park WHERE city = 'Atlanta';
What is the season of the game which causes the player 'Walter Samuel' to get injured?
SELECT T1.season FROM game AS T1 JOIN injury_accident AS T2 ON T1.id = T2.game_id WHERE T2.player = 'Walter Samuel'
What is the ICAO when the IATA is ika?
SELECT icao FROM table_name_19 WHERE iata = "ika"
How many Watts has a Class of a, and a Frequency of 91.5 fm, and a City of license of elkhart, kansas?
SELECT MIN(watts) FROM table_name_37 WHERE class = "a" AND frequency = "91.5 fm" AND city_of_license = "elkhart, kansas"
List countries that have more than one swimmer.
SELECT nationality , count(*) FROM swimmer GROUP BY nationality HAVING count(*) > 1
Name the series result for season being 1998
SELECT series AS result FROM table_2554479_2 WHERE season = "1998"
What season was Barcelona ranked higher than 12, had more than 96 goals and had more than 26 apps?
SELECT season FROM table_name_59 WHERE apps > 26 AND club = "barcelona" AND goals > 96 AND rank > 12
Name the date for pescara
SELECT date FROM table_name_76 WHERE circuit = "pescara"
How many values of powershell (cmdlet) are valid when unix shell is env, export, set, setenv?
SELECT COUNT(powershell__cmdlet_) FROM table_14465871_1 WHERE unix_shell = "env, export, set, setenv"
What's the slalom when the average time was greater than 99.25?
SELECT AVG(slalom) FROM table_name_5 WHERE average > 99.25
What is the run 3 of the athlete with a run 1 more than 53.75 and a run 2 less than 52.91?
SELECT SUM(run_3) FROM table_name_5 WHERE run_1 > 53.75 AND run_2 < 52.91
Which Score has a Losing Team of sydney roosters, and a Total of 88?
SELECT score FROM table_name_77 WHERE losing_team = "sydney roosters" AND total = 88
What is the minimum shipping charge for "OVERSEAS - DELUXE"?
SELECT ShipBase FROM ShipMethod WHERE Name = 'OVERSEAS - DELUXE'
Show all director names who have a movie in both year 1999 and 2000.
SELECT director FROM movie WHERE YEAR = 2000 INTERSECT SELECT director FROM movie WHERE YEAR = 1999
Which physician was trained in the procedure that costs the most.
SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment ORDER BY T3.cost DESC LIMIT 1
What date has yani tseng as the runner (s)-up?
SELECT date FROM table_name_91 WHERE runner_s__up = "yani tseng"
Name the languages for cyprus
SELECT languages FROM table_21133193_1 WHERE member_countries = "Cyprus"
What are their typical selling prices?
SELECT T1.typical_selling_price FROM products AS T1 JOIN Ref_colors AS T2 ON T1.color_code = T2.color_code WHERE product_category_code = "Herbs"
How many shipments were ordered by a customer in Florida?
SELECT COUNT(T1.cust_id) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T1.state = 'FL'
What was the active period for the pop genre?
SELECT period_active FROM table_name_87 WHERE genre = "pop"
Calculate the percentage of bronze medals won by men's basketball players.
SELECT CAST(COUNT(CASE WHEN T4.medal_name = 'Bronze' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T2.person_id) FROM competitor_event AS T1 INNER JOIN games_competitor AS T2 ON T1.competitor_id = T2.id INNER JOIN event AS T3 ON T1.event_id = T3.id INNER JOIN medal AS T4 ON T1.medal_id = T4.id WHERE T3.event_name LIKE 'Basketball Men%s Basketball'
can you show me a list of player position?
SELECT pPos FROM Tryout
What is the size of the smallest crowd that watched a game at Arden Street Oval?
SELECT MIN(crowd) FROM table_name_32 WHERE venue = "arden street oval"
How many students at the university earned a score of 90 in 2011?
SELECT COUNT(*) FROM university_year AS T1 INNER JOIN university_ranking_year AS T2 ON T1.university_id = T2.university_id WHERE T2.score = 90 AND T1.year = 2011
How many times was the time 20' 05.19 112.703mph on Thurs Aug 26th?
SELECT COUNT(sat_21_aug) FROM table_26986076_1 WHERE thurs_26_aug = "20' 05.19 112.703mph"
Among all the rivers finally flows to the sea of 540m in depth, which one has the longest length?
SELECT T2.Name FROM sea AS T1 INNER JOIN river AS T2 ON T2.Sea = T1.Name WHERE T1.Depth = 540 ORDER BY T2.Length DESC LIMIT 1
What was the date of the finale for the season that premiered on September 22, 1976?
SELECT finale FROM table_name_72 WHERE premiere = "september 22, 1976"
Find the name of dorms that do not have any amenity.
SELECT dorm_name FROM dorm WHERE dormid NOT IN (SELECT dormid FROM has_amenity)
what is the date for game 3?
SELECT date FROM table_name_71 WHERE game = 3
Who was eliminated a person at 18:48?
SELECT eliminated AS by FROM table_29692554_2 WHERE time = "18:48"
What are the renting arrears tax ids related to the customer master index whose detail is not 'Schmidt, Kertzmann and Lubowitz'?
SELECT T1.council_tax_id FROM Rent_Arrears AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id JOIN Customer_Master_Index AS T3 ON T3.master_customer_id = T2.master_customer_id WHERE T3.cmi_details != 'Schmidt , Kertzmann and Lubowitz'
Give the full name of the divison that had the most 0-0 games.
SELECT T2.name FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T1.FTAG = 0 AND T1.FTHG = 0 GROUP BY T2.division ORDER BY COUNT(T1.FTAG) DESC LIMIT 1
What are the names and release years for all the songs of the youngest singer?
SELECT song_name , song_release_year FROM singer ORDER BY age LIMIT 1
Awesome! Of these different codes, can you tell me which individual code was used by the largest number of orders?
SELECT payment_method_code FROM INVOICES GROUP BY payment_method_code ORDER BY count ( * ) DESC LIMIT 1
What are the different location codes for documents?
SELECT DISTINCT location_code FROM Document_locations
Show the names of trains and locations of railways they are in.
SELECT T2.Name , T1.Location FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID
How many of the non-sales employees are married?
SELECT COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.PersonType = 'EM' AND T1.MaritalStatus = 'M'
What is the Win % in the Span of 2011–2013 with a Lost of less than 1?
SELECT AVG(win__percentage) FROM table_name_91 WHERE span = "2011–2013" AND lost < 1
For how many times had the dish "Chicken gumbo" appeared on a menu page?
SELECT SUM(CASE WHEN T1.name = 'Chicken gumbo' THEN 1 ELSE 0 END) FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id
Show the phone number of the sanitarian who was responsible for inspection no.634597.
SELECT T2.phone FROM inspection AS T1 INNER JOIN employee AS T2 ON T1.employee_id = T2.employee_id WHERE T1.inspection_id = 634597 AND T2.title = 'Sanitarian'
What are the names of the tourist attractions that can be accessed by bus?
SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = "bus"
Location of hemisfair arena had what record?
SELECT record FROM table_name_43 WHERE location = "hemisfair arena"
Who was Bob Bryan's partner/s on a hard surface in 2003?
SELECT partner FROM table_29163303_1 WHERE year = 2003 AND surface = "Hard"
What is the number of the credit card that Frank-Paul Santangelo used to purchase root beers on 2014/7/7?
SELECT DISTINCT T2.CreditCardNumber FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.First = 'Frank-Paul' AND T1.Last = 'Santangelo' AND T2.TransactionDate = '2014-07-07'
What is the Film with winner Jerome Kern in the 19th Ceremony?
SELECT film FROM table_name_47 WHERE ceremony = "19th" AND name = "jerome kern"
Under the category name of "Coffee & Tea", mention any 5 business ID , their state and city.
SELECT T2.business_id, T3.state, T3.city FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id WHERE T1.category_name = 'Coffee & Tea' LIMIT 5
What is the primary language used in the film, Black Book?
SELECT main_language_s_ FROM table_name_53 WHERE film_title_used_in_nomination = "black book"
Whose permanent address is different from his or her current address? List his or her first name.
SELECT first_name FROM Students WHERE current_address_id <> permanent_address_id
What was the first year he placed 12th
SELECT MIN(year) FROM table_name_9 WHERE result = "12th"
Find the appelations that produce wines after the year of 2008 but not in Central Coast area.
SELECT Appelation FROM WINE WHERE YEAR > 2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area = "Central Coast"
What was the constructor for jo bonnier of 6 rounds?
SELECT constructor FROM table_name_69 WHERE entrant = "jo bonnier" AND rounds = "6"
What was the 1987 result for the tournament with 1986 result of 3R and 1989 of A?
SELECT 1987 FROM table_name_81 WHERE 1989 = "a" AND 1986 = "3r"
What are the names of projects that require more than 300 hours, and how many scientists are assigned to each?
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
List the long name of countries with indicator name in 1980.
SELECT DISTINCT T1.LongName FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Year = 1980 AND T2.IndicatorName IS NOT NULL
How many inhabitants does Sweden have per square kilometer?
SELECT pop_density_people_km_2 FROM table_24066938_1 WHERE member_state = "Sweden"
Which movies have 'Deleted Scenes' as a substring in the special feature?
SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'
Show the names of products that are in at least 3 events?
SELECT T1.Product_Name FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name HAVING COUNT ( * ) > = 3
What is the name of the youngest captain?
SELECT name FROM captain ORDER BY age LIMIT 1
How many members are in each party?
SELECT T2.party_name , count(*) FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id
List all the products with lower than average cost.
SELECT DISTINCT T2.ProductID FROM ProductCostHistory AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T1.StandardCost < ( SELECT SUM(StandardCost) / COUNT(ProductID) FROM Product )
Show the names of all ships from United Kingdom?
SELECT Name FROM ship WHERE Nationality = "United Kingdom"