sentence
stringlengths
3
347
sql
stringlengths
18
804
Yes, what is the class time? | Do you want to know all class time? | NO, only for ACCT-211
SELECT CLASS_TIME from CLASS where CRS_CODE = "ACCT-211"
Provide the email of the customers that purchased books with a price range of 3 to 5 dollars.
SELECT DISTINCT T3.email FROM order_line AS T1 INNER JOIN cust_order AS T2 ON T2.order_id = T1.order_id INNER JOIN customer AS T3 ON T3.customer_id = T2.customer_id WHERE T1.price BETWEEN 3 AND 5
How many times was the award inte awards?
SELECT COUNT(year) FROM table_name_90 WHERE award = "inte awards"
Can you please list the name of that 1 customer please?
SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "On Road" INTERSECT SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "Shipped"
Who was the opponent the falcons played against on week 3?
SELECT opponent FROM table_name_87 WHERE week = 3
Name the title with the highest price published by 'Binnet & Hardley'.
SELECT T1.title FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T2.pub_name = 'Binnet & Hardley' ORDER BY T1.price DESC LIMIT 1
WHAT IS THE NAME OF THE PERPETRATOR WITH THE BIGGEST WEIGHT ?
SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Weight DESC LIMIT 1
Among the trains that run in the east direction, how many of them have more than 2 long cars?
SELECT SUM(CASE WHEN T2.longCarsNum > 2 THEN 1 ELSE 0 END)as count FROM trains AS T1 INNER JOIN ( SELECT train_id, COUNT(id) AS longCarsNum FROM cars WHERE len = 'long' GROUP BY train_id ) AS T2 ON T1.id = T2.train_id WHERE T1.direction = 'west'
What are the booking start and end dates of the apartments with type code "Duplex"?
SELECT T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = "Duplex"
How many artists have album?
SELECT count ( distinct artistid ) FROM ALBUM
Find the number of complaints with Product Failure type for each complaint status.
SELECT complaint_status_code , count(*) FROM complaints WHERE complaint_type_code = "Product Failure" GROUP BY complaint_status_code
How many clients under the age of 35 gave Eagle National Mortgage 1 star?
SELECT COUNT(T2.age) FROM reviews AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T1.Product = 'Eagle National Mortgage' AND T1.Stars = 1 AND T2.age < 35
Who is listed under general classification on stage 4?
SELECT general_classification FROM table_27112708_2 WHERE stage = 4
How many Sports games did Nintendo publish?
SELECT COUNT(T3.id) FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id INNER JOIN game AS T3 ON T2.game_id = T3.id INNER JOIN genre AS T4 ON T3.genre_id = T4.id WHERE T4.genre_name = 'Sports' AND T1.publisher_name = 'Nintendo'
What Category has a Result of Nominated, Year of 2006, and the Title of Pierrepoint?
SELECT category FROM table_name_64 WHERE result = "nominated" AND year = 2006 AND title = "pierrepoint"
What was the date for Round 2r?
SELECT date FROM table_name_5 WHERE round = "2r"
Name the directed by for 15.15 viewers
SELECT directed_by FROM table_16617011_1 WHERE us_viewers__millions_ = "15.15"
What are the African countries that have a population less than any country in Asia?
SELECT Name FROM country WHERE Continent = "Africa" AND population < (SELECT max(population) FROM country WHERE Continent = "Asia")
List the names of companies by ascending number of sales.
SELECT Name FROM company ORDER BY Sales_in_Billion ASC
what is the total number of date where visitor is new jersey nets
SELECT COUNT(date) FROM table_11964047_5 WHERE visitor = "New Jersey Nets"
How many new entries this round are there with more than 16 matches and a third round qualifying?
SELECT new_entries_this_round FROM table_name_90 WHERE matches > 16 AND round = "third round qualifying"
Report the first name and last name of all the students.
SELECT DISTINCT firstname , lastname FROM list
What's the production code of the episode seen by 11.64 million US viewers?
SELECT production_code FROM table_12159115_2 WHERE us_viewers__millions_ = "11.64"
Find the first and last name of the staff members who reported problems FROM the product "rem" but not "aut"?
SELECT T3.staff_first_name , T3.staff_last_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = "rem" EXCEPT SELECT T3.staff_first_name , T3.staff_last_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = "aut"
What is the sea level and average speed for store number 3 and store number 4?
SELECT T1.sealevel, T1.avgspeed FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T2.store_nbr = 3 OR T2.store_nbr = 4
List all information regarding the basketball match.
SELECT * FROM basketball_match
What are the first names for students who have an "a" in their first name?
SELECT DISTINCT Fname FROM STUDENT WHERE Fname LIKE '%a%'
What games have more than 1 draw?
SELECT AVG(games) FROM table_name_22 WHERE drawn > 1
How many aircrafts do we have?
SELECT count(*) FROM Aircraft
Which city has the highest temperature in February?
SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id ORDER BY T2.Feb DESC LIMIT 1
On 8/29/2013, who took the longest to arrive in California Ave Caltrain Station from University and Emerson? Indicate the bike id.
SELECT bike_id FROM trip WHERE start_date LIKE '8/29/2013%' AND end_date LIKE '8/29/2013%' AND end_station_name = 'California Ave Caltrain Station' AND start_station_name = 'University and Emerson' AND duration = ( SELECT MAX(duration) FROM trip WHERE start_date LIKE '8/29/2013%' AND end_date LIKE '8/29/2013%' AND end_station_name = 'California Ave Caltrain Station' AND start_station_name = 'University and Emerson' )
How many students have advisors?
SELECT count(DISTINCT s_id) FROM advisor
WHAT IS THE LOWEST DIAMETER FOR A LATITIDE OF 52.0S?
SELECT MIN(diameter__km_) FROM table_name_78 WHERE latitude = "52.0s"
Which Series has an Opponent of new york rangers, and a Score of 3–2 ot?
SELECT series FROM table_name_59 WHERE opponent = "new york rangers" AND score = "3–2 ot"
For the shipment received by Leszek Kieltyka on 2017/9/25, what was its weight?
SELECT T1.weight FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T2.first_name = 'Leszek' AND T2.last_name = 'Kieltyka' AND T1.ship_date = '2017-09-25'
What are the names of all directors who made one movie?
SELECT director FROM Movie GROUP BY director HAVING count(*) = 1
What is the number of employees?
SELECT count(*) FROM Employee
What is the most recent year featuring the director Christopher Kulikowski?
SELECT MAX(year) FROM table_name_89 WHERE director = "christopher kulikowski"
What lenses are those? | Which kind of information do you want about those lenses? | What is the name of the lenses not used for taking photos?
SELECT name FROM camera_lens WHERE id NOT IN ( SELECT camera_lens_id FROM photos )
Yes, from that list can I have it sorted by order ID? | Did you mean in the Order table order by order id ? desc or asc? | My apologies, I meant can I have list of orders which includes the product ids from the orders placed?
SELECT T1.order_id ,T2.product_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id
And for Jeramie?
SELECT customer_id FROM customers where customer_name = "Jeramie"
How many swimsuits have an Evening Gown larger than 9, and an Interview larger than 8.405?
SELECT COUNT(swimsuit) FROM table_name_32 WHERE evening_gown > 9 AND interview > 8.405
What is the rated power for the reactor that ended construction on May 10, 1978?
SELECT rated_power FROM table_name_52 WHERE finish_construction = "may 10, 1978"
What is the air carrier's description of the cancelled flights?
SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.CANCELLED = 1 GROUP BY T1.Description
What years did Lou Graham win in?
SELECT year_s__won FROM table_name_41 WHERE player = "lou graham"
Among the crimes happened in the neighborhood called "Avalon Park", what is the percentage of crimes that happened inside the house?
SELECT CAST(SUM(CASE WHEN T2.location_description = 'HOUSE' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.location_description) AS persent FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T1.community_area_no = T2.community_area_no INNER JOIN Neighborhood AS T3 ON T2.community_area_no = T3.community_area_no WHERE T3.neighborhood_name = 'Avalon Park'
List the name of all games published in Japan.
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 region_sales AS T4 ON T3.id = T4.game_platform_id INNER JOIN region AS T5 ON T4.region_id = T5.id WHERE T5.region_name = 'Japan'
What are the names of high schoolers who have likes, and how many likes does each have?
SELECT T2.name , count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id
What is the public debt % of GDP in 2013 Q1 with a 4.7% GDP of EU in 2012?
SELECT public_debt__percentage_of_gdp__2013_q1_ FROM table_1598533_8 WHERE gdp__percentage_of_eu__2012_ = "4.7%"
What are the dock counts of each of those?
SELECT name,dock_count FROM station WHERE city = "San Jose"
How much higher in percentage is the highest supply cost of the part "hot spring dodger dim light" than the lowest supply cost?
SELECT CAST((MAX(T1.ps_supplycost) - MIN(T1.ps_supplycost)) AS REAL) * 100 / MIN(T1.ps_supplycost) FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1.ps_suppkey = T2.s_suppkey INNER JOIN part AS T3 ON T1.ps_partkey = T3.p_partkey WHERE T3.p_name = 'hot spring dodger dim light'
Tell me the highest time for heat rank of 8 and lane more than 2
SELECT MAX(time) FROM table_name_48 WHERE heat_rank = 8 AND lane > 2
What are the start and end dates for incidents with incident type code "NOISE"?
SELECT date_incident_start, date_incident_end FROM Behavior_Incident WHERE incident_type_code = "NOISE"
Which contact channel has been used by the customer with name "Tillman Ernser"?
SELECT DISTINCT channel_code FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = "Tillman Ernser"
Find the name of the students who have more than one advisor?
SELECT T1.name FROM student AS T1 JOIN advisor AS T2 ON T1.id = T2.s_id GROUP BY T2.s_id HAVING count(*) > 1
For all directors who directed more than one movie, return the titles of all movies directed by them, along with the director name. Sort by director name, then movie title.
SELECT T1.title , T1.director FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title != T2.title ORDER BY T1.director , T1.title
How many students enlisted in the Navy?
SELECT COUNT(name) FROM enlist WHERE organ = 'navy'
Count the number of courses.
SELECT count(*) FROM COURSE
Among all Disney movies directed by Gary Trousdale, determine the percentage that earned over USD100m based on actual grossing.
SELECT CAST(COUNT(CASE WHEN CAST(REPLACE(trim(T1.total_gross, '$'), ',', '') AS REAL) > 100000000 THEN T1.movie_title ELSE NULL END) AS REAL) * 100 / COUNT(T1.movie_title) FROM movies_total_gross AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T2.director = 'Gary Trousdale'
Name the number in series for number 38
SELECT MIN(no_in_series) FROM table_18335117_5 WHERE no_overall = 38
Name the listen owners for repairone
SELECT listed_owner_s_ FROM table_2187178_1 WHERE primary_sponsor_s_ = "RepairOne"
Which activity has the most faculty members participating in? Find the activity name.
SELECT T1.activity_name FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1
What was the result of the game on week 4?
SELECT result FROM table_name_16 WHERE week = 4
How many 2 stars rated business located in Phoenix, Arizona?
SELECT COUNT(business_id) FROM Business WHERE city = 'Phoenix' AND state = 'AZ' AND stars = 2
What notes have 2 as the rank?
SELECT notes FROM table_name_62 WHERE rank = 2
What is the Kilometer of the Berendries asphalt course with an Average climb less than 7 and Length (m) longer than 645?
SELECT AVG(kilometer) FROM table_name_15 WHERE pavement = "asphalt" AND length__m_ > 645 AND name = "berendries" AND average_climb___percentage_ < 7
What dorm id have the amenity id 901?
SELECT T2.dormid FROM has_amenity AS T2 where T2.amenid = 901
Which label has a date of 1987?
SELECT label FROM table_name_52 WHERE date = "1987"
What round was less than 545 overall for San Francisco Giants?
SELECT round FROM table_name_92 WHERE overall < 545 AND mlb_team = "san francisco giants"
What are all the distinct details of the customers?
SELECT DISTINCT customer_details FROM Customers
Which Score has a Place of t6, and a Player of raymond floyd?
SELECT score FROM table_name_43 WHERE place = "t6" AND player = "raymond floyd"
Return the type code of the template type that the most templates belong to.
SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1
what are the maximum revenues of all companies?
SELECT max ( revenue ) FROM manufacturers
What is the average height of an East conference All-star player?
SELECT AVG(DISTINCT height) FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE conference = 'East'
Which Moving from has a Nat of ned?
SELECT moving_from FROM table_name_26 WHERE nat = "ned"
WHAT IS LAST NAME OF THE STAFF WHO HAS HANDLED THE FIRST EVER COMPLAINT?
SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id ORDER BY t2.date_complaint_raised LIMIT 1
Name the segment c for couscous
SELECT segment_c FROM table_15187735_3 WHERE segment_b = "Couscous"
What's the name of the course with most number of enrollments?
SELECT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY count(*) DESC LIMIT 1
How many paragraphs contain the character Lord Abergavenny?
SELECT SUM(T1.ParagraphNum) FROM paragraphs AS T1 INNER JOIN characters AS T2 ON T1.character_id = T2.id WHERE T2.CharName = 'Lord Abergavenny'
What are the descriptions for all the math courses?
SELECT course_description FROM Courses WHERE course_name = 'math'
Which country has the lowest percentage of arable land?
SELECT CountryName FROM Indicators WHERE IndicatorName LIKE 'Arable land (% of land area)' ORDER BY Value DESC LIMIT 1
What is the Date when the Set 2 is 13–25?
SELECT date FROM table_name_32 WHERE set_2 = "13–25"
/What is Tie No, when Date is 18 February 1956, and when Away Team is Tottenham Hotspur?
SELECT tie_no FROM table_name_44 WHERE date = "18 february 1956" AND away_team = "tottenham hotspur"
List down app that does not have negative sentiment and give their average rating?
SELECT T1.App, AVG(T2.Sentiment_Polarity) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T2.Sentiment != 'Negative' GROUP BY T1.App
Can you please show me all female architects by their names lexicographically?
SELECT name FROM architect WHERE gender = 'male' ORDER BY name
And who manufactures the Hard drive?
SELECT Manufacturer FROM Products where Name = 'Hard drive'
Give the full name and staff id of the staff who has handled the fewest payments.
SELECT T1.first_name , T1.last_name , T1.staff_id FROM staff AS T1 JOIN payment AS T2 ON T1.staff_id = T2.staff_id GROUP BY T1.staff_id ORDER BY count(*) ASC LIMIT 1
What is the position coordinate on the page menu of the "Small Hominy" dish and how long did it appear?
SELECT T2.xpos, T2.ypos, T1.last_appeared - T1.first_appeared FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.name = 'Small Hominy'
Who wrote the album recorded at funhouse studios with a time of 3:27?
SELECT writer_s_ FROM table_name_64 WHERE recorded_at = "funhouse studios" AND time = "3:27"
Which employee are those documents associated with?
SELECT Employees.employee_name FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id GROUP BY employees.employee_id ORDER BY count ( * ) DESC LIMIT 1
Who was the opponent during week 8?
SELECT opponent FROM table_name_67 WHERE week = 8
What is the stadium of the san diego chargers?
SELECT stadium FROM table_name_99 WHERE team = "san diego chargers"
What is the Week number on November 30, 1958 with more than 33,240 in Attendance?
SELECT COUNT(week) FROM table_name_64 WHERE date = "november 30, 1958" AND attendance > 33 OFFSET 240
How many products have the characteristic named "hot"?
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 t3.characteristic_name = "hot"
List the names of the coins above the average price on April 28, 2013.
SELECT T1.name FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.date = '2018-04-28' AND T2.price > ( SELECT AVG(price) FROM historical WHERE date = '2018-04-28' )
How many students are filed for bankruptcy?
SELECT COUNT(name) FROM filed_for_bankrupcy
Please list the event IDs of the events that have happened on the device of the oldest user.
SELECT T2.event_id FROM gender_age AS T1 INNER JOIN events AS T2 ON T1.device_id = T2.device_id ORDER BY T1.age DESC LIMIT 1
Tell me the statement details of the statement id 197?
SELECT statement_details from statements where statement_id = 197
Which manager has Manchester City as the team?
SELECT manager FROM table_name_14 WHERE team = "manchester city"
Which school has the fewest professors?
SELECT T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.school_code ORDER BY count(*) LIMIT 1