sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Who was the Republican candidate against the Democratic candidate Arthur Levitt? | SELECT republican_ticket FROM table_name_65 WHERE democratic_ticket = "arthur levitt" |
How much Money is requested by BassToneSlap? | SELECT money_requested__Β£_ FROM table_name_10 WHERE company_or_product_name = "basstoneslap" |
Who was in 2nd leg when Boca Juniors was in home (1st leg)? | SELECT 2 AS nd_leg FROM table_14219514_1 WHERE home__1st_leg_ = "Boca Juniors" |
What is the molecular target listed under the compounded name of hemiasterlin (e7974) | SELECT molecular_target FROM table_12715053_1 WHERE compound_name = "Hemiasterlin (E7974)" |
Which report had a circuit of Cagliari? | SELECT report FROM table_name_33 WHERE circuit = "cagliari" |
What is the age of the youngest editor? | SELECT age FROM editor ORDER BY Age ASC LIMIT 1 |
Find the number of students who are older than 18 and do not have allergy to either food or animal. | SELECT count(*) FROM Student WHERE age > 18 AND StuID NOT IN ( SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "food" OR T2.allergytype = "animal") |
Can you filter this list to include only the investors that were associated with more than one entrepreneur id? | SELECT Investor FROM entrepreneur group by investor having count ( * ) > 1 |
In what week was the first game played? | SELECT MIN(week) FROM table_29679510_2 |
How many part supplies are close to being out of stock? | SELECT COUNT(ps_suppkey) FROM partsupp WHERE ps_availqty < 10 |
Who was the candidate in the Virginia 3 district election? | SELECT candidates FROM table_1341577_47 WHERE district = "Virginia 3" |
What are their nationalities? | SELECT t1.nationality FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win' GROUP BY t2.swimmer_id HAVING count ( * ) > 1 |
Please list all the cities in Argentina. | SELECT City FROM location WHERE City IS NOT NULL AND Country = 'Argentina' |
How many ties drawed at 20? | SELECT ties FROM table_name_74 WHERE drawn = "20" |
What is the Streak in the game with a Record of 20β16? | SELECT streak FROM table_name_42 WHERE record = "20β16" |
Who had the fastest lap of the race that Ayrton Senna won on 23 April? | SELECT fastest_lap FROM table_name_4 WHERE winning_driver = "ayrton senna" AND date = "23 april" |
Which Division Two team were champions as the same time the Premier Division Leominster town team were champs? | SELECT division_two FROM table_name_26 WHERE premier_division = "leominster town" |
How many positions have round 3? | SELECT COUNT(position) FROM table_20872722_1 WHERE round = 3 |
What is the total sales amount of all discontinued products? | SELECT SUM(T2.UnitPrice * T2.Quantity) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Discontinued = 1 |
How many words are there on the page titled "Asclepi"? | SELECT words FROM pages WHERE title = 'Asclepi' |
Who was the rider with a grid of 36? | SELECT rider FROM table_name_39 WHERE grid = 36 |
Which Visitor has a Home of bulls? | SELECT visitor FROM table_name_64 WHERE home = "bulls" |
On what date did the New York Giants host a game? | SELECT date FROM table_name_42 WHERE host_team = "new york giants" |
What is the average amount of rent that Christy Vargas paid? | SELECT AVG(T2.amount) FROM customer AS T1 INNER JOIN payment AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'CHRISTY' AND T1.Last_name = 'VARGAS' |
Give me the title and category name of films whose price per day is more than $30. Please include their special features. | SELECT T1.title, T3.name, T1.special_features FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T1.rental_duration * T1.rental_rate > 30 |
Who wins with a score 7β6(4), 6β4 | SELECT winner FROM table_name_1 WHERE score = "7β6(4), 6β4" |
Which Surface has an Opponent of kerry melville reid, and a Score of 6β3, 2β6, 3β6? | SELECT surface FROM table_name_53 WHERE opponent = "kerry melville reid" AND score = "6β3, 2β6, 3β6" |
Find the country of origin for the artist who made the least number of songs? | SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY count(*) LIMIT 1 |
Which Yards have an avg of 11.8, and a Player of brent celek, and a Long larger than 44? | SELECT AVG(yards) FROM table_name_2 WHERE avg = 11.8 AND player = "brent celek" AND long > 44 |
What form factor has capacities at 60/120/180/240? | SELECT form_factor FROM table_name_65 WHERE capacities__gb_ = "60/120/180/240" |
What are the names of the tourist attractions that have parking or shopping as their feature details? | SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'park' UNION SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'shopping' |
What is the address of the Peking Duck restaurant? | SELECT T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.label = 'peking duck restaurant' |
Who had a finish of t15? | SELECT player FROM table_name_67 WHERE finish = "t15" |
What age of last name Kim? | SELECT age from Student where lname = "Kim" |
List all the songs associated with drama movies. | SELECT song FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title WHERE T1.genre = 'Drama' GROUP BY song |
What are the different ages of editors? Show each age along with the number of editors of that age. | SELECT Age, COUNT(*) FROM editor GROUP BY Age |
Date of january 11, 1998 has what surface? | SELECT surface FROM table_name_55 WHERE date = "january 11, 1998" |
What is the number of inhabitants and income of geographic identifier 239? | SELECT INHABITANTS_K FROM Demog WHERE GEOID = 239 |
What song title was written by Kal Mann and Bernie Lowe? | SELECT song_title FROM table_name_14 WHERE writer_s_ = "kal mann and bernie lowe" |
How many 4-year public institutions are there in the state of Florida? Give all of their names. | SELECT T1.chronname FROM institution_details AS T1 INNER JOIN state_sector_details AS T2 WHERE T2.level = '4-year' AND T2.control = 'Public' AND T2.state = 'Florida' |
Which Status has a Date of 19/05/1981? | SELECT status FROM table_name_34 WHERE date = "19/05/1981" |
What Team has a Class of 350cc, with less than 13 points in 1959? | SELECT team FROM table_name_93 WHERE class = "350cc" AND points < 13 AND year = 1959 |
how mant different day names in old English were coined from the Latin day name "dies iovis"? | SELECT COUNT(old_english_day_name) FROM table_2624098_1 WHERE glossed_from_latin_day_name = "Dies Iovis" |
What is the lowest jews and others 1 for the localities 11? | SELECT MIN(jews_and_others_1) FROM table_25947046_1 WHERE localities = 11 |
What's the cover image of the user who created the movie list 'Georgia related films'? | SELECT T1.user_cover_image_url FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T2.list_title LIKE 'Georgia related films' |
Which is the most fuel efficient car in 1975? | SELECT T1.car_name FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T2.model_year = '1975' ORDER BY T1.mpg DESC LIMIT 1 |
How many lesson does customer with first name Ray took? | SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = "Ray" |
What is the name of constituency 5? | SELECT name FROM table_name_50 WHERE constituency_number = "5" |
Who are all the opponents of Slovakia? | SELECT opponents FROM table_16741821_9 WHERE against = "Slovakia" |
What was Collingwood's score in their away game? | SELECT away_team AS score FROM table_name_39 WHERE away_team = "collingwood" |
What are the investor name of Leonardo Binchi? | SELECT T1.Investor FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Name = "Leonardo Binchi" |
Who are the authors of the paper "Determination of Planetary Meteorology from Aerobot Flight Sensors"? | SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'Determination of Planetary Meteorology FROM Aerobot Flight Sensors' |
Count the total number of roles listed. | SELECT count(*) FROM ROLES |
What winner has pierre rolland as mountains classification, with 7 as the stage? | SELECT winner FROM table_name_14 WHERE mountains_classification = "pierre rolland" AND stage = "7" |
What about for department number 600? | SELECT T1.Fname , T1.Lname FROM FACULTY AS T1 JOIN MEMBER_OF AS T2 ON T1.FacID = T2.FacID WHERE T2.DNO = 600 |
What is the total price of the order made by Cruz & Sons Co. on 2003/3/3? | SELECT SUM(t1.priceEach * t1.quantityOrdered) FROM orderdetails AS t1 INNER JOIN orders AS t2 ON t1.orderNumber = t2.orderNumber INNER JOIN customers AS t3 ON t2.customerNumber = t3.customerNumber WHERE t3.customerName = 'Cruz & Sons Co.' AND t2.orderDate = '2003-03-03' |
What type had an election day in 1980 | SELECT type FROM table_1602620_1 WHERE elected = 1980 |
How many distinct complaint type codes are there in the database? | SELECT count(DISTINCT complaint_type_code) FROM complaints |
What are the names of the songs whose title has the word "the"? | SELECT title FROM songs WHERE title LIKE '% the %' |
Show the colleges that have both authors with submission score larger than 90 and authors with submission score smaller than 80. | SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80 |
What country is ranked higher than 5? | SELECT country FROM table_name_29 WHERE rank > 5 |
What was the lowest population of the GEO ID 3805373380 and the water square mileage smaller than 5.729? | SELECT MIN(pop__2010_) FROM table_name_25 WHERE geo_id = 3805373380 AND water__sqmi_ < 5.729 |
What are the inspector's comments and clean operating requirement code for inspection ID 54216 and point ID 34? | SELECT T2.inspector_comment, T1.code FROM inspection_point AS T1 INNER JOIN violation AS T2 ON T1.point_id = T2.point_id WHERE T2.inspection_id = 54216 AND T2.point_id = 34 |
What are the captions of all the self-relation relationship prediction classes? | SELECT T2.PRED_CLASS FROM IMG_REL AS T1 INNER JOIN pred_classes AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.OBJ1_SAMPLE_ID = T1.OBJ2_SAMPLE_ID GROUP BY T2.PRED_CLASS |
What is Away team Carlton's score? | SELECT away_team AS score FROM table_name_59 WHERE away_team = "carlton" |
What was the featured in Engine through rounds 10-13? | SELECT engine FROM table_name_85 WHERE rounds = "10-13" |
Who is the spokesperson after 2012? | SELECT spokesperson FROM table_name_33 WHERE year_s_ > 2012 |
Find the cell mobile number of the candidates whose assessment code is "Fail"? | SELECT T3.cell_mobile_number FROM candidates AS T1 JOIN candidate_assessments AS T2 ON T1.candidate_id = T2.candidate_id JOIN people AS T3 ON T1.candidate_id = T3.person_id WHERE T2.asessment_outcome_code = "Fail" |
What is the largest pick by the Baltimore Colts in a round later than 10? | SELECT MAX(pick) FROM table_name_27 WHERE nfl_club = "baltimore colts" AND round > 10 |
Which series # had 0.645 U.S. viewers(millions)? | SELECT MAX(series__number) FROM table_26808178_3 WHERE us_viewers__millions_ = "0.645" |
What is the height for rank greater than 10 in Tameer Tower? | SELECT height_m__ft_ FROM table_name_77 WHERE rank > 10 AND name = "tameer tower" |
Find the number of dog pets that are raised by female students (with sex F). | SELECT COUNT(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.petid = T3.petid WHERE T1.sex = 'F' AND T3.pettype = 'dog' |
What is the description of document status code 'working'? | SELECT document_status_description FROM Ref_Document_Status WHERE document_status_code = "working"; |
What pick was play Jason Webb? | SELECT MAX(pick) FROM table_name_31 WHERE player = "jason webb" |
Which physicians prescribe a medication of brand X? Tell me the name and position of those physicians. | 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" |
How many of the approved documents are confidential? | SELECT COUNT(DocumentNode) FROM Document WHERE Status = 2 AND DocumentSummary IS NULL |
Which employee is in charge of the sales in Hollis? Please give the employee's full name. | SELECT T1.FirstName, T1.LastName 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 T3.TerritoryDescription = 'Hollis' |
Find the department with the most employees. | SELECT name FROM department GROUP BY departmentID ORDER BY count(departmentID) DESC LIMIT 1; |
What is the receipt date of the document with id 3? | SELECT receipt_date FROM Documents WHERE document_id = 3; |
What venue features geelong as the away side? | SELECT venue FROM table_name_29 WHERE away_team = "geelong" |
What is the last name of the student who received an A in the class with the code 10018? | SELECT T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'A' AND T2.class_code = 10018 |
What is the sum of enrollments for schools located in Culver? | SELECT SUM(enrollment) FROM table_name_28 WHERE location = "culver" |
If the college is Vanderbilt, what is the position? | SELECT position FROM table_27132791_3 WHERE college = "Vanderbilt" |
What was the number of the game against Charlotte? | SELECT SUM(game) FROM table_name_63 WHERE team = "charlotte" |
What are the name and description for location code x? | SELECT location_name , location_description FROM Ref_locations WHERE location_code = "x" |
Find the average credit score of the customers who have some loan. | SELECT avg(credit_score) FROM customer WHERE cust_id IN (SELECT cust_id FROM loan) |
WHAT PLAYER HAS UPLAND HIGH SCHOOL? | SELECT player FROM table_name_88 WHERE hometown_school = "upland high school" |
Could you please tell me who is President of the club Bootup Baltimore. | Do you want the first and last name of him? | Yes, please provide first and last name of the President of the club Bootup Baltimore. | SELECT T3.fname, T3.lname 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 T1.clubname = "Bootup Baltimore" and T2.position = "President" |
What was the date of the game where North Melbourne was the home team? | SELECT date FROM table_name_65 WHERE home_team = "north melbourne" |
What percentage of votes does the shareholder with 78.19% of capital have? | SELECT _percentage_of_votes FROM table_206359_1 WHERE _percentage_of_capital = "78.19" |
Name the term ends for bethlehem | SELECT COUNT(term_ends) FROM table_1979619_3 WHERE residence = "Bethlehem" |
Among the products that have price ranges from 100 to 150, what is the customer ID and sales ID of the product with a quantity lower than 25? | SELECT T2.CustomerID, T2.SalesID FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Price BETWEEN 100 AND 150 AND T2.Quantity < 25 |
Find the the name of the customers who have a loan with amount more than 3000. | SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE amount > 3000 |
List the grapes and appelations of all wines. | SELECT Grape , Appelation FROM WINE |
How many males do we have data for? | select count ( * ) from person where gender = 'male' |
What are the content ratings for the apps that have "gr8" in their comments? | SELECT DISTINCT T1.`Content Rating` FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T2.Translated_Review LIKE '%gr8%' |
What is the date of the second round? | SELECT date FROM table_name_66 WHERE round = "second round" |
can you show me player names that starting with 'A'? | SELECT pName FROM player where pName like 'A%' |
How many transaction does each account have? Show the number and account id. | SELECT count(*) , account_id FROM Financial_transactions |
What are the names of all reviewers that have rated 3 or more movies? | SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T1.rID HAVING COUNT(*) >= 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.