sentence
stringlengths
3
347
sql
stringlengths
18
804
What are the names of enzymes in the medicine named 'Amisulpride' that can serve as an 'inhibitor'?
SELECT T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id JOIN medicine AS T3 ON T2.medicine_id = T3.id WHERE T3.name = 'Amisulpride' AND T2.interaction_type = 'inhibitor'
Which Points have an Opponent of @ atlanta thrashers, and a Game smaller than 28?
SELECT SUM(points) FROM table_name_2 WHERE opponent = "@ atlanta thrashers" AND game < 28
what's the wine style with village being puligny-montrachet [d ]
SELECT wine_style FROM table_13981938_1 WHERE village = "Puligny-Montrachet [d ]"
Who is the original west end performer for the character Neville Craven?
SELECT original_west_end_performer FROM table_1901751_1 WHERE character = "Neville Craven"
Are the customers holding coupons with amount 500 bad or good?
SELECT T1.good_or_bad_customer FROM customers AS T1 JOIN discount_coupons AS T2 ON T1.coupon_id = T2.coupon_id WHERE T2.coupon_amount = 500
Find the names of all the customers and staff members.
SELECT customer_details FROM customers UNION SELECT staff_details FROM staff
What are the results of the incumbent who was first elected in 1996?
SELECT results FROM table_name_79 WHERE first_elected = 1996
Name who directed the air date of 12 july 2010
SELECT directed_by FROM table_27218002_1 WHERE originalairdate = "12 July 2010"
What is Beohari's highest number of electorates?
SELECT MAX(number_of_electorates__2009_) FROM table_name_81 WHERE name = "beohari"
What was the population of a country with a population density of 14.3/km² (/sqmi)?
SELECT population__july_2009_est_ FROM table_26769_1 WHERE population_density_per_km² = "14.3/km² (/sqmi)"
What is the platform of the game built in 2006?
SELECT platform_s_ FROM table_name_53 WHERE year = "2006"
How many apartments have facilities?
SELECT count ( * ) FROM Apartments WHERE apt_id IN ( SELECT apt_id FROM Apartment_Facilities )
Tweets that were posted from Brazil are in what languague?
SELECT DISTINCT T1.Lang FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T2.Country = 'Brazil'
Among the Ivy League Schools in 2013, which schools have the highest number of Black students who graduated within 150 percent of normal/expected time who were seeking a bachelor's/equivalent cohort at 4-year institutions?
SELECT T1.chronname FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.chronname IN ( 'Brown University', 'Columbia University', 'Cornell University', 'Dartmouth College', 'Harvard University', 'Princeton University', 'University of Pennsylvania', 'Yale University' ) AND T2.year = 2013 AND T2.race = 'B' AND T2.cohort = '4y bach' ORDER BY T2.grad_cohort DESC LIMIT 1
During footscray's home match, who was the away team?
SELECT away_team AS score FROM table_name_33 WHERE home_team = "footscray"
What are the titles of segment b when segment c is standby generators (part 1)?
SELECT segment_b FROM table_15187735_21 WHERE segment_c = "Standby Generators (Part 1)"
What year was Wilfred Lau separated because Capital stopped recording music?
SELECT year_separated FROM table_name_74 WHERE reason_for_separation = "capital stopped recording music" AND english_name = "wilfred lau"
what is the minimum of 60 -64?
SELECT MIN(60 AS _to_64) FROM table_16457934_4
What are the names of tourist attraction that Alison visited but Rosalind did not visit?
SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Alison" EXCEPT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Rosalind"
Which highest pick number's name was Adam Podlesh, when the overall was less than 101?
SELECT MAX(pick__number) FROM table_name_2 WHERE name = "adam podlesh" AND overall < 101
For which league is the open cup the quarter finals
SELECT league FROM table_1214035_1 WHERE open_cup = "Quarter Finals"
What is the half-life discovered in 2003?
SELECT half_life FROM table_name_22 WHERE discovery_year = "2003"
Where is the University that is also called Hawks?
SELECT location FROM table_19210115_1 WHERE nickname = "Hawks"
Who is the writer for the episode with the most 10 star votes?
SELECT T1.person FROM Credit AS T1 INNER JOIN Vote AS T2 ON T1.episode_id = T2.episode_id WHERE T1.role = 'Writer' AND T2.stars = 10 GROUP BY T1.person ORDER BY COUNT(*) DESC LIMIT 1;
How many distinct order ids correspond to each product?
SELECT product_id , count(DISTINCT order_id) FROM Order_items GROUP BY product_id
List the names of products that are not in any event.
SELECT Product_Name FROM Products WHERE Product_ID NOT IN (SELECT Product_ID FROM Products_in_Events)
How many distinct courses are enrolled in by students?
SELECT count(course_id) FROM Student_Course_Enrolment
What is the letter name for the Asomtavruli ⴙ?
SELECT letter_name FROM table_name_74 WHERE asomtavruli = "ⴙ"
Please list the official full names of all the current legislators who were once a senator during his or her terms.
SELECT T2.official_full_name FROM `current-terms` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T1.state_rank IS NOT NULL
What about the smallest?
SELECT * FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY count ( * ) LIMIT 1
Show the city and the number of branches opened before 2010 for each city
SELECT city , count ( * ) FROM branch WHERE open_year < 2010 GROUP BY city
What is the sum of Evening Gown scores where the swimsuit score is higher than 9.4 and the average score is lower than 9.733?
SELECT SUM(evening_gown) FROM table_name_88 WHERE swimsuit > 9.4 AND average < 9.733
Show the date of the tallest perpetrator.
SELECT T2.Date FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1
What is the rank number for a placing of 28.5 and a total less than 92.7?
SELECT COUNT(rank) FROM table_name_30 WHERE placings = "28.5" AND total < 92.7
What is the year First Elected, when the Party is Alp, and when the State is qld?
SELECT first_elected FROM table_name_17 WHERE party = "alp" AND state = "qld"
Hi there! Can you show me a list of all of the different document names and the associated access count for each of them?
SELECT document_name, access_count FROM documents
What is the date of elevation for the Cardinal elevated by Nicholas III to the title of Cardinal-Deacon of S. Eustachio?
SELECT elevated FROM table_name_7 WHERE elevator = "nicholas iii" AND cardinalatial_order_and_title = "cardinal-deacon of s. eustachio"
Find the market shares and names of furnitures which no any company is producing in our records.
SELECT Market_Rate , name FROM furniture WHERE Furniture_ID NOT IN (SELECT Furniture_ID FROM furniture_manufacte)
Give the number of students who enlisted in marines and have payment due.
SELECT COUNT(T1.name) FROM no_payment_due AS T1 INNER JOIN enlist AS T2 ON T1.name = T2.name WHERE T1.bool = 'pos' AND T2.organ = 'marines'
Which event was in round 1, resulted in a win, and a record of 15-4?
SELECT event FROM table_name_70 WHERE round = 1 AND res = "win" AND record = "15-4"
Give the total amount of rent for the movie Clockwork Paradice.
SELECT SUM(T1.amount) FROM payment AS T1 INNER JOIN rental AS T2 ON T1.rental_id = T2.rental_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id WHERE T4.title = 'CLOCKWORK PARADICE'
What type is the misurina to bassano del grappa course?
SELECT type FROM table_name_24 WHERE course = "misurina to bassano del grappa"
What was the Peak Position on July 11, 2001?
SELECT peak_position FROM table_name_12 WHERE date = "july 11, 2001"
How much money did the company Neurotica request?
SELECT money_requested__£_ FROM table_name_39 WHERE company_or_product_name = "neurotica"
Show the average, minimum, and maximum capacity for all the cinemas opened in year 2011 or later.
SELECT avg(capacity) , min(capacity) , max(capacity) FROM cinema WHERE openning_year >= 2011
What is the name of the student with the longest duration of absence?
SELECT name FROM longest_absense_from_school WHERE month = ( SELECT MAX(month) FROM longest_absense_from_school )
what is the least gold when the rank is 10 and silver is less than 0?
SELECT MIN(gold) FROM table_name_71 WHERE rank = "10" AND silver < 0
Show all party names and the number of members 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
Who directed the episode with 3.19 million u.s. viewers?
SELECT directed_by FROM table_12722302_2 WHERE us_viewers__million_ = "3.19"
What is the first name of each student enrolled in class ACCT-211?
SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211'
Which professionals live in the state of Indiana or have done treatment on more than 2 treatments? List his or her id, last name and cell phone.
SELECT professional_id , last_name , cell_number FROM Professionals WHERE state = 'Indiana' UNION SELECT T1.professional_id , T1.last_name , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) > 2
How many devices are there?
SELECT count(*) FROM device
What's Steve Langdon's naitionality?
SELECT nationality FROM table_1965650_4 WHERE player = "Steve Langdon"
How many years have a position of 2nd?
SELECT COUNT(year) FROM table_name_86 WHERE position = "2nd"
Count the total number of policies used by the customer named "Dayana Robel".
SELECT count(*) FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = "Dayana Robel"
What is the Score of the Competition with a Result of 5-0?
SELECT score FROM table_name_7 WHERE result = "5-0"
What is the the phone number of Nancy Edwards?
SELECT phone FROM employees WHERE first_name = "Nancy" AND last_name = "Edwards";
What is the boiler pressure for the Hesperus model?
SELECT boiler_pressure FROM table_name_58 WHERE name = "hesperus"
What is the phone number of Kerry Pryor?
SELECT phone_number FROM student WHERE l_name = 'Pryor' AND f_name = 'Kerry'
Name the Home captain for venue of the oval
SELECT home_captain FROM table_name_14 WHERE venue = "the oval"
What are all the section titles of the document named "David CV"?
SELECT t2.section_title FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code WHERE t1.document_name = "David CV"
How many employees is a UK citizen and are they all covering the same region?
SELECT COUNT(T1.EmployeeID), T3.RegionID FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T1.Country = 'UK' GROUP BY T3.RegionID
Which NHL team got pick 89?
SELECT nhl_team FROM table_name_49 WHERE pick__number = "89"
What Surface had a Rally HQ of salou?
SELECT surface FROM table_name_58 WHERE rally_hq = "salou"
What are the notes for the Mandarin Chinese program on CTV earlier than 2013?
SELECT notes FROM table_name_40 WHERE year < 2013 AND language = "mandarin chinese" AND network = "ctv"
Show the station name with the greatest number of trains, please.
SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id GROUP BY T1.station_id ORDER BY count ( * ) DESC LIMIT 1
Name the manner of departyre for 26 january date of appointment
SELECT manner_of_departure FROM table_name_4 WHERE date_of_appointment = "26 january"
Which grid is constructed by Maserati and driven by Oscar Alfredo Gálvez?
SELECT grid FROM table_name_74 WHERE constructor = "maserati" AND driver = "oscar alfredo gálvez"
Among the restaurants being inspected in 2016, how many of them are in San Francisco?
SELECT COUNT(DISTINCT T2.business_id) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE STRFTIME('%Y', T1.`date`) = '2016' AND T2.city IN ('San Francisco', 'SAN FRANCISCO', 'SF', 'S.F.')
How much does the dish on page 2 of menu ID 12474 cost?
SELECT T1.price FROM MenuItem AS T1 INNER JOIN MenuPage AS T2 ON T2.id = T1.menu_page_id WHERE T2.menu_id = 12474 AND T2.page_number = 2
Which rooms cost between 120 and 150? Give me the room names.
SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150
Name the IHSAA class with county 18 delaware and tigers mascot
SELECT ihsaa_class FROM table_name_82 WHERE _number___county = "18 delaware" AND mascot = "tigers"
Find all the players' first name and last name who have empty death record.
SELECT name_first , name_last FROM player WHERE death_year = '';
Hom many albums does the artist "Metallica" have?
SELECT COUNT(*) FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = "Metallica"
What is the average points of players from club with name "AIB".
SELECT avg(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T1.name = "AIB"
Show me the name of the club that has the id number 3 ?
select name from club where Club_ID = '3'
List down the DOB of players who received the "man of the match" award.
SELECT T2.DOB FROM Match AS T1 INNER JOIN Player AS T2 ON T2.Player_Id = T1.Man_of_the_Match
What Title has a Presentation of Credentials of October 4, 1988?
SELECT title FROM table_name_90 WHERE presentation_of_credentials = "october 4, 1988"
What is the name and the average gpa of department whose students have the highest average gpa?
SELECT T2.dept_name , avg(T1.stu_gpa) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY avg(T1.stu_gpa) DESC LIMIT 1
Which retitled network has a Show of supermarket sweep?
SELECT retitled_as_same FROM table_name_92 WHERE show = "supermarket sweep"
What is the Record on april 13?
SELECT record FROM table_name_32 WHERE date = "april 13"
What is McMaster College's pick number?
SELECT MIN(pick__number) FROM table_10960039_1 WHERE college = "McMaster"
How much is the net profit when the revenue is 150.6 million dollars?
SELECT net_profit__us_$m_ FROM table_18077713_1 WHERE revenue__us_$million_ = "150.6"
When was incumbent John N. Tillman first elected?
SELECT MIN(first_elected) FROM table_1346118_4 WHERE incumbent = "John N. Tillman"
What is the 1995 value with a Jiangxi year and a 2008 value bigger than 67?
SELECT SUM(1995) FROM table_name_7 WHERE year = "jiangxi" AND 2008 > 67
What Rider has a Grid of 21?
SELECT rider FROM table_name_91 WHERE grid = 21
The release from Simply Vinyl label was on what date?
SELECT date FROM table_name_91 WHERE label = "simply vinyl"
What is the highest rank of the athlete with a Taijiquan higher than 9.64 and a total more than 19.69?
SELECT MAX(rank) FROM table_name_95 WHERE taijiquan > 9.64 AND total > 19.69
What are the student ID and login name of the student who are enrolled in the most courses?
SELECT T1.student_id , T2.login_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1
Write the shipping company name with the telephone number of (503) 555-9931.
SELECT CompanyName FROM Shippers WHERE Phone = '(503) 555-9931'
What record has a score of 111-96?
SELECT record FROM table_name_56 WHERE score = "111-96"
Name the date for margalita chakhnashvili salome devidze
SELECT date FROM table_16893837_4 WHERE opponents = "Margalita Chakhnashvili Salome Devidze"
Name the institution for purple aces
SELECT institution FROM table_24216139_2 WHERE nickname = "Purple Aces"
How many are there that has made at least one payment?
select count ( * ) from ( SELECT * FROM customer AS T1 JOIN payment AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id )
what is the quantity when the year of manufacture is 1900 and the class is mc?
SELECT quantity FROM table_name_20 WHERE year_s__of_manufacture = "1900" AND class = "mc"
What is the average number of students for each advisor?
SELECT CAST(COUNT(p_id) AS REAL) / COUNT(DISTINCT p_id_dummy) AS avgnum FROM advisedBy GROUP BY p_id_dummy
What is the lowest population in which 28.0% are democrat?
SELECT MIN(population) FROM table_27003223_4 WHERE democratic = "28.0%"
What are the names of all songs that have a lower rating than some song of blues genre?
SELECT song_name FROM song WHERE rating < (SELECT MAX(rating) FROM song WHERE genre_is = "blues")
How many airports has pilot Thompson driven an aircraft?
SELECT count ( * ) FROM airport WHERE id IN ( SELECT airport_id FROM flight WHERE pilot = 'Thompson' )
Who was the actor that played in the movie "Batman" with the longest screentime?
SELECT T2.Name FROM characters AS T1 INNER JOIN actor AS T2 ON T1.ActorID = T2.ActorID INNER JOIN movie AS T3 ON T3.MovieID = T1.MovieID WHERE T3.Title = 'Batman' ORDER BY T1.screentime DESC LIMIT 1