sentence
stringlengths
3
347
sql
stringlengths
18
804
What is the 1944 result for the U.S. Championships?
SELECT 1944 FROM table_name_52 WHERE tournament = "u.s. championships"
What are the names and type codes of products?
SELECT Product_Name , Product_Type_Code FROM Products
Count the number of different languages in these films.
SELECT count(DISTINCT language_id) FROM film
What is the Opponent in the final of the game on february 2, 2004?
SELECT opponent_in_the_final FROM table_name_68 WHERE date = "february 2, 2004"
How many positions does rene villemure play?
SELECT COUNT(position) FROM table_1473672_2 WHERE player = "Rene Villemure"
how many endings have american pronounciation əs
SELECT COUNT(australian) FROM table_17798093_20 WHERE american = "əs"
What is the customer name with the highest bank balance? | Do you mean his savings balance? | yes savings balance?
SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid order by T2.balance desc limit 1
What Rank has a Team of roma?
SELECT rank FROM table_name_14 WHERE team = "roma"
What was the polling firm with others of 1%?
SELECT polling_firm FROM table_name_25 WHERE others = "1%"
For each building, show the name of the building and the number of institutions in it.
SELECT T1.name , count(*) FROM building AS T1 JOIN institution AS T2 ON T1.building_id = T2.building_id GROUP BY T1.building_id
What 2007-08 season has marcianise as the city?
SELECT 2007 AS _08_season FROM table_name_60 WHERE city = "marcianise"
Which character was mentioned in the paragraph "Would he do so, I'ld beg your precious mistress, Which he counts but a trifle."? Give the character name.
SELECT T1.CharName FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.PlainText = 'Would he do so, I''ld beg your precious mistress,Which he counts but a trifle.'
What is the density (hab/ km²) when the altitude m is 1300?
SELECT density__hab__km²__ FROM table_name_61 WHERE altitude_m = "1300"
What is the name of the team with a qual 1 time of 1:17.481?
SELECT team FROM table_name_77 WHERE qual_1 = "1:17.481"
List the name of actors in ascending alphabetical order.
SELECT Name FROM actor ORDER BY Name ASC
What was the role in the chipmunk adventure?
SELECT role FROM table_name_53 WHERE title = "the chipmunk adventure"
How many clubs does the student Eric Tai belong to?
SELECT count ( DISTINCT t1.clubname ) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = "Eric" AND t3.lname = "Tai"
What is the duration of the song where the major instrument is the piano and the date is 2004-02-03?
SELECT duration FROM table_10416547_1 WHERE major_instrument_s_ = "Piano" AND date = "2004-02-03"
What is the name of the movie produced after 2000 and directed by James Cameron?
SELECT title FROM Movie WHERE director = 'James Cameron' AND YEAR > 2000
Show me the number of parks the state of NY has.
SELECT count(*) FROM park WHERE state = 'NY';
How many football divisions does England have?
SELECT COUNT(division) FROM divisions WHERE country = 'England'
Among the male patients, list down 5 birth dates of patients taking the medication "Penicillin V Potassium 250 MG".
SELECT DISTINCT T2.birthdate FROM medications AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'Penicillin V Potassium 250 MG' AND T2.gender = 'M' LIMIT 5
How many trips lasted at least that long? | Do you mean the number of trips whose duration is longer than the average duration of trips in zip code 94103? | yes
SELECT count ( * ) FROM trip WHERE duration > = ( SELECT avg ( duration ) FROM trip WHERE zip_code = 94103 )
What are the first and last names of the top 10 longest-serving employees?
SELECT first_name , last_name FROM employees ORDER BY hire_date ASC LIMIT 10;
What are the first names of the top 5 staff who have handled the greatest number of complaints?
SELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id GROUP BY t2.staff_id ORDER BY count(*) LIMIT 5
What is the average goals scored of the team who scored 44 points and placed higher than 5?
SELECT AVG(goals_scored) FROM table_name_48 WHERE points = "44" AND place > 5
In which city is the European Bank for Reconstruction and Development's headquarters? Please include the city and province where the headquarters are located in your answer.
SELECT City, Province FROM organization WHERE Name = 'European Bank for Reconstruction and Development'
What is the lowest Loss number when the Gain is less than 61 and the Avg/G is 6?
SELECT MIN(loss) FROM table_name_94 WHERE gain < 61 AND avg_g = 6
How many customers used credit cards? ?
SELECT COUNT ( customer_id ) FROM customers WHERE payment_method = "Credit Card"
What player is in the place of t1 and has the score of 67-70=137?
SELECT player FROM table_name_85 WHERE place = "t1" AND score = 67 - 70 = 137
What is Song's 会呼吸的痛 Index?
SELECT index FROM table_name_54 WHERE song = "会呼吸的痛"
What was the score of game 82?
SELECT score FROM table_name_91 WHERE game = 82
What is the first name, GPA, and phone number of the students with the top 5 GPAs?
SELECT stu_gpa , stu_phone , stu_fname FROM student ORDER BY stu_gpa DESC LIMIT 5
What was the distance when the weight was 6.11?
SELECT distance FROM table_name_21 WHERE weight = 6.11
Show the names of journalists that have reported more than one event.
SELECT T3.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name HAVING COUNT(*) > 1
what are the names and classes of the ships that do not have any captain yet?
SELECT name , CLASS FROM ship WHERE ship_id NOT IN ( SELECT ship_id FROM captain )
Which major has least number of students?List the students First name?
SELECT Major , Fname FROM Student where major = ( select major from student group by major order by count ( * ) asc limit 1 )
What is the marital status of the customer ages 62 with an level of education of 7?
SELECT DISTINCT MARITAL_STATUS FROM Customers WHERE EDUCATIONNUM = 7 AND age = 62
In which year did the user who has given the most number of "short" tips join the Yelp?
SELECT T2.user_yelping_since_year FROM Tips AS T1 INNER JOIN Users AS T2 ON T1.user_id = T2.user_id WHERE T1.tip_length LIKE 'short' GROUP BY T2.user_yelping_since_year ORDER BY COUNT(T1.tip_length) DESC LIMIT 1
What are the first names of the faculty members playing both Canoeing and Kayaking?
SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' INTERSECT SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Kayaking'
How many teams can still qualify when there are 0 teams that have secured qualification and 52 teams started?
SELECT teams_that_can_still_qualify FROM table_23995075_2 WHERE teams_that_have_secured_qualification = "0" AND teams_started = "52"
How many movies for mature audiences or parental guidance suggested did Bill Thompson work as a voice actor?
SELECT COUNT(T.movie) FROM ( SELECT T1.movie FROM `voice-actors` AS T1 INNER JOIN movies_total_gross AS T2 ON T1.movie = T2.movie_title WHERE MPAA_rating = 'PG' AND `voice-actor` = 'Bill Thompson' GROUP BY T1.movie ) AS T
Hello! Can you provide me with a list of the tourist attractions that are walking distance? | do you want to just return their names? | Ah yes! For now could you please return both the tourist attraction id and the name?
SELECT Name, Tourist_Attraction_ID FROM Tourist_Attractions WHERE How_to_Get_There = "walk"
On what date were Perth Wildcats the away team?
SELECT date FROM table_name_28 WHERE away_team = "perth wildcats"
How many dams are there in the Lake and Peninsula area?
SELECT MAX(_number_s_dam_and_gnis_query_link) FROM table_17978052_2 WHERE borough_or_census_area = "Lake and Peninsula"
What are the names of courses with 1 credit?
SELECT CName FROM COURSE WHERE Credits = 1
What was the lowest week in the month of August against Andrew Combs?
SELECT MIN(week) FROM table_name_60 WHERE month = "august" AND offensive = "andrew combs"
How many complaints are not in process with an agent?
SELECT COUNT(outcome) FROM callcenterlogs WHERE outcome != 'AGENT'
What are the invoice dates, order ids, and order details for all invoices?
SELECT T1.invoice_date , T1.order_id , T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id
Show the phone, room, and building for the faculty named Jerry Prince.
SELECT phone , room , building FROM Faculty WHERE Fname = "Jerry" AND Lname = "Prince"
What is the maximum stars and year for the most recent movie?
SELECT max(T1.stars) , T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.year = (SELECT max(YEAR) FROM Movie)
What is the total number of purchases for members with level 6?
SELECT count(*) FROM purchase AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T2.level = 6
Count the number of different software platforms.
SELECT count(DISTINCT Software_Platform) FROM device
What was the total attendance at games when Detroit was the visiting team and the record was 36–13–5?
SELECT COUNT(attendance) FROM table_name_25 WHERE visitor = "detroit" AND record = "36–13–5"
Who is in heat 5 from Guyana?
SELECT name FROM table_name_64 WHERE heat = 5 AND country = "guyana"
In what Year is the Works no. 2040-2049?
SELECT year FROM table_name_86 WHERE works_no = "2040-2049"
How many bikes have been borrowed at San Jose Diridon Caltrain Station on the date and time of 10/20/2013 8:11:01 AM and indicate the station's coordinates.
SELECT SUM(T2.bikes_available), T1.long, T1.lat FROM station AS T1 INNER JOIN status AS T2 ON T2.station_id = T1.id WHERE T2.time = '2013/10/20 8:11:01' AND T1.name = 'San Jose Diridon Caltrain Station'
List all of the restaurants on Park St.
SELECT T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.street_name = 'park st'
show all the customer details
select customer_details from customers
Who won in 1988 with a total less than 287?
SELECT player FROM table_name_21 WHERE total < 287 AND year_s__won = "1988"
What is the lowest pick of player paul stasiuk from a round greater than 12?
SELECT MIN(pick) FROM table_name_45 WHERE player = "paul stasiuk" AND round > 12
When the total is larger than 1,and the bronze is less than 3, and silver larger than 2, and a gold larger than 2, what is the nation?
SELECT nation FROM table_name_24 WHERE total > 1 AND bronze < 3 AND silver > 2 AND gold > 2
What is the year 2001 with a total larger than 1, and 2009 with 8?
SELECT 2001 FROM table_name_26 WHERE total > 1 AND 2009 = "8"
Who had 0 total votes in the purple team?
SELECT status FROM table_name_18 WHERE total_votes = "0" AND couples_team = "purple team"
List all region names in alphabetical order.
SELECT region_name FROM region ORDER BY region_name
What Driver has 1 in Grid?
SELECT driver FROM table_name_98 WHERE grid = 1
Show names and phones of customers who do not have address information.
SELECT customer_name , customer_phone FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM customer_address_history)
How many countries on the European Continent has an infant mortality rate per thousand of over 100?
SELECT COUNT(T1.Name) FROM country AS T1 INNER JOIN encompasses AS T2 ON T1.Code = T2.Country INNER JOIN continent AS T3 ON T3.Name = T2.Continent INNER JOIN population AS T4 ON T4.Country = T1.Code WHERE T3.Name = 'Europe' AND T4.Infant_Mortality < 100
What is the Customer Name who has the most policies listed ?
SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_name ORDER BY count ( * ) DESC LIMIT 1
What state had an elected/assumed office in 2013?
SELECT state FROM table_name_98 WHERE elected_assumed_office = 2013
Can you show me the ids for all these attractions? | Do you mean Tourist Attraction IDs? | yes
SELECT Name, Tourist_attraction_ID FROM Tourist_attractions
How many points did the team that won 5 games make?
SELECT pts_for FROM table_28201906_1 WHERE won = 5
Who has a friend that is from new york city?
SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.city = 'new york city'
How many persons are on the list?
SELECT count ( * ) FROM Person
The sun of total that has a tour of 7 and a Giro smaller than 3 is 12.
SELECT SUM(total) FROM table_name_51 WHERE tour = 7 AND giro < 3
What is the lowest number of bronze medals for teams ranked below 13?
SELECT MIN(bronze) FROM table_name_91 WHERE rank > 13
What class is assigned to frequencies lower than 90.5?
SELECT class FROM table_name_49 WHERE frequency_mhz < 90.5
What is the total and maximum duration of trips with bike id 636?
SELECT SUM(duration), MAX(duration) FROM trip WHERE bike_id = 636
Indicate the name of all the games published for the 'SCD' platform.
SELECT T1.game_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN game_platform AS T3 ON T2.id = T3.game_publisher_id INNER JOIN platform AS T4 ON T3.platform_id = T4.id WHERE T4.platform_name = 'SCD'
What are the distinct type of mills that are built by American or Canadian architects?
SELECT DISTINCT T1.type FROM mill AS T1 JOIN architect AS t2 ON T1.architect_id = T2.id WHERE T2.nationality = 'American' OR T2.nationality = 'Canadian'
The Le Mans Porsche team Joest Racing is in which class?
SELECT class FROM table_name_53 WHERE team = "le mans porsche team joest racing"
What is the Total for the Player who won in 1922, 1932?
SELECT AVG(total) FROM table_name_44 WHERE year_s__won = "1922, 1932"
How many different services are provided by all stations?
SELECT count(DISTINCT services) FROM station
Which rank had the Labour party winning in 2003, a swing to gain that was larger than 2.13, a lab hold as a result, and which took place in the Linlithgow constituency?
SELECT rank FROM table_name_21 WHERE winning_party_2003 = "labour" AND swing_to_gain > 2.13 AND result = "lab hold" AND constituency = "linlithgow"
What are the minimum and maximum vote percents of elections?
SELECT min(Vote_Percent) , max(Vote_Percent) FROM election
What is the name of the airport in São Filipe that has an IATA of sfl?
SELECT airportname FROM table_name_3 WHERE city___town = "são filipe" AND iata = "sfl"
Find the names of all reviewers who rated Gone with the Wind.
SELECT DISTINCT T3.name FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T2.title = 'Gone with the Wind'
At the VFL Reserves, who was the opponent when the score was 18.6 (114) - 21.14 (140)?
SELECT opponent FROM table_name_7 WHERE competition = "vfl reserves" AND score = "18.6 (114) - 21.14 (140)"
What instruments does the song "Le Pop" use?
SELECT instrument FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Le Pop"
what is the name of the movie without any ratings?
SELECT title FROM Movie WHERE mID NOT IN ( SELECT mID FROM Rating )
Find the phone number and email address of customer "Harold".
SELECT Customer_Phone , Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = "Harold"
Who manufactured the car that won with an average speed of 126.259 mph?
SELECT manufacturer FROM table_22298383_1 WHERE average_speed__mph_ = "126.259"
What is all the information about employees who have never had a job in the past?
SELECT * FROM employees WHERE employee_id NOT IN (SELECT employee_id FROM job_history)
Find the id of the order made most recently.
SELECT order_id FROM orders ORDER BY date_order_placed DESC LIMIT 1
What is the power, in kW, of channel TV-23, callsign DYCG-TV?
SELECT power_kw__erp_ FROM table_2610582_3 WHERE ch__number = "TV-23" AND callsign = "DYCG-TV"
What U.S. Rap has life in the concrete jungle as the album?
SELECT us_rap FROM table_name_15 WHERE album = "life in the concrete jungle"
What is Probate Activities, when Reserved Instruments is No, and when Regulator is Chartered Institute of Legal Executives?
SELECT probate_activities FROM table_name_6 WHERE reserved_instruments = "no" AND regulator = "chartered institute of legal executives"
What is the most common domain for the email address among all the customers?
SELECT SUBSTR(email, INSTR(email, '@') + 1, LENGTH(email) - INSTR(email, '@')) AS ym FROM customer GROUP BY SUBSTR(email, INSTR(email, '@') + 1, LENGTH(email) - INSTR(email, '@')) ORDER BY COUNT(*) DESC LIMIT 1
Which film has a higher replacement cost, ACE GOLDFINGER or ACADEMY DINOSAUR?
SELECT title FROM film WHERE title IN ('ACE GOLDFINGER', 'ACADEMY DINOSAUR') ORDER BY replacement_cost DESC LIMIT 1
Find the name and email of the user followed by the least number of people.
SELECT name , email FROM user_profiles ORDER BY followers LIMIT 1