sentence
stringlengths
3
347
sql
stringlengths
18
804
How many subscribers have ended their trip at MLK Library and how many docks does that station have?
SELECT COUNT(T1.id), T2.dock_count FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T1.end_station_name = 'MLK Library' AND T1.subscription_type = 'Subscriber' AND T2.dock_count = 19
what is the winner of meridiana
SELECT owner FROM table_name_35 WHERE winner = "meridiana"
Which 1965 has a 1962 of 0.35000000000000003, and a 1967 smaller than 0.53?
SELECT MIN(1965) FROM table_name_38 WHERE 1962 = 0.35000000000000003 AND 1967 < 0.53
Yes, what are ids of all passed exams?
SELECT registration_id FROM Student_Tests_Taken where test_result = 'Pass'
What is the last name of the musician that has been at the back position the most?
SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE stageposition = "back" GROUP BY lastname ORDER BY COUNT(*) DESC LIMIT 1
And how many volumes spent 3.0 weeks on top?
select count ( * ) from volume where weeks_on_top = 3.0
What was the percentage for T. Papadopoulos when D. Christofias was 28.4%?
SELECT t_papadopoulos FROM table_name_48 WHERE d_christofias = "28.4%"
Could you limit it to all first graders?
SELECT DISTINCT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 1 EXCEPT SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "OTHA" AND T2.lastname = "MOYER"
Who was the driver with chassis 625 553 500?
SELECT driver FROM table_name_72 WHERE chassis = "625 553 500"
For the team whose shirt sponsor is Krombacher, who is the team captain?
SELECT team AS Captain FROM table_name_12 WHERE shirt_sponsor = "krombacher"
What is the only flight destination for flights from Albany?
SELECT DEST FROM Airlines WHERE ORIGIN = 'ABY' GROUP BY DEST
Who was rose in the 1975 Broadway Revival?
SELECT rose FROM table_name_60 WHERE productions = "1975 broadway revival"
How many pages does a dream of spring have?
SELECT pages FROM table_name_3 WHERE title = "a dream of spring"
What is the birthday of the staff member with first name as Janessa and last name as Sawayn?
SELECT date_of_birth FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn";
What is Pinnacle height of chimney of orot rabin?
SELECT pinnacle_height FROM table_name_31 WHERE name = "chimney of orot rabin"
Among all the users who received the high number of compliments, what percent received the 'cute' type of compliment.
SELECT CAST(SUM(CASE WHEN T1.compliment_type = 'cute' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.user_id) FROM Compliments AS T1 INNER JOIN Users_Compliments AS T2 ON T1.compliment_id = T2.compliment_id WHERE T2.number_of_compliments = 'High'
Which facilities were inspected by Sarah Lindsey on 20th November 2012?
SELECT DISTINCT T1.dba_name FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no INNER JOIN employee AS T3 ON T2.employee_id = T3.employee_id WHERE T2.inspection_date = '2012-11-20' AND T3.first_name = 'Sarah' AND T3.last_name = 'Lindsey'
Sort the names of products in ascending order of their price.
SELECT Product_Name FROM Products ORDER BY Product_Price ASC
What is the dimensions in centimeters of a theater board who started in 1940, who was released after 2010?
SELECT board__cm_ FROM table_name_14 WHERE start = "1940" AND type = "theater" AND release > 2010
How many subordinates does employee ID 2 have and what is the biggest order in terms of value that his/her subordinates have created?
SELECT COUNT(T1.EmployeeID), SUM(T3.Quantity * T3.UnitPrice) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID WHERE T1.ReportsTo = 2 ORDER BY SUM(T3.UnitPrice * T3.Quantity) DESC LIMIT 1
What is Prize, when Name is "Valdemar Kwaysser"?
SELECT prize FROM table_name_58 WHERE name = "valdemar kwaysser"
Thank you! What is Percival Cox's position?
select position from physician where name = "Percival Cox"
What is the highest power (hp) of an OM314 engine?
SELECT MAX(power__hp_) FROM table_name_5 WHERE engine = "om314"
Which champion was from the location of Morrisville, NC, and whose SemiFinalist #2 of Clemson?
SELECT champion FROM table_name_47 WHERE location = "morrisville, nc" AND semi_finalist__number2 = "clemson"
What is the start value for rank 11?
SELECT start FROM table_name_31 WHERE rank = "11"
Can you tell me highest value of the entry name?
SELECT catalog_entry_name FROM catalog_contents ORDER BY price_in_dollars DESC LIMIT 1
Among the current legislators who served the term starting on 2013/1/3, how many of them are female?
SELECT COUNT(*) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.start = '2013-01-03' AND T1.gender_bio = 'F'
What D Player with a Height of m (ft 4in) is in the Spandau 04 Club?
SELECT name FROM table_name_5 WHERE club = "spandau 04" AND height = "m (ft 4in)" AND pos = "d"
What candidate has a result of being re-elected in the Texas 7 District?
SELECT candidates FROM table_1342218_43 WHERE result = "Re-elected" AND district = "Texas 7"
How many staff are there?
SELECT count ( staff_id ) from Project_Staff
What is the percentage of games that were released on PS4 in 2014 among all platforms?
SELECT CAST(COUNT(CASE WHEN T2.platform_name = 'PS4' THEN T3.game_id ELSE NULL END) AS REAL) * 100 / COUNT(T3.game_id) FROM game_platform AS T1 INNER JOIN platform AS T2 ON T1.platform_id = T2.id INNER JOIN game_publisher AS T3 ON T1.game_publisher_id = T3.id WHERE T1.release_year = 2014
Show the name of track with most number of races.
SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id ORDER BY COUNT(*) DESC LIMIT 1
Please give the highest product cost of a purchase order.
SELECT ActualCost FROM TransactionHistory WHERE TransactionType = 'P' ORDER BY ActualCost DESC LIMIT 1
What details do we have on the students who registered for courses most recently?
SELECT T2.student_details FROM student_course_registrations AS T1 JOIN students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.registration_date DESC LIMIT 1
how many debit cards there
SELECT count ( * ) from Customers_Cards where card_type_code = "Debit"
Show the shipping charge and customer id for customer orders with order status Cancelled or Paid.
SELECT order_shipping_charges , customer_id FROM customer_orders WHERE order_status_code = 'Cancelled' OR order_status_code = 'Paid'
How many of the businesses are in Surprise?
SELECT COUNT(business_id) FROM Business WHERE city = 'Surprise'
Which grants are described both 'regular' and 'initial application'?
SELECT * FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Regular' INTERSECT SELECT * FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Initial Application'
Find the name and position of physicians who prescribe some medication whose brand is X?
SELECT DISTINCT T1.name, T1.position FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.Brand = "X"
Which team played on April 1?
SELECT team FROM table_13619053_9 WHERE date = "April 1"
How many stages were there where the winner and the points classification were Alberto Contador?
SELECT COUNT(stage) FROM table_15294880_2 WHERE winner = "Alberto Contador" AND points_classification = "Alberto Contador"
What type of award is the theatre world award?
SELECT award FROM table_name_34 WHERE category = "theatre world award"
Show the average age for male and female students.
SELECT AVG(age), sex FROM Student GROUP BY sex
Which dance style had a draw smaller than 15 and 18 points?
SELECT dance_styles FROM table_name_54 WHERE draw < 15 AND points = 18
What are the different models created by either the car maker General Motors or weighed more than 3500?
SELECT DISTINCT T2.Model FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model = T2.Model JOIN CAR_MAKERS AS T3 ON T2.Maker = T3.Id JOIN CARS_DATA AS T4 ON T1.MakeId = T4.Id WHERE T3.FullName = 'General Motors' OR T4.weight > 3500;
What is the 2011 value of the paris masters, which had A in 2008, A in 2012, A in 2009?
SELECT 2011 FROM table_name_34 WHERE 2008 = "a" AND 2012 = "a" AND 2009 = "a" AND tournament = "paris masters"
What event has the result of 7th (5-6)?
SELECT event FROM table_name_82 WHERE result = "7th (5-6)"
Name the accrediatation for southeast technical institute
SELECT accreditation FROM table_2076557_2 WHERE school = "Southeast Technical Institute"
What is the total number of languages used in Aruba?
SELECT COUNT(T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = "Aruba"
Among the orders placed by Pacific Ltd, how many orders have been applied 5% discount ?
SELECT SUM(CASE WHEN T1.`Discount Applied` = 0.05 AND T2.`Customer Names` = 'Pacific Ltd' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID
What are the names of all employees who have a certificate to fly Boeing 737-800?
SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = "Boeing 737-800"
What is the largest major?
SELECT major FROM Student GROUP BY major ORDER BY count(*) DESC LIMIT 1
What are all values for 24 mountains when direction is Northeast?
SELECT 24 AS _mountains FROM table_23406517_2 WHERE direction = "Northeast"
How many characters are there in Hamlet?
SELECT COUNT(DISTINCT T3.character_id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id WHERE T1.Title = 'Hamlet'
Which deputy prime minister left office in 2004 and was in the 7th legislature?
SELECT deputy_prime_minister FROM table_name_8 WHERE term = "7th legislature" AND left_office = "2004"
How many file formats are supported?
SELECT count ( distinct formats ) FROM files
Name the won for try bonus of 10
SELECT won FROM table_13741576_4 WHERE try_bonus = "10"
Which player had a height of 6-0?
SELECT player FROM table_11734041_11 WHERE height_in_ft = "6-0"
Give the number of users who joined Yelp since "2004".
SELECT COUNT(user_id) FROM Users WHERE user_yelping_since_year = 2004
Find the average and minimum weight for each gender.
SELECT avg(weight) , min(weight) , sex FROM people GROUP BY sex
When has a Tie no of 15?
SELECT date FROM table_name_17 WHERE tie_no = "15"
Looking at the claim for 2018-06-14 what date was it settled?
SELECT Date_Claim_Settled FROM Claims where Date_Claim_Made = '2018-06-14'
Retrieve all the first and last names of authors in the alphabetical order of last names.
SELECT fname, lname FROM authors ORDER BY lname
What was the record for the date above 27 and an opponent of the St. Louis Blues?
SELECT record FROM table_name_33 WHERE date > 27 AND opponent = "st. louis blues"
To which segment belongs the customer that made the most orders in April 1994?
SELECT T.c_mktsegment FROM ( SELECT T2.c_mktsegment, COUNT(T1.o_orderkey) AS num FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_orderdate LIKE '1994-04-%' GROUP BY T1.o_custkey ) AS T ORDER BY T.num DESC LIMIT 1
When portsmouth is the city of license who is the licensee?
SELECT licensee FROM table_1949746_1 WHERE city_of_license = "Portsmouth"
Name the average In/de-creased by which has a Governorate of al anbar governorate, and Seats 2005 smaller than 9?
SELECT AVG(in_de_creased_by) FROM table_name_66 WHERE governorate = "al anbar governorate" AND seats_2005 < 9
What are the names of departments that have at least one employee.
SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id
Return the average number of weeks on top for volumes by artists that are at most 25 years old.
SELECT avg(T2.Weeks_on_Top) FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 25
what is the total number of opponent where date is november 23, 1980
SELECT COUNT(opponent) FROM table_11406866_2 WHERE date = "November 23, 1980"
What studio has 6 as the rank?
SELECT studio FROM table_name_32 WHERE rank = 6
What are the emails and phone numbers of all customers, sorted by email address and phone number?
SELECT email_address , phone_number FROM customers ORDER BY email_address , phone_number
Name the number of seats to be won being % of popular vote at 6.88%
SELECT _number_of_seats_to_be_won FROM table_19283982_4 WHERE _percentage_of_popular_vote = "6.88%"
Who did the Blue Jays lose to on July 16?
SELECT loss FROM table_name_15 WHERE date = "july 16"
How many Gold medals did Great Britain with a Total of more than 2 medals receive?
SELECT MIN(gold) FROM table_name_83 WHERE nation = "great britain" AND total > 2
Who did the high rebounds in the game where Douglas (28) did the high points?
SELECT high_rebounds FROM table_18894744_6 WHERE high_points = "Douglas (28)"
Please list the IDs of the users who have a high number of followers.
SELECT user_id FROM Users WHERE user_fans LIKE 'High' GROUP BY user_id
What is the name of the player with an overall less than 209 for the Victoriaville tigres (qmjhl), and a Round of 1?
SELECT player FROM table_name_85 WHERE overall < 209 AND club_team = "victoriaville tigres (qmjhl)" AND round = 1
What's the total when the champions league was 0, the coppa italia was less than 0, and the Serie A was more than 1?
SELECT SUM(total) FROM table_name_62 WHERE champions_league = 0 AND serie_a > 1 AND coppa_italia < 0
What are the names of all cities and states?
SELECT town_city FROM addresses UNION SELECT state_province_county FROM addresses
How many customers have filed complaints?
SELECT count ( * ) FROM customers WHERE customer_id IN ( SELECT customer_id FROM complaints )
Name the team for united center 22,147
SELECT team FROM table_22669044_9 WHERE location_attendance = "United Center 22,147"
What was the stats of Trinidad and Tobago
SELECT wind__m_s_ FROM table_1231316_4 WHERE country = "Trinidad and Tobago"
What about for Graciela?
SELECT T2.Visit_Date , T2.Visit_Details FROM VISITORS AS T1 JOIN VISITS AS T2 ON T1.Tourist_ID = T2.Tourist_ID WHERE T1.Tourist_Details = "Graciela"
When the Away team footscray played on the Date of 19 july 1980, what was the amount of people in the Crowd?
SELECT crowd FROM table_name_1 WHERE date = "19 july 1980" AND away_team = "footscray"
How many cars in the database are originated from Europe?
SELECT COUNT(*) FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin WHERE T2.country = 'Europe'
What was the average tonnage for the Siljan ship from Sweden?
SELECT AVG(tonnage) FROM table_name_97 WHERE nationality = "sweden" AND name_of_ship = "siljan"
What is the job occupation of Zach?
SELECT job FROM person WHERE name = 'Zach'
How many comedies did Shakespeare create?
SELECT COUNT(id) FROM works WHERE GenreType = 'Comedy'
What is the max salary for 'Tracy Coulter' if he/she stays on his/her position?
SELECT T2.maxsalary FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T1.firstname = 'Tracy' AND T1.lastname = 'Coulter'
Which company had profits of 26.9?
SELECT company FROM table_1682026_2 WHERE profits__billion_$_ = "26.9"
Which Series has a Date of may 2?
SELECT series FROM table_name_7 WHERE date = "may 2"
What is the 1998 value if the 2000 value is 25?
SELECT 1998 FROM table_name_3 WHERE 2000 = "25"
From which hometowns did no gymnasts come from?
SELECT DISTINCT Hometown FROM people EXCEPT SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID
What is every missile type with a code and location of M-20 Harbor Drive?
SELECT missile_type FROM table_22282917_26 WHERE code_ & _location = "M-20 Harbor Drive"
What is the name of the highest mountain?
SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1
What kind of locomotive is Winston Churchill?
SELECT locomotive_type FROM table_name_93 WHERE name = "winston churchill"
What is the zip code of staff with first name as Janessa and last name as Sawayn?
SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn";
Which college did kevin landolt attend?
SELECT college FROM table_name_10 WHERE name = "kevin landolt"
Between Deering and Near West districts, which district reported the most number of crime incidents that happened in a library?
SELECT T1.district_name FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no WHERE T1.district_name IN ('Deering', 'Near West') AND T2.location_description = 'LIBRARY' GROUP BY T1.district_name ORDER BY COUNT(T2.district_no) DESC LIMIT 1