sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What is the sum of Height (cm), when the Weight (kg) is 90? | SELECT SUM(height__cm_) FROM table_name_13 WHERE weight__kg_ = 90 |
What is the ship id and name that caused most total injuries? | SELECT T2.id , T2.name FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1 |
How many total viewers (combined Live and SD) watched the episode with a share of 8? | SELECT live + 7 AS _day_dvr_total_viewers FROM table_24222929_3 WHERE share = "8" |
What was the result of the Best Actor in a Musical category? | SELECT result FROM table_name_81 WHERE category = "best actor in a musical" |
What is the average price of all products? | SELECT avg ( product_price ) from products |
how many artists do you have? | select count ( distinct artistid ) from artist |
How many nominee's had a vote to evict percentage of 3.92% | SELECT COUNT(nominee) FROM table_15162479_8 WHERE vote_to_evict = "3.92%" |
What is Place, when Weapon is "35mm fire", and when Date is "27 May 1982"? | SELECT place FROM table_name_15 WHERE weapon = "35mm fire" AND date = "27 may 1982" |
What is the full name of client whose email address is [email protected]? | SELECT first, middle, last FROM client WHERE email = '[email protected]' |
What is the fastest lap for Seiji Ara? | SELECT fastest_lap FROM table_name_49 WHERE winning_driver = "seiji ara" |
What is the average lane for Australia? | SELECT AVG(lane) FROM table_name_30 WHERE nationality = "australia" |
What was the time when the laps were smaller than 66 and the grid was 15? | SELECT time_retired FROM table_name_62 WHERE laps < 66 AND grid = 15 |
What is the highest amount of silver when gold is 1 and bronze larger than 0? | SELECT MAX(silver) FROM table_name_40 WHERE gold = 1 AND bronze > 0 |
What is the number of sequences for the name Alifoldz? | SELECT number_of_sequences_number_of_sequences AS :_ FROM table_name_72 WHERE name = "alifoldz" |
What is the start date and time of the walk that ends March 28, 2005, 11:31? | SELECT start___utc__ FROM table_22385461_6 WHERE end__utc_ = "March 28, 2005, 11:31" |
In how many years did Pat Bradley became the champion? | SELECT COUNT(year) FROM table_229059_2 WHERE champion = "Pat Bradley" |
Show the names of members and the decoration themes they have. | SELECT T1.Name, T2.Decoration_Theme FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID |
what cinema is in Cork county? | SELECT Name FROM cinema WHERE Location = "County Cork" |
Mis-i is the nominative of what ergative? | SELECT ergative FROM table_name_48 WHERE nominative = "mis-i" |
How many clubs does "Linda Smith" belong to? | SELECT count(*) 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 = "Linda" AND t3.lname = "Smith" |
What is the total number of wins of the central murray of koondrook-barham, which has more than 0 draws? | SELECT COUNT(wins) FROM table_name_70 WHERE central_murray = "koondrook-barham" AND draws > 0 |
List the names of business in AZ with a rating of 5. | SELECT business_id FROM Business WHERE state LIKE 'AZ' AND stars = 5 |
What percentage of patients born in 'Pembroke MA US' have 'allergy to grass pollen'? | SELECT CAST(SUM(CASE WHEN T2.DESCRIPTION = 'Allergy to grass pollen' THEN 1 ELSE 0 END) AS REL) * 100 / COUNT(T1.patient) FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T1.birthplace = 'Pembroke MA US' |
What week was the game played at Rich Stadium? | SELECT week FROM table_name_94 WHERE game_site = "rich stadium" |
What is the accession number for Centromeric protein E? | SELECT accession_number FROM protein where protein_name = "Centromeric protein E, putative" |
How many airports are there per country? Order the countries by decreasing number of airports. | SELECT count(*) , country FROM airports GROUP BY country ORDER BY count(*) DESC |
Who is the director of the movie Pinocchio? | SELECT director FROM director WHERE name = 'Pinocchio' |
Provide the facility type and license number of establishments with the lowest risk level but failed the inspection. | SELECT DISTINCT T1.facility_type, T1.license_no FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T1.risk_level = 1 AND T2.results = 'Fail' |
WHAT OPPONENT HAD A KICKOFF OF 2007-03-06, 20:45? | SELECT opponents FROM table_name_2 WHERE kick_off = "2007-03-06, 20:45" |
What is the name of the legislator with the ID of W000059? | SELECT first_name, last_name FROM historical WHERE bioguide_id = 'W000059' |
Great, what is the issue dates of all volumes of the artist "Gorgoroth" | SELECT T2.Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.Artist = "Gorgoroth" |
Which processors are supported with a PCI-express of x16: 1 slot x1: 4 slots and the nforce 550 model? | SELECT processors_supported FROM table_name_82 WHERE pci_express = "x16: 1 slot x1: 4 slots" AND model = "nforce 550" |
what is the minimum vote percent of elections? | SELECT min ( Vote_Percent ) FROM election |
What is Number Of Episodes, when Status is "2001 - 2003, 2005 - 2009"? | SELECT number_of_episodes FROM table_name_86 WHERE status = "2001 - 2003, 2005 - 2009" |
What are the names of perpetrators? | SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID |
How tall is contestant Alexandra Díaz Bello? | SELECT height FROM table_22447251_2 WHERE contestant = "Alexandra Díaz Bello" |
what are all the companies on the table | Do you mean the companies that customers work? | exactly | SELECT company FROM customers where company ! = 'NULL' |
How many championships are there when there are 6 points | SELECT series FROM table_26223231_1 WHERE points = "6" |
What are the names of all the players with an average of 15.89? | SELECT name FROM table_2482547_5 WHERE average = "15.89" |
What circuit had 16 rounds? | SELECT circuit FROM table_name_79 WHERE round = 16 |
Can you show me the name of the patient who stays in room 111? | SELECT T2.name FROM stay AS T1 JOIN patient AS T2 ON T1.Patient = T2.SSN JOIN Prescribes AS T3 ON T3.Patient = T2.SSN JOIN Medication AS T4 ON T3.Medication = T4.Code WHERE room = 111 |
What is the beat and location description of the case JB112212? | SELECT beat, location_description FROM Crime WHERE case_number = 'JB112212' |
how many people commentated where broadcaster is orf | SELECT COUNT(commentator) FROM table_184803_4 WHERE broadcaster = "ORF" |
what is the transaction id of lot id 11 | SELECT transaction_id FROM Transactions_Lots WHERE lot_id = 11 |
Excellent! Can you update this list to show many total classes were taken in Fall of 2008? | Do you mean how many total classes were taken in Fall of 2008? | Yes! That is what I meant! Sorry! How many total classes were taken in Fall of 2008? | SELECT count ( * ) FROM takes WHERE semester = 'Fall' and year = '2008' |
What is the average Regional Finals score when the record is 3-2 and there are more than 3 bids? | SELECT AVG(regional_finals) FROM table_name_3 WHERE record = "3-2" AND _number_of_bids > 3 |
Who is the driver of the Chevrolet engine that is sponsored by godaddy.com? | SELECT driver_s_ FROM table_2503102_1 WHERE engine = "Chevrolet" AND car_sponsor_s_ = "GoDaddy.com" |
Please list the bowling skills of all the players from Australia. | SELECT T2.Bowling_Skill FROM Player AS T1 INNER JOIN Bowling_Style AS T2 ON T1.Bowling_skill = T2.Bowling_Id INNER JOIN Country AS T3 ON T1.Country_Name = T3.Country_Id WHERE T3.Country_Name = 'Australia' GROUP BY T2.Bowling_Skill |
Which courses have at least five enrollments? | SELECT * FROM COURSE AS T1 JOIN ENROLLED_IN AS T2 ON T1.CID = T2.CID GROUP BY T2.CID HAVING COUNT ( * ) > = 5 |
Can you show me the most expensive wine made in the year 2006? | SELECT * FROM WINE WHERE year = 2006 order by price desc limit 1 |
What is the full name of the employee with the highest salary? | SELECT FirstName, LastName FROM Employees WHERE Salary = ( SELECT MAX(Salary) FROM Employees ) |
What was the profit before tax when the turnover was 431.06? | SELECT profit_before_tax__£m_ FROM table_2856898_1 WHERE turnover__£m_ = "431.06" |
Which wine uses Cabernet Franc grapes | SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Grape = "Cabernet Franc" |
What is the average grid of driver Christian Vietoris who has less than 12 laps? | SELECT AVG(grid) FROM table_name_79 WHERE driver = "christian vietoris" AND laps < 12 |
What opponent played on 1/13/1974? | SELECT opponent FROM table_name_6 WHERE date = "1/13/1974" |
What Rating has Viewers (m) of 2.73? | SELECT rating FROM table_name_96 WHERE viewers__m_ = 2.73 |
Who were the opponents in the final at Noida? | SELECT opponents_in_the_final FROM table_name_15 WHERE tournament = "noida" |
List all the title of the paper that Jianli Hua published. | SELECT T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Name = 'Jianli Hua' |
Name the least wins for 5 losses | SELECT MIN(wins) FROM table_18607260_6 WHERE losses = 5 |
Count the total number of tweet IDs in `en`. | SELECT COUNT(DISTINCT TweetID) FROM twitter WHERE Lang = 'en' |
Could you please show me the publishers with a book published in 1989? | SELECT publisher FROM book_club WHERE YEAR = 1989 |
The event that has a record of 1-0 is none of the above. | SELECT event FROM table_name_71 WHERE record = "1-0" |
Find the name and gender of the staff who has been assigned the job of Sales Person but never Clerical Staff. | SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = "Sales Person" EXCEPT SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = "Clerical Staff" |
Show ids for all transactions whose amounts are greater than the average. | SELECT transaction_id FROM Financial_transactions WHERE transaction_amount > (SELECT avg(transaction_amount) FROM Financial_transactions) |
Which state has 67% Republicans and a ratio of 24/12 of Republicans to Democrats? | SELECT state_ranked_in_partisan_order FROM table_name_28 WHERE percentage_republicans = "67%" AND republican__democratic = "24/12" |
Where in Chicago does the restaurant named "Old Timers Rest & Lounge" located? | SELECT address FROM establishment WHERE city = 'CHICAGO' AND dba_name = 'OLD TIMERS REST & LOUNGE' AND facility_type = 'Restaurant' |
Which election has a conservative first party, Rowland Smith as first member, and Sir Henry Wilmot, Bt as second member? | SELECT election FROM table_name_11 WHERE first_party = "conservative" AND first_member = "rowland smith" AND second_member = "sir henry wilmot, bt" |
Show all card type codes and the number of customers holding cards in each type. | SELECT card_type_code, COUNT(DISTINCT customer_id) FROM Customers_cards GROUP BY card_type_code |
Can you tell me the lowest Chapter that has the Pinyin of dehua, and the Articles smaller than 16? | SELECT MIN(chapter) FROM table_name_54 WHERE pinyin = "dehua" AND articles < 16 |
How many songs, on average, are sung by a female artist? | SELECT avg(T2.rating) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = "Female" |
What is the character of Tom Oliver? | SELECT Character FROM actor where Name = 'Tom Oliver' |
How many release dates are there for year of 1988 and additional rock band 3 features is none? | SELECT COUNT(release_date) FROM table_23981741_1 WHERE year = 1988 AND additional_rock_band_3_features = "None" |
What is the player id for Charles? | SELECT pID FROM Player WHERE pName = "Charles" |
What is the summary of the episode in which Emily Blunt is featured in? | SELECT T1.summary FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T2.person = 'Emily Blunt'; |
Which of the mill names contains the french word 'Moulin'? | SELECT name FROM mill WHERE name LIKE '%Moulin%' |
Who won the FIS Nordic World Ski Championships in 1972? | SELECT winner FROM table_name_4 WHERE fis_nordic_world_ski_championships = "1972" |
Which game was played at the Forum and led to a series result of 0-1? | SELECT game FROM table_name_85 WHERE location_attendance = "the forum" AND series = "0-1" |
What are the product names of Exotic Liquids? | SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Exotic Liquids' |
What is Original title, when Film title used in nomination is Train Without A Timetable? | SELECT original_title FROM table_name_35 WHERE film_title_used_in_nomination = "train without a timetable" |
Who is the visitor on May 9? | SELECT visitor FROM table_name_14 WHERE date = "may 9" |
Who were all candidate when incumbent was D. Wyatt Aiken? | SELECT candidates FROM table_1431467_4 WHERE incumbent = "D. Wyatt Aiken" |
What Date has a time of (seconds) 42.172? | SELECT date FROM table_name_73 WHERE time__seconds_ = 42.172 |
and for aaronto01? | You mean the birth city for the player with ID aaronto01? | yes | SELECT birth_city FROM player where player_id = "aaronto01" |
What is allergy type of a cat allergy? | SELECT allergytype FROM Allergy_type WHERE allergy = "Cat" |
Return the number of companies created by Andy. | SELECT count(*) FROM manufacturers WHERE founder = 'Andy' |
list the publication dates for all catalogs | SELECT date_of_publication FROM catalogs |
What is the average of English books among all books published by Carole Marsh Mysteries? | SELECT CAST(SUM(CASE WHEN T1.language_name = 'English' THEN 1 ELSE 0 END) AS REAL) / COUNT(*) FROM book_language AS T1 INNER JOIN book AS T2 ON T1.language_id = T2.language_id INNER JOIN publisher AS T3 ON T3.publisher_id = T2.publisher_id WHERE T3.publisher_name = 'Carole Marsh Mysteries' |
Which Rider has less than 18 laps, and a Grid of 24? | SELECT rider FROM table_name_73 WHERE laps < 18 AND grid = 24 |
What is the time of the swimmer in rank 40? | SELECT time FROM table_name_47 WHERE rank = 40 |
Can you tell me the sum of Draws that has the Against larger than 1106, and the Wins larger than 13? | SELECT SUM(draws) FROM table_name_44 WHERE against > 1106 AND wins > 13 |
How many high schoolers are there? | SELECT count(*) FROM Highschooler |
Which home team plays at victoria park? | SELECT home_team FROM table_name_40 WHERE venue = "victoria park" |
What is the skip that has a third of Anna Sloan in season 2012-13? | SELECT skip FROM table_name_55 WHERE third = "anna sloan" AND season = "2012-13" |
When tony kanaan is the driver what is the average speed miles per hour? | SELECT average_speed__mph_ FROM table_1771753_3 WHERE driver = "Tony Kanaan" |
Which theatre has the largest capacity? | SELECT * FROM cinema order by capacity desc limit 1 |
Find the first and last name of the faculty who is involved in the largest number of activities. | SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1 |
Find the name and budget of departments whose budgets are more than the average budget. | SELECT dept_name , budget FROM department WHERE budget > (SELECT avg(budget) FROM department) |
Find the states which do not have any employee in their record. | SELECT state_province_county FROM addresses WHERE address_id NOT IN (SELECT employee_address_id FROM Employees) |
How many players came from Los Angeles? | SELECT COUNT(name) FROM table_24055352_1 WHERE hometown = "Los Angeles" |
Show all product sizes. | SELECT DISTINCT product_size FROM Products |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.