sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Which catalog content has the smallest capacity? Return the catalog entry name. | SELECT catalog_entry_name FROM catalog_contents ORDER BY capacity ASC LIMIT 1 |
What is the score of the match at happy valley recreation ground pitch #2 with a 14:30 time? | SELECT score FROM table_name_93 WHERE time = "14:30" AND venue = "happy valley recreation ground pitch #2" |
Name the least transfers out when transfers is 21 | SELECT MIN(transfers_out) FROM table_17650725_1 WHERE total_transfers = 21 |
Which Melbourne has an Auckland of no, and a Gold Coast of no? | SELECT melbourne FROM table_name_14 WHERE auckland = "no" AND gold_coast = "no" |
Find the name of the teacher who teaches the largest number of students. | SELECT T2.firstname, T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom GROUP BY T2.firstname, T2.lastname ORDER BY COUNT(*) DESC LIMIT 1 |
What is the name of all tracks in the Rock genre? | SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock"; |
When was the release date for technology that has a Multi 1 of 10.5×? | SELECT release_date FROM table_name_72 WHERE multi_1 = "10.5×" |
what accelerators are not compatible with the browsers? | SELECT * FROM web_client_accelerator WHERE id NOT IN ( SELECT accelerator_id FROM accelerator_compatible_browser ) |
How many connections aux in using FIrewire? | SELECT COUNT(aux_in) FROM table_24384861_1 WHERE dock_connection = "FireWire" |
What is the station that is transmitted at 20 kw and has a frequency of 48 uhf? | SELECT television_station FROM table_1601792_4 WHERE transmitted = "20 kW" AND frequency = "48 UHF" |
What is the percentage of severe cases that are related to sexual assault? | SELECT CAST(SUM(CASE WHEN primary_description = 'CRIM SEXUAL ASSAULT' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM IUCR WHERE index_code = 'I' |
add a column for company id | SELECT count ( * ) , T1.company_id, T1.building_id FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T1.building_id |
Who wrote the episode with the production code 211? | SELECT written_by FROM table_27610775_1 WHERE prod_code = 211 |
What is the date that a ship sank in the South Atlantic? | SELECT date FROM table_name_59 WHERE where_sunk = "south atlantic" |
What are the names of players that have run scored less than 3? | SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Batsman_Scored AS T3 ON T2.Match_ID = T3.Match_ID WHERE T3.Runs_Scored < 3 GROUP BY T1.Player_Name |
What is the minimum and maximum number of bathrooms of all the apartments? | SELECT min(bathroom_count) , max(bathroom_count) FROM Apartments |
What actor plays Marie-Rose De Putter? | SELECT actor FROM table_name_73 WHERE character = "marie-rose de putter" |
When did customer with first name as Carole and last name as Bernhard became a customer? | SELECT date_became_customer FROM Customers WHERE first_name = "Carole" AND last_name = "Bernhard" |
Which E. coli has a human value of HNEIL1? | SELECT e_coli FROM table_name_78 WHERE human = "hneil1" |
What is indicator code of Rural population? | SELECT DISTINCT IndicatorCode FROM Indicators WHERE IndicatorName = 'Rural population' |
List the employees who have not showed up in any circulation history of documents. List the employee's name. | SELECT employee_name FROM Employees EXCEPT SELECT Employees.employee_name FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id |
Show first name, last name, age for all female students. Their sex is F. | SELECT Fname , Lname , Age FROM Student WHERE Sex = 'F' |
Give me the count for the students older than the average age. | select count ( fname ) from student where age > ( SELECT avg ( age ) FROM STUDENT ) |
What is its item id? | SELECT T1.i_id FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id ORDER BY avg ( T2.rating ) LIMIT 1 |
Find the description of the club "Pen and Paper Gaming". | SELECT clubdesc FROM club WHERE clubname = "Pen and Paper Gaming" |
Find all the male members of club "Hopkins Student Enterprises". Show the first name and last name. | 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 = "Hopkins Student Enterprises" AND t3.sex = "M" |
Who is the president of the club "Bootup Baltimore"? Give me the first and last name. | 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" |
How many line items were returned in 1998? | SELECT l_linenumber FROM lineitem WHERE STRFTIME('%Y', l_shipdate) < 1997 AND l_shipmode = 'TRUCK' |
How big was the crowd when Richmond was the away team? | SELECT crowd FROM table_name_28 WHERE away_team = "richmond" |
What kind of Modern equivalent has a Post-1009 province of gyeongsang -do, and a Administrative district of jinju -mok, and a Province of Silla of gangju? | SELECT modern_equivalent FROM table_name_88 WHERE post_1009_province = "gyeongsang -do" AND administrative_district = "jinju -mok" AND province_of_silla = "gangju" |
What was the number of Bitcoins verifiably burned until 2013/4/28? | SELECT T2.max_supply - T2.total_supply FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.date = '2013-04-28' AND T1.name = 'Bitcoin' |
Provide the name of artists who had no more than 100 downloads and are tagged "funk" in 1980. | SELECT T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'funk' AND T1.groupYear = 1980 AND T1.totalSnatched <= 100 |
Find the name of bank branches that provided some loans. | SELECT DISTINCT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id |
What is Ground, when Away Team is Sydney? | SELECT ground FROM table_name_73 WHERE away_team = "sydney" |
what is the prof high degree of department HIST | SELECT prof_high_degree from professor where DEPT_CODE = "HIST" |
Which players are from Indonesia? | SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Country_name = "Indonesia" |
How many people were in attendance on January 4, 2008? | SELECT SUM(attendance) FROM table_name_33 WHERE date = "january 4, 2008" |
What type of proposal is measure number 3? | SELECT type FROM table_256286_21 WHERE meas_num = 3 |
What is the Attendance with a Date that is november 25, 1965? | SELECT attendance FROM table_name_96 WHERE date = "november 25, 1965" |
Which Pick has a Round larger than 17, and a Name of gene stewart? | SELECT COUNT(pick) FROM table_name_46 WHERE round > 17 AND name = "gene stewart" |
Which record has 5:00 as the time, jess liaudin as the opponent for the location of england? | SELECT record FROM table_name_49 WHERE time = "5:00" AND opponent = "jess liaudin" AND location = "england" |
Show ids, customer ids, names for all accounts. | SELECT account_id , customer_id , account_name FROM Accounts |
What are the file sizes and formats for all songs with a resolution lower than 800? | SELECT DISTINCT T1.file_size , T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.resolution < 800 |
What is the opening time of the active businesses in Chandler that has a medium review count. | SELECT DISTINCT T2.opening_time FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T1.city LIKE 'Chandler' AND T1.active LIKE 'TRUE' AND T1.review_count LIKE 'Medium' |
Count the male actors born in USA that starred in Ghost. | SELECT COUNT(*) FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T1.Title = 'Ghost' AND T3.Gender = 'Male' AND T3.`Birth Country` = 'USA' |
Show the number of trains | SELECT count(*) FROM train |
Show the account name, id and the number of transactions for each account. | SELECT T2.account_name , T1.account_id , count(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id |
How many types in this table? | SELECT count ( distinct Type ) FROM ship |
Which opponent led to a 5-2 record? | SELECT opponent FROM table_24560733_1 WHERE record = "5-2" |
List the university ID of the university that scored 100 in 2011. | SELECT university_id FROM university_ranking_year WHERE score = 100 AND year = 2011 |
Find the number of items that did not receive any review. | SELECT count(*) FROM item WHERE i_id NOT IN (SELECT i_id FROM review) |
Which physicians are in charge of more than one patient? Give me their names. | SELECT T1.name FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid HAVING count(*) > 1 |
Which location has a rank of 147? | SELECT location FROM table_name_95 WHERE rank = 147 |
what is the lifespan when the imperial height is 7ft 8 in and the nationality is fiji? | SELECT lifespan FROM table_name_56 WHERE imperial = "7ft 8 in" AND nationality = "fiji" |
WHAT COUNTRY HAS THE HIGHEST BRONZE COUNT, MORE THAN 1 SILVER METAL, AND LESS THAN 1ST PLACE? | SELECT MAX(bronze) FROM table_name_46 WHERE silver > 1 AND rank > 1 |
What is Steven King's Salary and Job id? | select JOB_ID,SALARY from employees where FIRST_NAME = 'Steven' and LAST_NAME = 'King' |
What is the abbr for zug? | SELECT abbr FROM table_name_75 WHERE common_english = "zug" |
Give the gender of the user who made the highest klout tweet on Wednesdays. | SELECT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.Weekday = 'Wednesday' ORDER BY T1.Klout DESC LIMIT 1 |
List the number of episodes directed by linda mendoza. | SELECT COUNT(production_code) FROM table_25548213_1 WHERE directed_by = "Linda Mendoza" |
In 2010, how many single patients took Nitrofurantoin 5 mg/ML [Furadantin] to cure cystitis? | SELECT COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T1.marital = 'S' AND T2.REASONDESCRIPTION = 'Cystitis' AND T2.DESCRIPTION = 'Nitrofurantoin 5 MG/ML [Furadantin]' AND strftime('%Y', T2.START) = '2010' |
What date has uefa euro 2008 qualification as the competition? | SELECT date FROM table_name_55 WHERE competition = "uefa euro 2008 qualification" |
What is Tie no, when Date is "18 Nov 1989", and when Home Team is "Doncaster Rovers"? | SELECT tie_no FROM table_name_32 WHERE date = "18 nov 1989" AND home_team = "doncaster rovers" |
What's the lowest Points for the Team of San Martín De Tucumán, and a Played that's smaller than 38? | SELECT MIN(points) FROM table_name_84 WHERE team = "san martín de tucumán" AND played < 38 |
Calculate the total trading quantity of Abraham sold to Aaron Alexander. | SELECT SUM(T2.Quantity) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Employees AS T3 ON T2.SalesPersonID = T3.EmployeeID WHERE T2.SalesPersonID = 1 AND T1.FirstName = 'Aaron' AND T1.LastName = 'Alexander' AND T3.FirstName = 'Abraham' |
What was the claim ID for the earliest claim? | SELECT Claim_ID FROM Claims ORDER BY Date_Claim_Made ASC LIMIT 1 |
What Country's team is Rajasthan Royals at the 2008 Indian Premier League? | SELECT country FROM table_name_87 WHERE domestic_tournament = "2008 indian premier league" AND team = "rajasthan royals" |
Find the name of product that is produced by both companies Creative Labs and Sony. | SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Creative Labs' INTERSECT SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Sony' |
What is Opponents In The Final, when Score is 4-1 5-4 (7) 4-2? | SELECT opponents_in_the_final FROM table_name_84 WHERE score = "4-1 5-4 (7) 4-2" |
What are the name and results of the battles when the bulgarian commander is not 'Boril' | SELECT name, RESULT FROM battle WHERE bulgarian_commander <> 'Boril' |
What is the average Silver, when Gold is less than 0? | SELECT AVG(silver) FROM table_name_47 WHERE gold < 0 |
How many books under 300 pages has HarperCollins Publishers published? | SELECT COUNT(*) FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T2.publisher_name = 'HarperCollins Publishers' AND T1.num_pages < 300 |
What is the name of the owner of rock 97.7? | SELECT owner FROM table_name_38 WHERE branding = "rock 97.7" |
Which professional did not operate any treatment on dogs? List the professional's id, role and email. | SELECT professional_id , role_code , email_address FROM Professionals EXCEPT SELECT T1.professional_id , T1.role_code , T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id |
What are the document ids for the budget type code 'SF'? | SELECT document_id FROM Documents_with_expenses WHERE budget_type_code = 'SF' |
Find the name of captains whose rank are either Midshipman or Lieutenant. | SELECT name FROM captain WHERE rank = 'Midshipman' OR rank = 'Lieutenant' |
What country had a paste publication in 2009? | SELECT country FROM table_name_9 WHERE year = 2009 AND publication = "paste" |
What is the Senators' division record? | SELECT division_record FROM table_name_39 WHERE team = "senators" |
When 24th is the final placing how many wins are there? | SELECT COUNT(wins) FROM table_26815674_1 WHERE final_placing = "24th" |
What is the pole position of the Belgian Grand Prix? | SELECT pole_position FROM table_name_27 WHERE grand_prix = "belgian grand prix" |
Who has less than 3 lanes for France? | SELECT name FROM table_name_88 WHERE nationality = "france" AND lane < 3 |
What is the engine for the bmw motorsport entrant with 123 points before 2004? | SELECT engine FROM table_name_57 WHERE year < 2004 AND entrant = "bmw motorsport" AND points = 123 |
Calculate the average rent amount paid by the customer with customer id 15. | SELECT AVG(amount) FROM payment WHERE customer_id = 15 |
What are their names? | select lname,fname from student where stuid in ( select stuid from member_of_club group by stuid having count ( * ) = 1 ) |
Round 1 is in what circuit? | SELECT circuit FROM table_26267607_2 WHERE round = "1" |
Who won the womens singles when Marc Zwiebler won the men's singles? | SELECT womens_singles FROM table_12121208_1 WHERE mens_singles = "Marc Zwiebler" |
What is the abbreviation of the airilne has the fewest flights and what country is it in? | SELECT T1.Abbreviation , T1.Country FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) LIMIT 1 |
What was the engine class that was built on 1906-08? | SELECT class FROM table_25695027_1 WHERE years_built = "1906-08" |
Name the number of high rebounds for united center 19,335 | SELECT COUNT(high_rebounds) FROM table_22669044_9 WHERE location_attendance = "United Center 19,335" |
What was the record when chicago was the home team? | SELECT record FROM table_name_63 WHERE home = "chicago" |
How many work orders with quantities ranging from 100 to 250 have a reorder point of no more than 375? | SELECT COUNT(T1.TransactionID) FROM TransactionHistory AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Quantity BETWEEN 100 AND 250 AND T2.ReorderPoint <= 375 |
Who directed the film with the title three summer days? | SELECT director FROM table_22265716_1 WHERE film_title_used_in_nomination = "Three Summer Days" |
Can you give me the apartment ids for the same list? | SELECT T1.apt_id FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = "Female" |
What is the cmi cross reference id that is related to at least one council tax entry? List the cross reference id and source system code. | SELECT T1.cmi_cross_ref_id , T1.source_system_code FROM CMI_Cross_References AS T1 JOIN Council_Tax AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id GROUP BY T1.cmi_cross_ref_id HAVING count(*) >= 1 |
What is the defending forces when Al-Murassas shows for name? | SELECT defending_forces FROM table_name_21 WHERE name = "al-murassas" |
Name the opponent for may 12 | SELECT opponent FROM table_name_73 WHERE date = "may 12" |
Show the membership level with most number of members. | SELECT LEVEL FROM member GROUP BY LEVEL ORDER BY count(*) DESC LIMIT 1 |
What is the game with the golden state warriors? | SELECT game FROM table_name_37 WHERE team = "golden state warriors" |
Which Player has a School/Club Team of Illinois? | SELECT player FROM table_name_5 WHERE school_club_team = "illinois" |
What is the rank of the time of 6:30.53? | SELECT COUNT(rank) FROM table_name_89 WHERE time = "6:30.53" |
What is the average Episode Number, when Original Airdate is March 21, 2010, and when Season is less than 3? | SELECT AVG(episode) AS number FROM table_name_96 WHERE original_airdate = "march 21, 2010" AND season < 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.