sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
How many episodes by different writers were seen by 3.24 million people in the US? | SELECT COUNT(written_by) FROM table_18268826_1 WHERE us_viewers__million_ = "3.24" |
Show the name and prominence of the mountains whose picture is not taken by a lens of brand 'Sigma'. | SELECT name , prominence FROM mountain EXCEPT SELECT T1.name , T1.prominence FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T3.brand = 'Sigma' |
What was the goal accuracy % when the total disposals are 481? | SELECT goal_accuracy__percentage FROM table_2814720_1 WHERE total_disposals = 481 |
What is the pick # of the player with a PI GP less than 0? | SELECT SUM(pick__number) FROM table_name_16 WHERE pl_gp < 0 |
What is the average GNP and total population in all nations whose government is US territory? | SELECT avg(GNP) , sum(population) FROM country WHERE GovernmentForm = "US Territory" |
Show the ids of the students who don't participate in any activity. | SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in |
Which physicians have never taken any appointment? Find their names. | SELECT name FROM physician EXCEPT SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID |
Okay, which cities have not hosted? | SELECT city FROM city where City_ID not in ( select Host_City from hosting_city ) |
Find the name of the project for which a scientist whose name contains ‘Smith’ is assigned to. | SELECT T2.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name LIKE '%Smith%' |
Which Rank has a Total larger than 30, and a Bronze of 14? | SELECT AVG(rank) FROM table_name_61 WHERE total > 30 AND bronze = 14 |
List date of the review of the Eagle Capital from Indianapolis, Indiana. | SELECT T2.Date FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2.district_id WHERE T2.Product = 'Eagle Capital' AND T1.city = 'Indianapolis' AND T1.state_abbrev = 'IN' |
During the 2013 debut, what is the w-I(total) number? | SELECT COUNT(w_l__total_) FROM table_11233358_2 WHERE debut = 2013 |
What was the Attendance in Week 10? | SELECT attendance FROM table_name_59 WHERE week = 10 |
Indicate the title of all the films rated as 'Adults Only'. | SELECT title FROM film WHERE rating = 'NC-17' |
Find the names of reviewers who had given higher than 3 stars ratings. | SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars > 3 |
What is the Higgins with a Davis that is 9%? | SELECT higgins FROM table_name_90 WHERE davis = "9%" |
What time contains the owner of maine chance farm? | SELECT time FROM table_name_55 WHERE owner = "maine chance farm" |
What is the office phone number of the location at which Sandy Adams works? | SELECT T2.officephone FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID WHERE T1.lastname = 'Adams' AND T1.firstname = 'Sandy' |
Give the number of female employees. | SELECT COUNT(*) FROM employee WHERE gender = 'F' |
Who is the author of Unicorn Mountain? | SELECT Author_or_Editor FROM book_club where Book_Title = 'Unicorn Mountain' |
Show the times used by climbers to climb mountains in Country Uganda. | SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T2.Country = "Uganda" |
What was the record at the game with a score of 21-16? | SELECT record FROM table_name_77 WHERE score = "21-16" |
What is the storm name and max speed which affected the greatest number of regions? | SELECT T1.name , T1.max_speed FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id ORDER BY count(*) DESC LIMIT 1; |
List the carriers of devices that have no devices in stock. | SELECT Carrier FROM device WHERE Device_ID NOT IN (SELECT Device_ID FROM stock) |
Who directed the episode that had 6.04 million viewers? | SELECT director FROM table_12976038_1 WHERE viewers__in_millions_ = "6.04" |
Name the high assists for l 93–103 (ot) | SELECT high_assists FROM table_17288861_9 WHERE score = "L 93–103 (OT)" |
How much Avg/G has a Loss larger than 117, and a Name of opponents, and a Gain smaller than 2444? | SELECT COUNT(avg_g) FROM table_name_41 WHERE loss > 117 AND name = "opponents" AND gain < 2444 |
Which driver earned 32 points from the Andretti Green team? | SELECT driver FROM table_name_91 WHERE team = "andretti green" AND points = "32" |
Which school players have a number of 255 | SELECT college_junior_club_team FROM table_2781227_10 WHERE pick = 255 |
Display the employee number and job id for all employees whose salary is smaller than any salary of those employees whose job title is MK_MAN | SELECT employee_id , job_id FROM employees WHERE salary < ( SELECT min ( salary ) FROM employees WHERE job_id = 'MK_MAN' ) |
Please list the name of crew that were born before 1970. | SELECT name FROM Person WHERE SUBSTR(birthdate, 1, 4) < '1970'; |
Who was the opponent on april 26, 2003? | SELECT opponent FROM table_name_25 WHERE date = "april 26, 2003" |
When did event number 2 happen and how many users were active? | SELECT COUNT(T1.app_id) AS num FROM app_events AS T1 INNER JOIN events AS T2 ON T1.event_id = T2.event_id WHERE T1.event_id = 2 AND T1.is_active = 1 GROUP BY T2.timestamp |
Give the average quantity of stocks. | SELECT avg(Quantity) FROM stock |
Indicate the name of the companies that have freighted products for a value greater than 2,000,000. | SELECT T1.CompanyName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Freight > 2000000 |
What is the total interview score a contestant from Indiana with an average smaller than 8.3 has? | SELECT COUNT(interview) FROM table_name_36 WHERE state = "indiana" AND average < 8.3 |
What is the average number of terms for a current female legislator? | SELECT CAST(COUNT(T2.bioguide) AS REAL) / COUNT(DISTINCT T1.bioguide_id) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.gender_bio = 'F' |
What is the first name of the professor who is teaching CIS-220 and QM-261? | SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'CIS-220' INTERSECT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'QM-261' |
Among all penalty minutes picked up by Ak Bars Kazan in the 1999-2000 season, identify the percentage picked up by Yevgeni Muratov. | SELECT CAST(SUM(CASE WHEN T2.PlayerName = 'Yevgeni Muratov' THEN T1.PIM ELSE 0 END) AS REAL) * 100 / SUM(T1.PIM) FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '1999-2000' AND T1.TEAM = 'Ak Bars Kazan' |
On what date is Hawthorn the home team? | SELECT date FROM table_name_10 WHERE home_team = "hawthorn" |
what is the outcome code? | Whose outcome code do you want? | for `deleniti | SELECT T2.outcome_code FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id where t1.project_details = "deleniti" |
What is the percentage of under $500 thefts among all cases that happened in West Englewood? | SELECT CAST(SUM(CASE WHEN T2.secondary_description = '$500 AND UNDER' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.case_number) FROM Crime AS T1 INNER JOIN IUCR AS T2 ON T1.iucr_no = T2.iucr_no INNER JOIN Community_Area AS T3 ON T1.community_area_no = T3.community_area_no WHERE T2.primary_description = 'THEFT' AND T3.community_area_name = 'West Englewood' |
Show titles of songs and names of singers. | SELECT T2.Title , T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID |
What are the customer ids of all customers who who have the customer type code Good Credit Rating? | SELECT customer_id FROM customers where customer_type_code = "Good Credit Rating" |
What is the price of vehicle id 2 ? | SELECT price FROM lessons WHERE vehicle_id = "2" |
State all the Facebook ID for current legislators under the democrat party. | SELECT T2.facebook_id FROM `current-terms` AS T1 INNER JOIN `social-media` AS T2 ON T1.bioguide = T2.bioguide WHERE T1.party = 'Democrat' GROUP BY T2.facebook_id |
What was the record as of September 1? | SELECT record FROM table_name_72 WHERE date = "september 1" |
Find the names of programs that are never broadcasted in the morning. | SELECT name FROM program EXCEPT SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = "Morning" |
What is the amount claimed for this customer? | SELECT t1.amount_claimed FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_piad = ( SELECT min ( amount_piad ) FROM claim_headers ) |
What is the status(es) of the place with an area of 304.06 km2? | SELECT status FROM table_176521_2 WHERE area_km_2 = "304.06" |
How many airports are in the United States? | SELECT count ( * ) from airport where country = "United States" |
Who was the runner-up on September 11? | SELECT runner_up FROM table_21808535_1 WHERE date = "September 11" |
Name the number of giants points for opponents being 31 | SELECT COUNT(giants_points) FROM table_16661199_2 WHERE opponents = 31 |
Name the lowest Seats 2010 which has Seats 2005 smaller than 9, and a Governorate of al muthanna governorate, and an In/de-creased by larger than 2? | SELECT MIN(seats_2010) FROM table_name_46 WHERE seats_2005 < 9 AND governorate = "al muthanna governorate" AND in_de_creased_by > 2 |
What is the lowest grade of students who do not have any friends? | SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) |
What is the home team's score when south melbourne is away? | SELECT home_team AS score FROM table_name_23 WHERE away_team = "south melbourne" |
On what day is geelong the home team? | SELECT date FROM table_name_37 WHERE home_team = "geelong" |
What is the nomination title used for the original film, Monsieur Hawarden? | SELECT film_title_used_in_nomination FROM table_name_18 WHERE original_title = "monsieur hawarden" |
What's the losing bonus count for the club with 9 won games? | SELECT losing_bonus FROM table_14070062_3 WHERE won = "9" |
Hi, could you please let me know the name of instructors in Comp. Sci. department whose salary is higher than 80000? | SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.' AND salary > 80000 |
Which game had 8 bronze and 4 gold? | SELECT games FROM table_name_61 WHERE bronze = "8" AND gold = "4" |
What was the date of the game against Oakland Raiders? | SELECT date FROM table_name_86 WHERE opponent = "oakland raiders" |
What is the highest number played with a goal difference less than -27? | SELECT MAX(played) FROM table_name_57 WHERE goal_difference < -27 |
What was the total for the golfer who had a To par of +10 and year won of 1971? | SELECT SUM(total) FROM table_name_9 WHERE to_par = "+10" AND year_s__won = "1971" |
What is the Place of the Player with a To par of –8 and a Score of 67-74-67=208? | SELECT place FROM table_name_83 WHERE to_par = "–8" AND score = 67 - 74 - 67 = 208 |
What is the Winning Score of the Tournament with Jack Nicklaus as Runner(s)-up? | SELECT winning_score FROM table_name_15 WHERE runner_s__up = "jack nicklaus" |
What is the most used instrument? | SELECT instrument FROM instruments GROUP BY instrument ORDER BY COUNT(*) DESC LIMIT 1 |
How many different L2 cache numbers are there for the 7130M model? | SELECT COUNT(l2_cache__mb_) FROM table_269920_3 WHERE model = "7130M" |
What is the name for the constituency at number 48? | SELECT name FROM table_name_38 WHERE constituency_number = "48" |
What is the home team's score when richmond is away? | SELECT home_team AS score FROM table_name_87 WHERE away_team = "richmond" |
what is the location/attendance when the record is 9-2? | SELECT location_attendance FROM table_name_23 WHERE record = "9-2" |
Show the outcome code of mailshots along with the number of mailshots in each outcome code. | SELECT outcome_code, COUNT(*) FROM mailshot_customers GROUP BY outcome_code |
What player was drafted to the Detroit Red Wings? | SELECT player FROM table_1965650_7 WHERE nhl_team = "Detroit Red Wings" |
What is the Prince Devitt when Block A is Yamato? | SELECT prince_devitt FROM table_name_49 WHERE block_a = "yamato" |
What is Honda's highest grid with a time of +1:38.407? | SELECT MAX(grid) FROM table_name_61 WHERE manufacturer = "honda" AND time = "+1:38.407" |
Which Rank has a Losing Semi- finalist larger than 1, and a Winner smaller than 5? | SELECT rank FROM table_name_79 WHERE losing_semi__finalist > 1 AND winner < 5 |
What was the average attendance on October 12? | SELECT AVG(attendance) FROM table_name_40 WHERE date = "october 12" |
Show me the routes details | do you mean the routes details of John F Kennedy International Airport? | Yes | SELECT * FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.name = 'John F Kennedy International Airport' |
Who was the away team when Manchester United played at home on 10 February 1951? | SELECT away_team FROM table_name_91 WHERE date = "10 february 1951" AND home_team = "manchester united" |
What was the score of tie number 15? | SELECT score FROM table_name_6 WHERE tie_no = "15" |
Give me the name and description of the document type code RV. | SELECT document_type_name , document_type_description FROM Ref_document_types WHERE document_type_code = "RV" |
Which location had a round of 3, and an Opponent of matt horwich? | SELECT location FROM table_name_9 WHERE round < 3 AND opponent = "matt horwich" |
Which district elected incumbent Earle Cabell? | SELECT district FROM table_1341718_44 WHERE incumbent = "Earle Cabell" |
Count the number of clubs located at "HHH". | SELECT count(*) FROM club WHERE clublocation = "HHH" |
Who was the winning team before 1956 on October 21? | SELECT winner FROM table_name_43 WHERE year < 1956 AND date = "october 21" |
What are the issue dates of volumes associated with 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" |
List the title of the books purchased by the customer named Zia Roizin. | SELECT T1.title FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id INNER JOIN cust_order AS T3 ON T3.order_id = T2.order_id INNER JOIN customer AS T4 ON T4.customer_id = T3.customer_id WHERE T4.first_name = 'Zia' AND T4.last_name = 'Roizin' |
What club team was founded before 2011 and plays at the champion window field? | SELECT club FROM table_name_27 WHERE founded < 2011 AND venue = "champion window field" |
What are the first and last names of all customers who lived in Lockmanfurt? | SELECT T1.first_name , T1.last_name FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = "Lockmanfurt"; |
Name the lowest Time of jamaica with a Lane larger than 4 and a Rank smaller than 1? | SELECT MIN(time) FROM table_name_66 WHERE nationality = "jamaica" AND lane > 4 AND rank < 1 |
What is the traditional form for 宁陵县? | SELECT traditional FROM table_2135222_2 WHERE simplified = "宁陵县" |
What type has 5 as the quantity? | SELECT type FROM table_name_26 WHERE quantity = 5 |
Name the date when bye was opponent | SELECT date FROM table_name_15 WHERE opponent = "bye" |
Who was the opponent team on September 30, 1990? | SELECT opponent FROM table_name_23 WHERE date = "september 30, 1990" |
Show different tourist attractions' names, ids, and the corresponding number of visits. | SELECT T1.Name, T2.Tourist_Attraction_ID, COUNT(*) FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID |
Count the active businesses that has an attribute of caters with low review count. | SELECT COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.business_id INNER JOIN Attributes AS T3 ON T2.attribute_id = T3.attribute_id WHERE T3.attribute_name LIKE 'Caters' AND T1.review_count LIKE 'Low' AND T1.active LIKE 'TRUE' |
Who is the opponent when there is a win in round greater than 1 and the record is 42-27-10? | SELECT opponent FROM table_name_23 WHERE res = "win" AND round > 1 AND record = "42-27-10" |
What season did School/Club Team, East have an Acquisition via of trade? | SELECT season FROM table_name_19 WHERE acquisition_via = "trade" AND school_club_team = "east" |
What is the area of 罗山县? | SELECT area FROM table_2847477_2 WHERE simplified = "罗山县" |
What ranks do we have for faculty? | SELECT DISTINCT rank FROM Faculty |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.