sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What are the countries that have greater surface area than any country in Europe? | SELECT Name FROM country WHERE SurfaceArea > (SELECT min(SurfaceArea) FROM country WHERE Continent = "Europe") |
At what arena was the September 21 game? | SELECT arena FROM table_name_22 WHERE date = "september 21" |
Please show me the names of songs for which the format is mp4 and resolution is below 1000. | SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = "mp4" INTERSECT SELECT song_name FROM song WHERE resolution < 1000 |
What is the unit price of the tune "Fast As a Shark"? | SELECT unit_price FROM tracks WHERE name = "Fast As a Shark"; |
Among the students enlisted in marines, how many of them are disabled? | SELECT COUNT(T1.name) FROM enlist AS T1 INNER JOIN disabled AS T2 ON T1.name = T2.name WHERE T1.organ = 'marines' |
What is the relative height of Scotland with Ben Vorlich as parent? | SELECT COUNT(relative_height__m_) FROM table_name_9 WHERE country = "scotland" AND parent = "ben vorlich" |
What are the duration of the longest and shortest pop tracks in milliseconds? | SELECT max(Milliseconds) , min(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = "Pop" |
list the other directors against the movies they directed. | SELECT director, title from movie where director ! = "Victor Fleming" |
List the full names of all clients who live in the Pacific division. | SELECT T2.first, T2.middle, T2.last FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T1.division = 'Pacific' |
How many males in this table? | Do you mean the table "Faculty"? | Yes. | select count ( * ) from Faculty where Sex = 'M' |
Which marketing region has the most drama workshop groups? Give me the region code. | SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code ORDER BY count(*) DESC LIMIT 1 |
What is the total of the year with a Team of johnson city yankees, and a Finish of 6th? | SELECT SUM(year) FROM table_name_33 WHERE team = "johnson city yankees" AND finish = "6th" |
List all movies rated by user 39115684. State the title, rating date and rating score. | SELECT T2.movie_title, T1.rating_timestamp_utc, T1.rating_score FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.user_id = 39115684 |
What are the themes of farm competitions sorted by year in ascending order? | SELECT Theme FROM farm_competition ORDER BY YEAR ASC |
When the nation of poland had less than 17 medals but more than 1 gold medal, what's the Highest number of bronze medals? | SELECT MAX(bronze) FROM table_name_28 WHERE total < 17 AND nation = "poland" AND gold > 1 |
What was the attendance at the game on December 11, 1966? | SELECT attendance FROM table_name_66 WHERE date = "december 11, 1966" |
Who is the rector of the residence hall who's mascot is the phoxes? | SELECT rector FROM table_15873547_1 WHERE mascot = "Phoxes" |
What categories did Cleavant Derricks win for? | SELECT Category FROM musical WHERE Nominee = "Cleavant Derricks" AND Result = "Won" |
What is the name of the event that had a prize of zł 1,226,711? | SELECT event FROM table_name_22 WHERE prize = "zł 1,226,711" |
What To par has a Place of t10, and a Score of 67-73=140? | SELECT to_par FROM table_name_74 WHERE place = "t10" AND score = 67 - 73 = 140 |
when did no. 32 play for grizzles | SELECT years_for_grizzlies FROM table_16494599_5 WHERE no = 32 |
What are the first names of professors in the history department? | SELECT T1.emp_fname from employee as T1 join professor as T2 on T1.emp_num = T2.emp_num where T2.dept_code = 'HIST' |
What about Mountain Climbing and Kayaking? | SELECT T1.fname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Mountain Climbing' INTERSECT SELECT T1.fname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Kayaking' |
How many weeks have an attendance less than 26,048? | SELECT SUM(week) FROM table_name_7 WHERE attendance < 26 OFFSET 048 |
Give the coordinates of the buyer of R & A Plant Genetics from Benchmark Education. | SELECT T2.school_latitude, T2.school_longitude FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.item_name = 'R & A Plant Genetics' AND T1.vendor_name = 'Benchmark Education' |
What was the number of race that Kevin Curtain won? | SELECT COUNT(no) FROM table_10083598_1 WHERE pole_position = "Kevin Curtain" |
How many Yards did Player Rob Turner collect? | SELECT yards FROM table_name_32 WHERE player = "rob turner" |
What is the highest number of games won where less than 21 games were conceded and less than 18 games were actually played? | SELECT MAX(won__pg_) FROM table_name_85 WHERE goals_conceded__gc_ < 21 AND played__pj_ < 18 |
Which last names are both used by customers and by staff? | SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff |
What is the Score when Deportes Savio is the Home team? | SELECT score FROM table_name_99 WHERE home = "deportes savio" |
How many years for the team with under 31 ties and a percentage of 0.5451? | SELECT years FROM table_name_15 WHERE tied < 31 AND pct = 0.5451 |
What was the date of the record of 43-28? | SELECT date FROM table_name_69 WHERE record = "43-28" |
What is the highest 1985 value that has a 1990 value of 93? | SELECT MAX(1985) FROM table_name_27 WHERE 1990 = 93 |
What is the rating for "Draw A Stickman"? | SELECT Rating FROM playstore WHERE APP = 'Draw A Stickman' |
Name the result/games for 54741 | SELECT result_games FROM table_21436373_11 WHERE attendance = 54741 |
What is the Country, when the Transfer fee is "loan", and when the Name is Lynch? | SELECT country FROM table_name_94 WHERE transfer_fee = "loan" AND name = "lynch" |
Thank you! Can you filter that list to show only the department with the lowest budget? | SELECT dept_name,budget FROM department order by budget limit 1 |
List the names of players in ascending order of votes. | SELECT Player_name FROM player ORDER BY Votes ASC |
What was the yield of the K-4 explosion? | SELECT yield__approximate_ FROM table_148578_1 WHERE explosion = "K-4" |
What is the name of the vendors that serve resources to schools whose primary focus area is Literature? | SELECT T1.vendor_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.primary_focus_area LIKE 'Literacy%' GROUP BY T1.vendor_name ORDER BY COUNT(T2.primary_focus_area) DESC LIMIT 1 |
Find the ids of all distinct customers who made order after some orders that were Cancelled. | SELECT DISTINCT customer_id FROM Customer_Orders WHERE order_date > (SELECT MIN(order_date) FROM Customer_Orders WHERE order_status_code = "Cancelled") |
What date was Carlos Boozer (23) the leading scorer? | SELECT date FROM table_name_50 WHERE leading_scorer = "carlos boozer (23)" |
What is the minimum attendance on games of record 0-2-1 | SELECT MIN(attendance) FROM table_17360840_4 WHERE record = "0-2-1" |
How many stations had more than 14 bikes available on average or were installed in december? | select count ( * ) from ( SELECT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING avg ( T2.bikes_available ) > 14 UNION SELECT name FROM station WHERE installation_date LIKE "12/%" ) |
How many were the show's average weekly ranking when it reached No. 2 in average nightly ranking? | SELECT COUNT(average_weekly_rank) FROM table_15358729_6 WHERE average_nightly_rank = "No. 2" |
Compare the total number of orders between customer "Apollo Ltd" and "Pacific Ltd". | SELECT SUM(CASE WHEN T2.`Customer Names` = 'Apollo Ltd' THEN 1 ELSE 0 END), SUM(CASE WHEN T2.`Customer Names` = 'Pacific Ltd' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID |
What is the total number of 2nd place finishes for riders active in years 2009-2010 and more than 0 wins? | SELECT SUM(2 AS nd_pl) FROM table_name_83 WHERE years_active = "2009-2010" AND wins > 0 |
Where does the staff member with the first name Elsa live? | SELECT T2.address FROM staff AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE T1.first_name = 'Elsa' |
What is the Season Outcome, when the School is Sussex Tech? | SELECT season_outcome FROM table_name_70 WHERE school = "sussex tech" |
What location had 25/25 fatalities? | SELECT location FROM table_name_15 WHERE fatalities = "25/25" |
How many titles are listed with 8.44 million viewers? | SELECT COUNT(title) FROM table_24910733_1 WHERE us_viewers__millions_ = "8.44" |
What document types have more than 2 corresponding documents? | SELECT document_type_code FROM documents GROUP BY document_type_code HAVING count(*) > 2 |
Can you add to the table the amount of transaction associated with each share count? | SELECT share_count, amount_of_transaction FROM TRANSACTIONS |
Show times of elimination of wrestlers with days held more than 50. | SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID WHERE T2.Days_held > 50 |
How many dishes appeared more than once on a menu? | SELECT COUNT(*) FROM Dish WHERE times_appeared > Dish.menus_appeared |
What is Prime Mover of Model FM CFA-16-4? | SELECT prime_mover FROM table_name_87 WHERE model = "fm cfa-16-4" |
What were the total number of 2012 deaths when 2012 births were 127? | SELECT death_2012 FROM table_25703_2 WHERE birth_2012 = 127 |
For each language, list the number of TV Channels that use it. | SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE |
What is it's phone number? | SELECT DISTINCT Customer_Phone FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = "Dayana Robel" |
Name the championship for outcome being winner for 7–5, 4–6, 6–1 | SELECT championship FROM table_24638867_6 WHERE outcome = "Winner" AND score = "7–5, 4–6, 6–1" |
what is the last performance of leon varkas category:articles with hcards | SELECT last_performance FROM table_19189856_1 WHERE performer = "Leon Varkas category:Articles with hCards" |
List all the paper ID and its class type that cited the word 'word1002'. | SELECT T1.paper_id, T1.class_label FROM paper AS T1 INNER JOIN content AS T2 ON T1.paper_id = T2.paper_id WHERE T2.word_cited_id = 'word1002' |
What is the Home with a Time that is 14:00? | SELECT home FROM table_name_28 WHERE time = "14:00" |
In what arena was the game against the Sharks played? | SELECT arena FROM table_name_33 WHERE opponent = "sharks" |
Find the number of items without any review. | SELECT count(*) FROM item WHERE i_id NOT IN (SELECT i_id FROM review) |
the song The way was issued what volume? | SELECT volume_Issue FROM volume WHERE Song LIKE "%The Way%" |
What is the truck used by Brett Moffitt, from Hattori Racing Enterprises? | SELECT truck_s_ FROM table_name_23 WHERE driver_s_ = "brett moffitt" AND team = "hattori racing enterprises" |
How many unscheduled routine inspections did "Soma Restaurant And Bar" have? | SELECT COUNT(T1.business_id) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'Soma Restaurant And Bar' AND T1.type = 'Routine - Unscheduled' |
Find all the cities that have 2 to 4 parks. | SELECT city FROM park GROUP BY city HAVING count(*) BETWEEN 2 AND 4; |
Who was the visitor on november 14 with leclaire recording the decision? | SELECT visitor FROM table_name_43 WHERE decision = "leclaire" AND date = "november 14" |
For the game played at the Boston Garden with a score of 118-110, what is the opposing team's record? | SELECT record FROM table_name_68 WHERE location = "boston garden" AND score = "118-110" |
Which nationality is the player from the Philadelphia Flyers? | SELECT nationality FROM table_1473672_3 WHERE nhl_team = "Philadelphia Flyers" |
Who is the composer of the song with a length of 6:24? | SELECT composer_s_ FROM table_name_85 WHERE length = "6:24" |
Display the 10 least expensive invoices | Would you like a list of the id's of these invoices? | No. | SELECT T2.invoice_date FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY total LIMIT 10 |
What are the codes of template types that are not used for any document? | SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id |
What class was ren alde? | SELECT class FROM table_22824312_1 WHERE player = "Ren Alde" |
which countries did participated in both Friendly and Tournament type competitions. | SELECT country FROM competition WHERE competition_type = 'Friendly' INTERSECT SELECT country FROM competition WHERE competition_type = 'Tournament' |
What district is incument terry kilgore from? | SELECT district FROM table_13618584_2 WHERE incumbent = "Terry Kilgore" |
What was the average for the country with the swimsuit score of 9.57? | SELECT average FROM table_11884814_3 WHERE swimsuit = "9.57" |
What place result was the 1996 season at Lake Louise, Canada? | SELECT place FROM table_name_73 WHERE season = 1996 AND location = "lake louise, canada" |
Name the agg for seba united | SELECT agg FROM table_name_12 WHERE team_1 = "seba united" |
Find the product names that are colored 'white' but do not have unit of measurement "Handful". | SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code JOIN ref_colors AS t3 ON t1.color_code = t3.color_code WHERE t3.color_description = "white" AND t2.unit_of_measure != "Handful" |
What is the smallest capacity for Bursa? | SELECT MIN(capacity) FROM table_name_10 WHERE city = "bursa" |
Which stage took the tour through Boulogne-Billancourt? | SELECT stage FROM table_name_90 WHERE route = "boulogne-billancourt" |
what role does Koby play? | SELECT T1.role_description FROM ROLES AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code WHERE T2.employee_name = "Koby" |
Which position does Suchitra hold? | SELECT T2.JobTitle FROM Person AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.FirstName = 'Suchitra' |
What is Award, when Category is Cabello Maluco? | SELECT award FROM table_name_43 WHERE category = "cabello maluco" |
Find the dates of the tests taken with result "Pass". | SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result = "Pass" |
Give the url of movie which was rated 5 on 2013/5/3 5:11:17. | SELECT T2.movie_url FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE rating_score = 5 AND rating_timestamp_utc LIKE '2013-05-03 05:11:17' |
How long does Yelp_Business no.1 open on Tuesdays? | SELECT T1.closing_time - T1.opening_time AS "opening hours" FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id WHERE T2.day_of_week LIKE 'Tuesday' AND T1.business_id = 1 |
What day in october was game number 4 with under 3 points? | SELECT COUNT(october) FROM table_name_18 WHERE game = 4 AND points < 3 |
How many flights from Charlotte Douglas International Airport to Austin - Bergstrom International Airport experienced serious reasons that cause flight cancellation? | SELECT COUNT(*) FROM Airlines AS T1 INNER JOIN Airports AS T2 ON T1.ORIGIN = T2.Code WHERE T1.ORIGIN = 'CLT' AND T1.DEST = 'AUS' AND T2.Description = 'Charlotte, NC: Charlotte Douglas International' AND T1.CANCELLATION_CODE = 'A' |
On what date was the record 21-25? | SELECT date FROM table_name_79 WHERE record = "21-25" |
What is the result for 23,24,25,26 july 1992? | SELECT result FROM table_name_58 WHERE date = "23,24,25,26 july 1992" |
What is the precise location of all paying customers with American Express? | SELECT DISTINCT T2.Latitude, T2.Longitude FROM `transaction` AS T1 INNER JOIN geolocation AS T2 ON T1.LocationID = T2.LocationID WHERE T1.CreditCardType = 'American Express' |
For each donation not from a teacher, state the donor account id and calculate the percentage of donation given for optional support. | SELECT donor_acctid, donation_optional_support / donation_total FROM donations WHERE is_teacher_acct = 'f' |
When is Edmonton Oilers in? | SELECT date FROM table_name_99 WHERE home = "edmonton oilers" |
Return the order ids and details for orderes with two or more invoices. | SELECT T2.order_id , T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id GROUP BY T2.order_id HAVING count(*) > 2 |
What is all the information about all people? | SELECT * FROM people |
How many times did the episode titled "Agony" win an award? | SELECT COUNT(T2.award_id) FROM Episode AS T1 INNER JOIN Award AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Agony' AND T2.result = 'Winner' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.