sentence
stringlengths
3
347
sql
stringlengths
18
804
What is the Attendance, when the Opponent is the Tampa Bay Buccaneers?
SELECT attendance FROM table_name_80 WHERE opponent = "tampa bay buccaneers"
What is Date Sent, when Signal Power ( kW ) is less than 126, when Arrival Date is "January 2059", and when HD Designation is "HD193664"?
SELECT date_sent FROM table_name_75 WHERE signal_power___kw__ < 126 AND arrival_date = "january 2059" AND hd_designation = "hd193664"
What is the college/junior/club team (league) of the player who was pick number 130?
SELECT college_junior_club_team__league_ FROM table_14209245_9 WHERE pick__number = "130"
What's the time for the match with a record of 2-0?
SELECT time FROM table_name_74 WHERE record = "2-0"
What was the manner in which Petrik Sander departed?
SELECT manner_of_departure FROM table_17085981_2 WHERE outgoing_manager = "Petrik Sander"
What is the description and code of the type of service that is performed the most often?
SELECT T1.Service_Type_Description , T1.Service_Type_Code FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T1.Service_Type_Code ORDER BY COUNT(*) DESC LIMIT 1
Which vocal type did the musician with last name "Heilo" played in the song with title "Der Kapitan"?
SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.lastname = "Heilo" AND T2.title = "Der Kapitan"
How many characteristics does the product named "laurel" have?
SELECT count(*) 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 WHERE t1.product_name = "laurel"
Could you show me a list of employees with a salary less than the average?
SELECT name FROM Employee WHERE salary < ( SELECT avg ( salary ) FROM Employee )
Can you show me the number of drivers who are from Hartford City?
SELECT count ( * ) FROM driver WHERE home_city = 'Hartford'
Find the name and id of the good with the highest average rank.
SELECT T1.title , T1.i_id FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id ORDER BY avg(T2.rank) DESC LIMIT 1
What are the names of products whose availability equals to 1?
SELECT T2.product_name FROM view_product_availability AS T1 JOIN products_for_hire AS T2 ON T1.product_id = T2.product_id WHERE T1.available_yn = 1
Name the record for april 1
SELECT record FROM table_17102076_10 WHERE date = "April 1"
What kind of surface was the Tournament at Sunderland played on?
SELECT surface FROM table_name_32 WHERE tournament = "sunderland"
How many world rankings are after Aug 5, 1980 ?
SELECT SUM(world_ranking) FROM table_name_80 WHERE date = "aug 5" AND year > 1980
What date has a solitudering circuit
SELECT date FROM table_1140103_6 WHERE circuit = "Solitudering"
Find the distinct last names of all the students who have president votes and whose advisor is not 2192.
SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote EXCEPT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = "2192"
How many part supplies were nearly out of stock?
SELECT COUNT(ps_suppkey) FROM partsupp WHERE ps_availqty < 10
Which apartments have unit status availability of both 0 and 1? Return their apartment numbers.
SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 0 INTERSECT SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 1
How many players born in USA are right-handed batters? That is, have the batter value 'R'.
SELECT count(*) FROM player WHERE birth_country = 'USA' AND bats = 'R';
Find the name of the user who gave the highest rating.
SELECT T1.name FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id ORDER BY T2.rating DESC LIMIT 1
Who and what were the high points player for the game against Detroit?
SELECT high_points FROM table_27756572_6 WHERE team = "Detroit"
How many Grand Prix were the winning constructor Benetton - Ford and the pole position was Michael Schumacher?
SELECT COUNT(grand_prix) FROM table_1137702_3 WHERE winning_constructor = "Benetton - Ford" AND pole_position = "Michael Schumacher"
What was the Tie no when the Home team was wealdstone?
SELECT tie_no FROM table_name_34 WHERE home_team = "wealdstone"
Which rank is the start of totals?
SELECT rank FROM table_name_78 WHERE start = "totals"
Who was the developer of Resident Evil 4?
SELECT developer_s_ FROM table_name_4 WHERE game = "resident evil 4"
What was the score of the game on June 1?
SELECT score FROM table_name_38 WHERE date = "june 1"
Can you show me the name of the bank branch providing the greatest total amount of loans to customers?
SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id GROUP BY T2.bname ORDER BY sum ( T1.amount ) DESC limit 1
What is the maximum L3 cache of the processor whose speed is 2.00 GHZ, has a QPI speed of 4.8 gt/s, and is model e5504?
SELECT MAX(l3_cache__mb_) FROM table_269920_17 WHERE qpi_speed__gt_s_ = "4.8" AND speed__ghz_ = "2.00" AND model = "E5504"
Show the account name and other account detail for all accounts by the customer with first name Meaghan and last name 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 average length in feet of the bridges?
SELECT avg(length_feet) FROM bridge
What is the customer names of orders which have unit cost greater than 4000USD?
SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Unit Cost` > 4000 THEN T1.`Customer Names` END AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID ) WHERE T IS NOT NULL
WHAT IS THE TEAM WITH ATTENDANCE AT TARGET CENTER 11,921?
SELECT team FROM table_name_8 WHERE location_attendance = "target center 11,921"
Which driver for Greenfield Mowers Racing has fewer than 36 points?
SELECT driver FROM table_name_82 WHERE points < 36 AND team = "greenfield mowers racing"
List the locations that are shared by more than two wrestlers.
SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*) > 2
what is the selling price of lotus?
SELECT t1.typical_selling_price 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 WHERE t1.product_name = "lotus"
Find the name of the user who gave the highest rating.
SELECT T1.name FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id ORDER BY T2.rating DESC LIMIT 1
what is the total number of songs?
select count ( * ) from song
How many numbers were recorded points against when the tries were for 43?
SELECT COUNT(points_against) FROM table_13564637_5 WHERE tries_for = "43"
What is the grid total that has a Time/Retired of + 1:33.141, and under 70 laps?
SELECT SUM(grid) FROM table_name_27 WHERE time_retired = "+ 1:33.141" AND laps < 70
What is Score, when High Assists is "Rajon Rondo (12)", and when High Points is "Paul Pierce (27)"?
SELECT score FROM table_name_64 WHERE high_assists = "rajon rondo (12)" AND high_points = "paul pierce (27)"
What week did the Galaxy play the Amsterdam Admirals?
SELECT week FROM table_24814477_2 WHERE opponent = "Amsterdam Admirals"
what product Id has the highest price? | Do you mean the id of the product which has the highest price? | yes
SELECT product_id from products order by product_price desc limit 1
Show the hometowns shared by at least two teachers.
SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*) >= 2
What are the populations of the counties they come from, please?
select T1.Population from county AS T1 JOIN election AS T2 where T1.County_Id = District and T2.Committee = 'Appropriations'
What original air dates are associated with a viewing figure of 7.27 million?
SELECT original_air_date FROM table_15026994_2 WHERE viewing_figure = "7.27 million"
Show distinct first and last names for all customers with an account.
SELECT DISTINCT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id
What are their names?
SELECT Party FROM party
Find the name of the first 5 customers.
SELECT customer_name FROM Customers ORDER BY date_became_customer LIMIT 5
display the full name (first and last name), and salary of those employees who working in any department located in London.
SELECT first_name , last_name , salary FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T3.city = 'London'
Which Opponent has a October larger than 20 with a Score of 2–2?
SELECT opponent FROM table_name_42 WHERE october > 20 AND score = "2–2"
Who played the No.2 character in the credit list of the movie "American Hustle"?
SELECT T3.Name FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T1.Title = 'American Hustle' AND T2.creditOrder = '2'
Which kit maker have Trond Sollied as a manager?
SELECT kit_maker FROM table_name_44 WHERE manager = "trond sollied"
Which country did Bradford Team belongs to?
SELECT DISTINCT T2.country FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T1.HomeTeam = 'Bradford' OR T1.AwayTeam = 'Bradford'
What is the total number of positions for teams with more than 5 points, 3 draws, and under 2 losses?
SELECT COUNT(position) FROM table_name_56 WHERE points > 5 AND drawn = 3 AND lost < 2
When did Carole Bernhard first become a customer?
SELECT date_became_customer FROM Customers WHERE first_name = "Carole" AND last_name = "Bernhard";
What are the degrees conferred in "San Francisco State University" in 2001?
SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = "San Francisco State University" AND t2.year = 2001
which rooms have reservations ?
SELECT DISTINCT room FROM reservations
What are the ids of all songs that have higher resolution of the average resolution in the modern genre?
SELECT f_id FROM song WHERE resolution > (SELECT avg(resolution) FROM song WHERE genre_is = "modern")
Which Tonnage is on 25 july 1942?
SELECT tonnage FROM table_name_66 WHERE date = "25 july 1942"
What is Rank, when Event is "LAPT4 São Paulo"?
SELECT rank FROM table_name_66 WHERE event = "lapt4 são paulo"
Who is the quarterback for Arkansas State?
SELECT player FROM table_name_38 WHERE position = "quarterback" AND college = "arkansas state"
Who was the home team at the game that had a crowd of over 24,520?
SELECT home_team FROM table_name_80 WHERE crowd > 24 OFFSET 520
What is the name of the constructor when report shows report in 1955?
SELECT constructor FROM table_name_48 WHERE "report" = "report" AND year = "1955"
Among the universities in Australia, how many of them have a student staff ratio of over 15 in 2011?
SELECT COUNT(*) FROM university AS T1 INNER JOIN university_year AS T2 ON T1.id = T2.university_id INNER JOIN country AS T3 ON T3.id = T1.country_id WHERE T3.country_name = 'Australia' AND T2.student_staff_ratio > 15 AND T2.year = 2011
What is the average for the couple anh & luda?
SELECT average FROM table_23465011_5 WHERE couple = "Anh & Luda"
What are the race ids that the driver with the surname Nakajima was in?
SELECT T2.raceID FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid where T1.surname = "Nakajima"
What is the full number of Total Seats with a constituency seat number bigger than 0 with the Liberal Democrat party, and the Regional seat number is smaller than 6?
SELECT SUM(total_seats) FROM table_name_26 WHERE constituency_seats > 0 AND party = "liberal democrat" AND regional_seats < 6
Find the id of suppliers whose average amount purchased for each product is above 50000 or below 30000.
SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING avg(total_amount_purchased) > 50000 OR avg(total_amount_purchased) < 30000
Show me the ages of the 9 female students with ages under 25 years.
SELECT Age FROM student WHERE sex = 'F' AND age < 25
List the names of climbers in descending order of points.
SELECT Name FROM climber ORDER BY Points DESC
What is the Director of Children of Sarajevo?
SELECT director FROM table_name_39 WHERE film_title_used_in_nomination = "children of sarajevo"
What are all the customer phone numbers under the most popular policy type?
SELECT customer_phone FROM available_policies WHERE policy_type_code = (SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1)
List the name, IHSAA Football Class, and Mascot of the schools that have more than 6000 of budgeted amount or were founded before 2003, in the order of percent of total invested budget and total budgeted budget.
SELECT T1.School_name , T1.Mascot , T1.IHSAA_Football_Class FROM school AS T1 JOIN budget AS T2 ON T1.school_id = T2.school_id WHERE Budgeted > 6000 OR YEAR < 2003 ORDER BY T2.total_budget_percent_invested , T2.total_budget_percent_budgeted
Return the amount of the largest payment.
SELECT amount FROM payment ORDER BY amount DESC LIMIT 1
What was the place when the score was 67-73-73=213?
SELECT place FROM table_name_23 WHERE score = 67 - 73 - 73 = 213
What's the Proto Germanic when then German is /s/ or /ts/?
SELECT proto_germanic FROM table_name_41 WHERE german = "/s/ or /ts/"
What were the total number of entries in 2001 that had a front row smaller than 13?
SELECT COUNT(entries) FROM table_name_55 WHERE season = "2001" AND front_row_starts < 13
How heavy were the players who attended Arkansas?
SELECT weight FROM table_15582870_1 WHERE college = "Arkansas"
What was David Backes' Offer Team?
SELECT offer_team FROM table_name_59 WHERE player = "david backes"
List all the official and unofficial languages used by the country that declared its independence in 1830.
SELECT T2.Language, T2.IsOfficial FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.IndepYear = 1830 GROUP BY T2.Language, T2.IsOfficial
How many times is the number of keywords in "Refuge: Part 1" episode than "Shield" episode?
SELECT CAST(SUM(CASE WHEN T1.title = 'Refuge: Part 1' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.title = 'Shield' THEN 1 ELSE 0 END) FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id
what is the 2001 % for the status widowed or surviving partner?
SELECT 2001 AS __percentage FROM table_273617_6 WHERE status = "Widowed or surviving partner"
Find the average weight for each pet type.
SELECT avg(weight) , pettype FROM pets GROUP BY pettype
Show ids of students who play video game and play sports.
SELECT StuID FROM Sportsinfo INTERSECT SELECT StuID FROM Plays_games
How many teachers are not involved in any of them?
select count ( * ) from ( 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 )
What is the id of the event with the most participants?
SELECT Event_ID FROM Participants_in_Events GROUP BY Event_ID ORDER BY COUNT(*) DESC LIMIT 1
Name the points for with drawn of 0 and points of 88
SELECT points_for FROM table_name_33 WHERE drawn = "0" AND points = "88"
Calculate the percentage of penalty minutes of Swedish players in OHL league among all players.
SELECT CAST(COUNT(CASE WHEN T1.nation = 'Sweden' THEN T2.PIM ELSE NULL END) AS REAL) * 100 / COUNT(*) FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.LEAGUE = 'OHL'
What rowers have FA as the notes?
SELECT rowers FROM table_name_41 WHERE notes = "fa"
What is the current series where the new series began in June 2011?
SELECT current_series FROM table_1000181_1 WHERE notes = "New series began in June 2011"
What is the current status of the person named Nicholls?
SELECT status FROM table_name_65 WHERE name = "nicholls"
How many domestic violence cases were brought in the ward that uses "[email protected]"?
SELECT SUM(CASE WHEN T2.domestic = 'TRUE' THEN 1 ELSE 0 END) FROM Ward AS T1 INNER JOIN Crime AS T2 ON T2.ward_no = T1.ward_no WHERE T1.ward_email = '[email protected]'
Which driver has a grid of 3?
SELECT driver FROM table_name_59 WHERE grid = 3
What is Michael and Melanie's rank?
SELECT rank FROM table_19744915_15 WHERE couple = "Michael and Melanie"
what is the competition on 10 august 2011?
SELECT competition FROM table_name_75 WHERE date = "10 august 2011"
Which trip had the shortest duration and started at the station that can hold 15 bikes?
SELECT T1.id FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T2.dock_count = 15 AND T1.duration = ( SELECT MIN(T1.duration) FROM trip AS T1 LEFT JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T2.dock_count = 15 )
How many points total for san lorenzo?
SELECT COUNT(points) FROM table_14460085_3 WHERE team = "San Lorenzo"
what is the investor id of transaction id 3?
SELECT T1.investor_id FROM Lots AS T1 JOIN transactions_lots AS T2 ON T1.lot_id = T2.lot_id WHERE T2.transaction_id = 3
Which cmi cross reference id is not related to any parking taxes?
SELECT cmi_cross_ref_id FROM cmi_cross_references EXCEPT SELECT cmi_cross_ref_id FROM parking_fines