sentence
stringlengths
3
347
sql
stringlengths
18
804
Report the distinct advisors who have more than 2 students.
SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING count(*) > 2
What are the names of countries that speak more than 2 languages, as well as how many languages they speak?
SELECT COUNT(T2.Language) , T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name HAVING COUNT(*) > 2
display the emails of the employees who have a commission percentage | Did you mean the employees who have commission percentage more than 0? | yes
SELECT email FROM employees WHERE commission_pct > 0
I want the sum of pages for thistle among roses
SELECT SUM(pages) FROM table_name_36 WHERE translated_title = "thistle among roses"
Can you list the different facilities?
SELECT * FROM Apartment_Facilities
Find the name of the amenities that Smith Hall dorm has.
SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall'
What is Team, when Run 3 is 1:24.00?
SELECT team FROM table_name_70 WHERE run_3 = "1:24.00"
What is the Place of the Player with Money greater than 300 and a Score of 71-69-70-70=280?
SELECT place FROM table_name_1 WHERE money___$__ > 300 AND score = 71 - 69 - 70 - 70 = 280
Find the order detail for the products with price above 2000.
SELECT T1.Other_Item_Details FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_price > 2000
What is the id of the most recent order?
SELECT order_id FROM orders ORDER BY date_order_placed DESC LIMIT 1
What is the Flattening ratio associated with the Equatorial diameter of 12,756.28km?
SELECT flattening_ratio FROM table_name_27 WHERE equatorial_diameter = "12,756.28km"
What is the type of the document named "David CV"?
SELECT document_type_code FROM documents WHERE document_name = "David CV"
What is the result in 1985 when the career win-loss is n/a, and 0 / 23 as the career SR?
SELECT 1985 FROM table_name_62 WHERE career_win_loss = "n/a" AND career_sr = "0 / 23"
Return the maximum final tables made across all poker players who have earnings below 200000.
SELECT max(Final_Table_Made) FROM poker_player WHERE Earnings < 200000
may i have the dates of their orders please?
SELECT DISTINCT T2.date_order_placed FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "Packing"
what is the highest frequency mhz with the call sign w292cu?
SELECT MAX(frequency_mhz) FROM table_name_77 WHERE call_sign = "w292cu"
Find all the zip codes in which the max dew point have never reached 70.
SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f >= 70
What are the locations that have gas stations owned by a company with a market value greater than 100?
SELECT T3.location FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.market_value > 100
Average cost of purchase orders made during the first six months of 2012.
SELECT CAST(SUM(ActualCost) AS REAL) / COUNT(TransactionID) FROM TransactionHistoryArchive WHERE TransactionType = 'P' AND TransactionDate >= '2012-01-01' AND TransactionDate < '2012-07-01'
What time has q as the notes, and Australia as the country?
SELECT time FROM table_name_95 WHERE notes = "q" AND country = "australia"
What is the total of yards when asst. is 19, totaltk is 60 and sack is more than 0?
SELECT SUM(yards) FROM table_name_60 WHERE asst = 19 AND totaltk = 60 AND sack > 0
Name actors who voiced more than five Disney characters.
SELECT 'voice-actor' FROM `voice-actors` GROUP BY 'voice-actor' HAVING COUNT(movie) > 5
What are the names of technicians and the machine series that they repair?
SELECT T3.Name , T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID
Who went on a rampage in Baghdad?
SELECT perpetrator FROM table_name_85 WHERE location = "baghdad"
What are the states or counties of the address of the stores with marketing region code "CA"?
SELECT T1.State_County FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Marketing_Region_Code = "CA"
what is the total number of rank where viewers is 9.38?
SELECT COUNT(rank__timeslot_) FROM table_15681686_4 WHERE viewers__millions_ = "9.38"
What are all the distinct premise types?
SELECT DISTINCT premises_type FROM premises
What's the score on December 1 when Philadelphia visited?
SELECT score FROM table_name_41 WHERE visitor = "philadelphia" AND date = "december 1"
What is id of the staff who had a Staff Department Assignment earlier than any Clerical Staff?
SELECT staff_id FROM Staff_Department_Assignments WHERE date_assigned_to < (SELECT max(date_assigned_to) FROM Staff_Department_Assignments WHERE job_title_code = 'Clerical Staff')
What was the event with leonardo chocolate in 2009?
SELECT event FROM table_name_88 WHERE date = 2009 AND opponent = "leonardo chocolate"
can you tell me who that teacher is? | The teacher is Alvis Macer Schultz | and what is that teacher's email address?
SELECT T2.email_address FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id WHERE T1.zip_postcode = "918"
Which catalog publisher has published the most catalogs?
SELECT catalog_publisher FROM catalogs GROUP BY catalog_publisher ORDER BY count(*) DESC LIMIT 1
Which events have the number of notes between one and three? List the event id and the property id.
SELECT T1.Customer_Event_ID , T1.property_id FROM Customer_Events AS T1 JOIN Customer_Event_Notes AS T2 ON T1.Customer_Event_ID = T2.Customer_Event_ID GROUP BY T1.customer_event_id HAVING count(*) BETWEEN 1 AND 3
What is the highest price of dishes with menu item ID 1 to 5?
SELECT T2.price FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T2.id BETWEEN 1 AND 5 ORDER BY T2.price DESC LIMIT 1
I was wondering what the maximum number of circulation history documents is for a single employee?
SELECT count ( * ) FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id GROUP BY employees.employee_id ORDER BY count ( * ) DESC LIMIT 1
List directors and producers when the celebrities involved were Bill Turnbull and Louise Minchin.
SELECT directed_and_produced_by FROM table_24725951_1 WHERE celebrities = "Bill Turnbull and Louise Minchin"
Which status code is the most common of all the bookings?
SELECT Status_Code FROM BOOKINGS GROUP BY Status_Code ORDER BY count(*) DESC LIMIT 1
who is the opponent when the surface is clay, the outcome is winner and the championship is estoril on 15 april 1996?
SELECT opponent FROM table_name_93 WHERE surface = "clay" AND outcome = "winner" AND championship = "estoril" AND date = "15 april 1996"
What is Record, when Opponent is San Francisco Warriors?
SELECT record FROM table_name_78 WHERE opponent = "san francisco warriors"
At what age did Roy Emerson complete the Grand Slam?
SELECT MAX(age) FROM table_197638_6 WHERE player = "Roy Emerson"
Please list all of the restaurants that serve European food.
SELECT label FROM generalinfo WHERE food_type = 'european'
What was the time of the match with a record of 9-0 and used the tko (doctor stoppage) method?
SELECT time FROM table_name_75 WHERE method = "tko (doctor stoppage)" AND record = "9-0"
What are the distinct details of invoices created before 1989-09-03 or after 2007-12-25?
SELECT DISTINCT invoice_details FROM invoices WHERE invoice_date < "1989-09-03" OR invoice_date > "2007-12-25"
how many names are in the friends column?
SELECT count ( distinct friend ) FROM PersonFriend
When was the delegate who has previous experience as a commissioner of health born?
SELECT born_in FROM table_name_36 WHERE former_experience = "commissioner of health"
How many players were born in 1982 and have a height above 182cm?
SELECT COUNT(T2.ELITEID) FROM height_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.height_id = T2.height WHERE T1.height_in_cm > 182 AND strftime('%Y', T2.birthdate) = '1982'
How many accounts have a savings balance above the average savings balance?
SELECT count(*) FROM savings WHERE balance > (SELECT avg(balance) FROM savings)
Which organisation type hires most research staff?
SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_type ORDER BY COUNT(*) DESC LIMIT 1
Who directed the episode with a production code greater than 4301103.585233785 that was written by Curtis Kheel?
SELECT directed_by FROM table_21312845_1 WHERE production_code > 4301103.585233785 AND written_by = "Curtis Kheel"
WHich Regular Season Champions has a Year of 1943–44?
SELECT regular_season_champion_s_ FROM table_name_70 WHERE year = "1943–44"
How many places offer happy hour?
SELECT count ( distinct shop_id ) FROM happy_hour
What is the order number that has Aretha Franklin as the original artist?
SELECT order__number FROM table_name_97 WHERE original_artist = "aretha franklin"
Show me all grades that have at least 4 students.
SELECT grade FROM Highschooler GROUP BY grade HAVING COUNT(*) >= 4
What is the maximum rebounds when there are 0.9 steals and fewer than 1.4 turnovers?
SELECT MAX(rebounds) FROM table_name_69 WHERE steals = 0.9 AND turnovers < 1.4
Among all the claims, which claims have a claimed amount larger than the average? List the date the claim was made and the date it was settled.
SELECT Date_Claim_Made , Date_Claim_Settled FROM Claims WHERE Amount_Claimed > ( SELECT avg(Amount_Claimed) FROM Claims )
For each bed type, find the average base price of different bed type.
SELECT bedType , avg(basePrice) FROM Rooms GROUP BY bedType;
Which Administrative district has a Pre-1009 province of gwannae -do and a Post-1009 province of seohae -do?
SELECT administrative_district FROM table_name_76 WHERE pre_1009_province = "gwannae -do" AND post_1009_province = "seohae -do"
Show the first and last names of them
SELECT T2.Fname, T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID GROUP BY T1.Instructor ORDER BY count ( * ) DESC LIMIT 3
What car has a March 90ca Chassis?
SELECT engine FROM table_name_44 WHERE chassis = "march 90ca"
Give the percentage of subscribers who rated who rated the movie "G.I. Jane".
SELECT CAST(SUM(CASE WHEN T3.user_subscriber = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id INNER JOIN lists_users AS T3 ON T1.user_id = T3.user_id WHERE T2.movie_title = 'G.I. Jane'
Find the catalog publisher that has the most catalogs.
SELECT catalog_publisher FROM catalogs GROUP BY catalog_publisher ORDER BY count(*) DESC LIMIT 1
Name the stage for 08:46
SELECT stage FROM table_name_85 WHERE time__eest_ = "08:46"
What was the venue where Chuck Klein played?
SELECT venue FROM table_name_85 WHERE player = "chuck klein"
What is the smallest Crowd number for the Venue named Princes Park?
SELECT MIN(crowd) FROM table_name_96 WHERE venue = "princes park"
Who is the Winner with a Time of 1:12.00 and Melvin A. Holland as the Jockey?
SELECT winner FROM table_name_74 WHERE time = "1:12.00" AND jockey = "melvin a. holland"
What is the qualification for rank of 29 in 1957?
SELECT qual FROM table_name_70 WHERE rank = "29" AND year = "1957"
Among the users who use SUGAR, calculate the percentage of those who are above 20 years old.
SELECT SUM(IIF(T1.age > 20, 1, 0)) / COUNT(T1.device_id) AS per FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.phone_brand = 'SUGAR'
What is the highest number of viewers for a rating greater than 9.4?
SELECT MAX(viewers__m_) FROM table_name_47 WHERE rating > 9.4
How many locations have the call signs dxjp-fm?
SELECT COUNT(location) FROM table_17487395_1 WHERE callsign = "DXJP-FM"
How many games has each stadium held?
SELECT T1.id , count ( * ) FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id GROUP BY T1.id
Show all the distinct president votes made on 08/30/2015.
SELECT DISTINCT PRESIDENT_Vote FROM VOTING_RECORD WHERE Registration_Date = "08/30/2015"
Oh ok, how many credit hours is this course worth?
SELECT Credits FROM COURSE AS T1 JOIN DEPARTMENT AS T2 ON T1.DNO = T2.DNO WHERE T1.CName = "INTRODUCTION TO COMPUTER SCIENCE"
Find the name of the winner who has the highest rank points and participated in the Australian Open tourney.
SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1
How many book clubs are there?
SELECT count(*) FROM book_club
When james rutherford is the incumbent how many dates are there?
SELECT COUNT(date) FROM table_28898974_3 WHERE incumbent = "James Rutherford"
What's the percentage of coins that is higher than the price 1 hour ago in May 29,2013? List the names of these coins.
SELECT T1.NAME FROM coins AS T1 INNER JOIN historical AS T2 ON T1.ID = T2.coin_id WHERE T2.DATE = '2013-05-29' AND T2.percent_change_1h > 0
What is the closing and opening time of businesses located at Gilbert with highest star rating?
SELECT T2.closing_time, T2.opening_time FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id WHERE T1.city LIKE 'Gilbert' ORDER BY T1.stars DESC LIMIT 1
how many high points where date is february 19
SELECT COUNT(high_points) FROM table_20010140_10 WHERE date = "February 19"
Which NHL team has left wing listed as the position?
SELECT nhl_team FROM table_name_66 WHERE position = "left wing"
How many minutes were played by Sue Bird?
SELECT MIN(minutes) FROM table_24915964_4 WHERE player = "Sue Bird"
Write the titles of papers published by Adam Jones and the journal name in which it was published from 2005 to 2010.
SELECT T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Journal AS T3 ON T1.JournalId = T3.Id WHERE T2.Name = 'Adam Jones' AND T1.Year BETWEEN 2005 AND 2010
Which Krypton has Neon of 10?
SELECT krypton FROM table_name_4 WHERE neon = "10"
What was the Opponent when the Cavaliers had a Record of 3-9?
SELECT opponent FROM table_name_10 WHERE record = "3-9"
When is it has 15,557 Attendances?
SELECT date FROM table_name_35 WHERE attendance = "15,557"
What was the date when the home team was Essendon?
SELECT date FROM table_name_9 WHERE home_team = "essendon"
Which country have data classified as official aid?
SELECT DISTINCT T1.CountryCode FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Description = 'Data are classified as official aid.'
Show the party with drivers from Hartford and drivers older than 40.
SELECT party FROM driver WHERE home_city = 'Hartford' AND age > 40
How many titles got a viewership of 26.53 million?
SELECT COUNT(title) FROM table_10718525_2 WHERE us_viewers__millions_ = "26.53"
Show the average, minimum, and maximum age for different majors.
SELECT major, AVG(age), MIN(age), MAX(age) FROM Student GROUP BY major
Tell me the total number of administrative panel with labour panel more than 2, nominated by taoiseach more than 6 and total of 28
SELECT COUNT(administrative_panel) FROM table_name_59 WHERE labour_panel > 2 AND total = 28 AND nominated_by_the_taoiseach > 6
How many dogs have not gone through any treatment?
SELECT count(*) FROM Dogs WHERE dog_id NOT IN ( SELECT dog_id FROM Treatments )
what is the minimumfor 5wi?
SELECT MIN(5 AS wi) FROM table_28846752_5
What is the sport with the most scholarship students?
SELECT sportname FROM Sportsinfo WHERE onscholarship = 'Y' GROUP BY sportname ORDER BY count(*) DESC LIMIT 1
can you show me a list of lesson date?
SELECT lesson_date FROM Lessons
What is the score on March 18?
SELECT score FROM table_name_97 WHERE date = "march 18"
which company did Alyson published a book for?
SELECT T1.company_name FROM culture_company AS T1 JOIN book_club AS T2 ON T1.book_club_id = T2.book_club_id WHERE T2.publisher = 'Alyson'
What is the record of the game on 13 May?
SELECT record FROM table_name_70 WHERE date = "13 may"
What segment A is associated with a Segment C of paint chip cards?
SELECT segment_a FROM table_name_31 WHERE segment_c = "paint chip cards"
What is the total number of products that are in orders with status "Cancelled"?
SELECT sum ( t2.order_quantity ) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_status = "Cancelled"
Which Report is on 1 june?
SELECT report FROM table_name_13 WHERE date = "1 june"