sentence
stringlengths
3
347
sql
stringlengths
18
804
What is the total shipping cost of all the orders made by Page Holsey? Indicate how many of the said orders were ordered in 2022.
SELECT SUM(T3.cost) FROM customer AS T1 INNER JOIN cust_order AS T2 ON T1.customer_id = T2.customer_id INNER JOIN shipping_method AS T3 ON T3.method_id = T2.shipping_method_id WHERE T1.first_name = 'Page' AND T1.last_name = 'Holsey' AND STRFTIME('%Y', T2.order_date) = '2022'
Who holds the time of 17:11.572?
SELECT race FROM table_name_88 WHERE time = "17:11.572"
Find the number of distinct gender for dorms.
SELECT COUNT(DISTINCT gender) FROM dorm
What is the average age of clients whose complaint type is "TT"?
SELECT AVG(T1.age) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.type = 'TT'
Name the average losses for draws larger than 6 and played more than 38
SELECT AVG(losses) FROM table_name_58 WHERE draws > 6 AND played > 38
On what date did Northerly place 6th?
SELECT date FROM table_1358608_4 WHERE result = "6th"
size (steps) of 15, and a just (cents) larger than 435.08 is what highest size (cents)?
SELECT MAX(size__cents_) FROM table_name_26 WHERE size__steps_ = 15 AND just__cents_ > 435.08
What is the highest price at which a customer bought the book 'The Prophet'?
SELECT MAX(T2.price) FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T1.title = 'The Prophet'
Find the GPD for Bosnia and Herzegovina and the type of government it belongs to.
SELECT T1.GDP, T2.Government FROM economy AS T1 INNER JOIN politics AS T2 ON T1.Country = T2.Country INNER JOIN country AS T3 ON T3.Code = T2.Country WHERE T3.Name = 'Bosnia and Herzegovina'
which countries have more than 2 airports?
SELECT country FROM airport GROUP BY country HAVING count(*) > 2
Which game was on September 12?
SELECT game FROM table_name_2 WHERE date = "september 12"
What is the episode title for episode number 12?
SELECT title FROM table_25640730_7 WHERE _number = 12
Who is the coach for 'BOS' team in year 1950. List the coach ID together with the number of game won and lost.
SELECT coachID, won, lost FROM coaches WHERE year = 1950 AND tmID = 'BOS'
Which festival has the least number of audience?
select Festival_Name from festival_detail order by Num_of_Audience limit 1
Name the number of tn seshan values for kr values is 478608
SELECT COUNT(tn_seshan__values_) FROM table_22897453_1 WHERE kr_narayanan__values_ = 478608
When was the earliest claim made?
SELECT Date_Claim_Made FROM Claims ORDER BY Date_Claim_Made ASC LIMIT 1
What was the course on 13 may?
SELECT course FROM table_name_99 WHERE date = "13 may"
Find the name and email for the users who have more than one follower.
SELECT T1.name , T1.email FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 GROUP BY T2.f1 HAVING count(*) > 1
Who was the rider with a Fri 3 June time of 18' 19.68 123.516mph?
SELECT rider FROM table_29218221_2 WHERE fri_3_june = "18' 19.68 123.516mph"
Please list all the keywords of the episode "Refuge: Part 1".
SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Refuge: Part 1'
Which countries has the most number of airlines whose active status is 'Y'?
SELECT country FROM airlines WHERE active = 'Y' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1
Which player is no. 53?
SELECT player FROM table_11545282_5 WHERE no = "53"
What was the Report for the Monaco race?
SELECT report FROM table_name_32 WHERE location = "monaco"
What Datacenter is listed against the network access connections: rras Feature?
SELECT datacenter FROM table_name_85 WHERE features = "network access connections: rras"
WHAT IS THE VAL-DE-MARNE WITH A Seine-Saint-Denis of 2.7%?
SELECT val_de_marne FROM table_name_18 WHERE seine_saint_denis = "2.7%"
What is the highest Assets (USD) Millions from Equity Bank and less than 44 branches?
SELECT MAX(assets__usd__millions) FROM table_name_37 WHERE bank = "equity bank" AND number_of_branches < 44
State the short description for the project which got the donation at 14:44:29 on 2012/9/6.
SELECT T1.short_description FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.donation_timestamp LIKE '2012-09-06 14:44:29'
Name the team of vitali yeremeyev
SELECT nhl_team FROM table_name_97 WHERE player = "vitali yeremeyev"
what are the total revenues of all companies?
SELECT sum ( revenue ) FROM manufacturers
What party is John McHugh a member of?
SELECT party FROM table_1341453_34 WHERE incumbent = "John McHugh"
What is the Episode number of Ernest Dickerson in 2009 when the show was dexter?
SELECT episode FROM table_name_19 WHERE year = 2009 AND show = "dexter"
Show all the ranks and the number of male and female faculty for each rank.
SELECT rank , sex , count(*) FROM Faculty GROUP BY rank , sex
What are the names of the products with the color description "red"?
SELECT product_name 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"
What is the highest evening gown with an average of 9.531 and swimsuit smaller than 9.449?
SELECT MAX(evening_gown) FROM table_name_8 WHERE average = 9.531 AND swimsuit < 9.449
Votes of 27,391 has which quotient?
SELECT quotient FROM table_name_10 WHERE votes = "27,391"
What dates did they become customers?
SELECT t1.customer_name, T1.date_became_customer FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t3.order_quantity = ( SELECT max ( order_quantity ) FROM order_items )
List the product ID of the top five products, by descending order, the number of quantities in stock.
SELECT ProductID FROM Products ORDER BY UnitsInStock DESC LIMIT 5
What is the lowest Gold, when Silver is 0, and when Bronze is 2?
SELECT MIN(gold) FROM table_name_52 WHERE silver = 0 AND bronze = 2
Thank you. Can you tell me how many of them are males?
SELECT count ( * ) FROM employee WHERE Sex = "M"
What is the enrollment at the private university?
SELECT enrollment FROM table_29483673_1 WHERE affiliation = "Private"
How many games have high assists as earl watson (11) and location attendance as Keyarena 16,841?
SELECT COUNT(game) FROM table_28768469_7 WHERE high_assists = "Earl Watson (11)" AND location_attendance = "KeyArena 16,841"
Name 5 students with due payments that are enlisted alongside which organization they were enlisted.
SELECT T2.organ, T1.name FROM no_payment_due AS T1 INNER JOIN enlist AS T2 ON T1.`name` = T2.`name` WHERE T1.bool = 'pos' LIMIT 5
What is the average round number with wide receiver as position and Clark University as the college and the pick number is bigger than 166?
SELECT AVG(round__number) FROM table_name_18 WHERE position = "wide receiver" AND college = "clark university" AND pick__number > 166
What are the first names for all faculty professors, ordered by first name?
SELECT Fname FROM FACULTY WHERE Rank = "Professor" ORDER BY Fname
What is the name of the document with the most number of sections?
SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code GROUP BY t1.document_code ORDER BY count(*) DESC LIMIT 1
For each faculty rank, show the number of faculty members who have it.
SELECT rank, COUNT(*) FROM Faculty GROUP BY rank
Name the Losing BP of Newport Saracens RFC and has a Lost of 19.
SELECT losing_bp FROM table_name_14 WHERE lost = "19" AND club = "newport saracens rfc"
What is the minimum sum?
SELECT MIN(total) FROM table_30018460_1
How many papers were preprinted between the years 1990 and 2000?
SELECT COUNT(id) FROM Paper WHERE Year BETWEEN '1990' AND '2000' AND ConferenceId = 0 AND JournalId = 0
What are the countries having at least one car maker? List name and id.
SELECT T1.CountryName , T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING count(*) >= 1;
What are the names for tracks without a race in class 'GT'.
SELECT name FROM track EXCEPT SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id WHERE T1.class = 'GT'
list all cartoon titles and their directors ordered by their air date
SELECT title , Directed_by FROM Cartoon ORDER BY Original_air_date
find the name of the user who gives 1 rank
SELECT T1.name FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id where T2.rank = 1
How many teams scored 616 points?
SELECT COUNT(won) FROM table_13018091_1 WHERE pts_for = 616
What ethnic group had the largest population in сурдук in 2002?
SELECT largest_ethnic_group__2002_ FROM table_2562572_53 WHERE cyrillic_name = "Сурдук"
Which college/junior/club team did the player play on that played for the Buffalo Sabres in NHL?
SELECT college_junior_club_team FROM table_1473672_3 WHERE nhl_team = "Buffalo Sabres"
What kind of round was played when Hanne Skak Jensen faced Austria?
SELECT round FROM table_25505246_7 WHERE against = "Austria"
what location is each institution in?
SELECT institution, location from institution
What is the result of 2003 eaff championship preliminary on 2 march 2003?
SELECT result FROM table_name_70 WHERE competition = "2003 eaff championship preliminary" AND date = "2 march 2003"
What building in Louisville had more than 35 floors?
SELECT name FROM table_name_56 WHERE city = "louisville" AND floors > 35
What is the document id with least number of paragraphs?
SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1
Which country has more than 0 in 2012 and 2009, 0 in 2008 and more than 0 in 2004?
SELECT country FROM table_name_18 WHERE 2012 > 0 AND 2009 > 0 AND 2008 = 0 AND 2004 > 0
On what Date were the Results¹ 4:0?
SELECT date FROM table_name_47 WHERE results¹ = "4:0"
What are the names and locations of all enzymes listed?
SELECT name , LOCATION FROM enzyme
Which car won the 1.4litre to 1.8litre award in 2001?
SELECT 2001 FROM table_name_17 WHERE category = "1.4litre to 1.8litre"
What are the names of gymnasts?
SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID
For how many times has player no.41 won the "man of the match" award?
SELECT COUNT(Match_Id) FROM `Match` WHERE Man_of_the_Match = 41
Which Third has a Skip of ellen vogt?
SELECT third FROM table_name_58 WHERE skip = "ellen vogt"
What is the average first prize of the tournament with a score of 279 (–9)?
SELECT AVG(1 AS st_prize___) AS $__ FROM table_name_47 WHERE score = "279 (–9)"
Find the first name and major of the students who are not allegry to soy.
SELECT fname , major FROM Student WHERE StuID NOT IN (SELECT StuID FROM Has_allergy WHERE Allergy = "Soy")
Which hometown is the played Dajuan Wagner from?
SELECT hometown FROM table_name_11 WHERE player = "dajuan wagner"
who is the runner-up when the winning score is −16 (68-70-65-65=268)?
SELECT runner_up FROM table_name_26 WHERE winning_score = −16(68 - 70 - 65 - 65 = 268)
Who are the local hosts for the United States in years earlier than 2007?
SELECT local_host_s_ FROM table_name_86 WHERE country = "united states" AND year < 2007
find the package option of the tv channel that do not have any cartoon directed by Ben Jones.
SELECT package_option FROM TV_Channel WHERE id NOT IN (SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones')
which shop has happy hour most frequently? List its id and number of happy hours.
SELECT shop_id , count(*) FROM happy_hour GROUP BY shop_id ORDER BY count(*) DESC LIMIT 1
Give the title of the film starred by Liza Bergman with the highest replacement cost.
SELECT T3.title FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T1.first_name = 'Liza' AND T1.last_name = 'Bergman' ORDER BY replacement_cost DESC LIMIT 1
Tell me the grantee for las pulgas in 1795
SELECT grantee FROM table_name_6 WHERE date = 1795 AND concession = "las pulgas"
List all movies with the best rating score. State the movie title and number of Mubi user who loves the movie.
SELECT DISTINCT T2.movie_title, T2.movie_popularity FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.rating_score = 5
Who were the opponents on a hard surface with a score of 6-4, 7-6(2)?
SELECT opponents_in_the_final FROM table_name_23 WHERE surface = "hard" AND score = "6-4, 7-6(2)"
What is the highest round played by Chris Phillips?
SELECT MAX(round) FROM table_name_67 WHERE player = "chris phillips"
In businesses with a score lower than 95 and located around the postal code of 94110, what is the percentage of businesses with a risk category of low risk?
SELECT CAST(SUM(CASE WHEN T1.risk_category = 'Low Risk' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.risk_category) FROM violations AS T1 INNER JOIN inspections AS T2 ON T1.business_id = T2.business_id INNER JOIN businesses AS T3 ON T2.business_id = T3.business_id WHERE T2.score < 95 AND T3.postal_code = 94110
What position did the person finish in with a notes of junior men individual 5.64km?
SELECT position FROM table_name_95 WHERE notes = "junior men individual 5.64km"
Among the patients who were immunized with meningococcal MCV4P, how many have viral sinusitis disorder after getting the immunization?
SELECT COUNT(DISTINCT T1.patient) FROM immunizations AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T1.DESCRIPTION = 'meningococcal MCV4P' AND T2.DESCRIPTION = 'Viral sinusitis (disorder)'
How many aircrafts are there?
SELECT count(*) FROM aircraft
list out the movies on the table
SELECT * FROM Movie
What was the match id in 2013?
SELECT MATCH_ID FROM hosting_city WHERE YEAR = 2013
how artist are from India
SELECT count ( * ) from artist where country = "India"
Who playes the sport of athletics?
SELECT sportsperson FROM table_name_36 WHERE sport = "athletics"
Name the location on 2006-04-07 for direct fire
SELECT location FROM table_name_9 WHERE date = "2006-04-07" AND circumstances = "direct fire"
Hmm, I want to know the name of the city with this population.
SELECT city FROM city ORDER BY Regional_Population DESC LIMIT 1
what are all the pixels are presented on the table
SELECT pixels FROM screen_mode
Which product did Phillina Ober buy?
SELECT DISTINCT T3.`Product Name` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T1.`Customer Name` = 'Phillina Ober'
How many female customers have an education level of over 11?
SELECT COUNT(ID) FROM Customers WHERE EDUCATIONNUM > 11 AND SEX = 'Female'
Which state is Tehachapi Pass Wind Farm located in?
SELECT state_province FROM table_name_72 WHERE wind_farm = "tehachapi pass wind farm"
What instrumental has chven-s as the adverbial?
SELECT instrumental FROM table_name_87 WHERE adverbial = "chven-s"
Give me the social number and state of the client whose phone number is 100-121-8371.
SELECT T1.social, T1.state FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN state AS T3 ON T2.state_abbrev = T3.StateCode WHERE T1.phone = '100-121-8371'
List the courses' IDs and students' IDs who failed to pass the course.
SELECT course_id, student_id FROM registration WHERE grade IS NULL OR grade = ''
For how long did Bolivia have a lane greater than 6?
SELECT COUNT(time) FROM table_name_56 WHERE country = "bolivia" AND lane > 6
Hi there! Can you show me a list of all customer IDs for customers not located in the state of California?
SELECT customer_id FROM customers EXCEPT SELECT t1.customer_id FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'California'
Show the party that has the most people
SELECT Party FROM people GROUP BY Party ORDER BY COUNT ( * ) DESC LIMIT 1