sentence
stringlengths
3
347
sql
stringlengths
18
804
From when did Rodrick Heaney became a customer?
SELECT T1.active_from_date FROM Customer_Contact_Channels AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_name = "Rodrick Heaney"
What is the sum of 1891(s), when 1872 is less than 685, and when 1881 is less than 348?
SELECT SUM(1891) FROM table_name_63 WHERE 1872 < 685 AND 1881 < 348
List down the dba name of restaurants that were inspected due to license.
SELECT T1.dba_name FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T2.inspection_type = 'License'
What is the sex of professor | I am sorry. Which professor are you referring to? | Rank profeesor
SELECT Sex FROM Faculty WHERE Rank = "Professor"
Name the cardinal points for 19-4 record
SELECT MIN(cardinal_points) FROM table_23192661_3 WHERE record = "19-4"
What are the course names for courses taught on MTW?
SELECT CName FROM COURSE WHERE Days = "MTW"
Among the chapters in "As You Like It", how many chapters have a paragraph number of no more than 50?
SELECT COUNT(T3.chapter_id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id WHERE T1.Title = 'As You Like It' AND T3.ParagraphNum < 50
What is the username of the current official Facebook presence of the oldest current legislator?
SELECT T2.facebook FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id ORDER BY T1.birthday_bio LIMIT 1
Out of these accelerators which are compatible with browsers that have a market share higher than 25.
SELECT DISTINCT T2.name from accelerator_compatible_browser as T1 join Web_client_accelerator as T2 on T1.accelerator_id = T2.id join browser as T3 on T3.id = T1.browser_id where T1.compatible_since_year > = 1996 and T3.market_share > 25
Please show the most common reigns of wrestlers.
SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1
What is the alternate of the nation with Erkki Lill as the skip?
SELECT alternate FROM table_name_55 WHERE skip = "erkki lill"
What is the maximum number of times that a course shows up in different transcripts and what is that course's enrollment id?
SELECT count(*) , student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1
What round does Duncan Tappy drive in?
SELECT MAX(sf_round) FROM table_23293785_3 WHERE driver = "Duncan Tappy"
What capital has a population of 596268?
SELECT capital FROM table_1404414_2 WHERE population_census_2009 = 596268
How many episodes are there for the three darts challenge with Sharon Osbourne?
SELECT MAX(episode_number) FROM table_26733129_1 WHERE three_darts_challenge = "Sharon Osbourne"
What format name has dv as video coding and 4:1:1 as the color sampling?
SELECT format_name FROM table_name_44 WHERE video_coding = "dv" AND color_sampling = "4:1:1"
Which address do not have any member with the black membership card?
SELECT address FROM member EXCEPT SELECT address FROM member WHERE Membership_card = 'Black'
Find the id and local authority of the station with has the highest average high temperature.
SELECT t2.id , t2.local_authority FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id GROUP BY t1.station_id ORDER BY avg(high_temperature) DESC LIMIT 1
Who wrote the episode that aired on September 26, 2010?
SELECT written_by FROM table_27169029_1 WHERE original_air_date = "September 26, 2010"
How many chapters are there in "Midsummer Night's Dream"?
SELECT COUNT(T2.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'Midsummer Night''s Dream'
List the living players who have two positions. State their given name the position they play.
SELECT firstName, lastName, pos FROM Master WHERE deathYear IS NULL AND pos LIKE '%/%'
What is the name and category code of the product with the highest price?
SELECT product_name , product_category_code FROM products ORDER BY product_price DESC LIMIT 1
What is the average number of wins for events larger than 28?
SELECT AVG(wins) FROM table_name_22 WHERE events > 28
How many figures are given for McCain's % in Davidson county?
SELECT COUNT(mccain_percentage) FROM table_20799905_1 WHERE county = "DAVIDSON"
What years did the person coach who had less than 82 wins and more than 24 losses?
SELECT years FROM table_name_99 WHERE wins < 82 AND losses > 24
What are the first names of customers who have not rented any films after '2005-08-23 02:06:01'?
SELECT first_name FROM customer WHERE customer_id NOT IN( SELECT customer_id FROM rental WHERE rental_date > '2005-08-23 02:06:01' )
What are the id and details of the customers who have at least 3 events?
SELECT T1.customer_id , T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 3
From 1/3/97 to 8/10/97, how many orders were shipped via Federal Shipping?
SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'Federal Shipping' AND T1.ShippedDate BETWEEN '1997-03-01 00:00:00' AND '1997-10-08 23:59:59'
Which 3 players won the most player awards? List their full name and id.
SELECT T1.name_first , T1.name_last , T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY count(*) DESC LIMIT 3;
What services were in the area of operation Wadi Borjuj?
SELECT services FROM table_name_2 WHERE area_of_operation = "wadi borjuj"
How many faculty lines are there in the university that conferred the most number of degrees in year 2002?
SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2002 ORDER BY t3.degrees DESC LIMIT 1
Show the transaction type code that occurs the fewest times.
SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) ASC LIMIT 1
What are the stations in Tarzana?
SELECT stations FROM table_2093995_1 WHERE city__neighborhood = "Tarzana"
State the highest profit made by Anna Chung's orders in the Central Superstore.
SELECT MAX(T2.Profit) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Customer Name` = 'Anna Chung'
Find the number of the products that have their color described as "red" and have a characteristic named "slow".
SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = "red" AND t3.characteristic_name = "slow"
Which formula has thial as a chemical class?
SELECT formula FROM table_name_7 WHERE chemical_class = "thial"
What is the average body mass index for patients with higher total cholesterol?
SELECT SUM(T1.VALUE) / COUNT(T1.PATIENT) FROM observations AS T1 INNER JOIN ( SELECT DISTINCT PATIENT FROM observations WHERE DESCRIPTION = 'Total Cholesterol' AND VALUE > 200 ) AS T2 ON T1.PATIENT = T2.PATIENT WHERE T1.DESCRIPTION = 'Body Mass Index'
Show the top 3 most common colleges of players in match seasons.
SELECT College FROM match_season GROUP BY College ORDER BY count(*) DESC LIMIT 3
What was the win loss record the lady who appeard in 1969?
SELECT win_loss FROM table_25820584_7 WHERE year_s_ = "1969"
What is the number and name where the date is earlier than 1905?
SELECT number_ & _name FROM table_name_37 WHERE date < 1905
How many percent of orders in 2020 used international shipping?
SELECT CAST(SUM(CASE WHEN T2.method_name = 'International' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM cust_order AS T1 INNER JOIN shipping_method AS T2 ON T1.shipping_method_id = T2.method_id WHERE STRFTIME('%Y', T1.order_date) = '2020'
Please list two people who are the nominees for the "Outstanding Voice-Over Performance" award for season 20.
SELECT person FROM Award WHERE result = 'Nominee' AND award = 'Outstanding Voice-Over Performance' AND episode_id LIKE 'S20%' LIMIT 2;
Find the name, checking balance and saving balance of all accounts in the bank.
SELECT T2.balance, T3.balance, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid
what is the date of week 7
SELECT date FROM table_name_92 WHERE week = 7
What are the birth date and birth place of the body builder with the highest total points?
SELECT T2.Birth_Date , T2.Birth_Place FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC LIMIT 1
What is the lowest stage when the yellow jersey is Ronan Pensec?
SELECT MIN(stage) FROM table_275506_1 WHERE yellow_jersey = "Ronan Pensec"
Which station is from China and has a frequency of 684khz?
SELECT station FROM table_name_79 WHERE country_of_origin = "china" AND frequency = "684khz"
What player went to Ohio State College?
SELECT player FROM table_10812938_5 WHERE college = "Ohio State"
What is the namesake of the feature found at 189.5w longitude?
SELECT namesake FROM table_16768245_2 WHERE longitude = "189.5W"
How many matches have 7 points of winning margin?
SELECT COUNT(Match_Id) FROM Match WHERE win_margin = 7
What is the acceleration of the most expensive car?
SELECT T1.acceleration FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T2.price DESC LIMIT 1
What are the distinct id and type of the thing that has the status 'Close' or has a status record before the date '2017-06-19 02:59:21'
SELECT DISTINCT T2.thing_id, T2.Type_of_Thing_Code FROM Timed_Status_of_Things AS T1 JOIN Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.Status_of_Thing_Code = 'Close' OR T1.Date_and_Date < '2017-06-19 02:59:21'
What pick number was the player that was picked by Edmonton?
SELECT pick__number FROM table_28059992_5 WHERE cfl_team = "Edmonton"
Show the ids of all employees who have authorized destruction.
SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
What's the Slovene word for Thursday?
SELECT thursday_fourth_day FROM table_1277350_5 WHERE day__see_irregularities__ = "Slovene"
Which driver retired from a collision after 41 laps?
SELECT driver FROM table_name_54 WHERE time_retired = "collision" AND laps = "41"
What are the apartment number and the room count of each apartment?
SELECT apt_number , room_count FROM Apartments
Can you show me the names of the five parties?
SELECT party_name FROM party
how many song_name in the song table
SELECT count ( * ) FROM song
Who are the nominees who have been nominated more than two times?
SELECT Nominee FROM musical GROUP BY Nominee HAVING COUNT(*) > 2
How many male users are in the age group of M32-38?
SELECT COUNT(gender) FROM gender_age WHERE gender = 'M' AND `group` = 'M32-38'
On what date did episode 2 air?
SELECT original_air_date FROM table_2343740_1 WHERE episode_number = 2
What are the total number of students enrolled in ACCT-211?
SELECT count(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code WHERE T1.crs_code = 'ACCT-211'
what is the mission when the location is brasilia?
SELECT mission FROM table_name_18 WHERE location = "brasilia"
What is the rank for the player with events greater than 23 and prize money in excess of $823,783?
SELECT COUNT(rank) FROM table_name_33 WHERE events > 23 AND prize_money__$__ > 823 OFFSET 783
Find the names of the products with length smaller than 3 or height greater than 5.
SELECT catalog_entry_name FROM catalog_contents WHERE LENGTH < 3 OR width > 5
Which artist was 2003?
SELECT artist FROM table_name_32 WHERE year = 2003
Find the titles of albums that contain tracks of both the Reggae and Rock genres.
SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Reggae' INTERSECT SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Rock'
What is the most common hometown of gymnasts?
SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown ORDER BY COUNT(*) DESC LIMIT 1
What was the crowd size for the game at Footscray?
SELECT COUNT(crowd) FROM table_name_2 WHERE away_team = "footscray"
what is the lowest viewers (m) when the share is more than 13?
SELECT MIN(viewers__m_) FROM table_name_69 WHERE share > 13
Among the wikipedia pages on Catalan with more than 300 different words, how many of them have a revision ID of over 28330000?
SELECT COUNT(lid) FROM pages WHERE lid = 1 AND words > 300 AND revision > 28330000
Show the studios that have produced films with director "Nicholas Meyer" and "Walter Hill".
SELECT Studio FROM film WHERE Director = "Nicholas Meyer" INTERSECT SELECT Studio FROM film WHERE Director = "Walter Hill"
What is the founded year of the non public school that was founded most recently?
SELECT founded FROM university WHERE affiliation != 'Public' ORDER BY founded DESC LIMIT 1
Which Railway has a Location of shildon, and an ObjectNumber of 1975-7022?
SELECT railway FROM table_name_58 WHERE location = "shildon" AND objectnumber = "1975-7022"
List the names of the employees who authorized the destruction of documents and the employees who destroyed the corresponding documents.
SELECT T2.employee_name , T3.employee_name FROM Documents_to_be_destroyed AS T1 JOIN Employees AS T2 ON T1.Destruction_Authorised_by_Employee_ID = T2.employee_id JOIN Employees AS T3 ON T1.Destroyed_by_Employee_ID = T3.employee_id;
can you give me the project ID? | Sorry, what would you like the project id for? | the project that had the highest number of outcomes
SELECT T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY count ( * ) DESC LIMIT 1
What was the manner of departure of Nicolae Manea?
SELECT manner_of_departure FROM table_17115950_2 WHERE outgoing_manager = "Nicolae Manea"
What are the ids of all students who have advisor number 1121?
SELECT StuID FROM Student WHERE Advisor = 1121
What is the average round of the s position player from the college of Mississippi and has an overall less than 214?
SELECT AVG(round) FROM table_name_79 WHERE position = "s" AND college = "mississippi" AND overall < 214
What are the number of rooms for each bed type?
SELECT bedType , count(*) FROM Rooms GROUP BY bedType;
Who is the player from the United States with a total less than 293 and won in 1984?
SELECT player FROM table_name_74 WHERE country = "united states" AND total < 293 AND year_s__won = "1984"
How many times was Mike McIntyre elected?
SELECT COUNT(results) FROM table_1805191_34 WHERE incumbent = "Mike McIntyre"
What are the state and country of all the cities that have post codes starting with 4.\
SELECT state_province_county , country FROM addresses WHERE zip_postcode LIKE "4%"
What is the hashed password of David Bradley?
SELECT T2.PasswordHash FROM Person AS T1 INNER JOIN Password AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.FirstName = 'David' AND T1.LastName = 'Bradley'
What is the date with geelong as Away team?
SELECT date FROM table_name_63 WHERE away_team = "geelong"
Where is Subway located?
SELECT Address FROM Restaurant where ResName = 'Subway'
What was the result when the new england patriots played?
SELECT result FROM table_name_33 WHERE opponent = "new england patriots"
what type over school is Clemson?
SELECT school_type FROM table_28744929_1 WHERE institution = "Clemson"
What is every date successor seated for the Virginia 11th District?
SELECT date_successor_seated FROM table_225199_4 WHERE district = "Virginia 11th"
How much Rank has Points larger than 282.5?
SELECT COUNT(rank) FROM table_name_11 WHERE points > 282.5
That was quick, thank you again. Then could you please tell me the department name of instructor Wieland?
SELECT dept_name FROM instructor where name = "Wieland"
Which owner has the time of 2:02.20 and the year of 1957?
SELECT owner FROM table_name_86 WHERE time = "2:02.20" AND year = "1957"
What is the Location for the jiu-jitsu vs martial arts?
SELECT location FROM table_name_36 WHERE event = "jiu-jitsu vs martial arts"
What Podiums listing has a World Rally Championship series entry?
SELECT podiums FROM table_name_74 WHERE series = "world rally championship"
Name the lowest average for interview more than 9.57 and delaware and evening gown more than 9.77
SELECT MIN(average) FROM table_name_42 WHERE interview > 9.57 AND country = "delaware" AND evening_gown > 9.77
How much did the Hydra team from Bronx, New York raise?
SELECT raised FROM table_name_35 WHERE original_team = "hydra" AND hometown = "bronx, new york"
how many faculty lines are there in the university that conferred the least number of degrees in year 2001?
SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2001 ORDER BY t3.degrees LIMIT 1
What is Builder, when Date is 1925?
SELECT builder FROM table_name_21 WHERE date = "1925"
What was the outcome of the match opponents in the final of Marius Călugăru Ciprian Petre Porumb?
SELECT outcome FROM table_name_38 WHERE opponents_in_the_final = "marius călugăru ciprian petre porumb"