sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What is the Latin term for the Greek symbol μ? | SELECT latin FROM table_name_80 WHERE greek = "μ" |
When did woking compete? | SELECT date FROM table_name_92 WHERE opponent = "woking" |
Which player went to college at Saint Mary's? | SELECT player FROM table_10812938_3 WHERE college = "Saint Mary's" |
List the names of entrepreneurs and their companies in descending order of money requested? | SELECT T2.Name , T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested |
Which leagues entered in rounds where there were 16 winners from the previous round? | SELECT leagues_entering_at_this_round FROM table_23449363_1 WHERE winners_from_previous_round = "16" |
What was the first year to have a Chassis of Jordan 193? | SELECT MIN(year) FROM table_name_89 WHERE chassis = "jordan 193" |
How many publishers have published more than 3 puzzle games? | SELECT COUNT(T.publisher_name) FROM ( SELECT T3.publisher_name, COUNT(DISTINCT T1.id) FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id INNER JOIN genre AS T4 ON T1.genre_id = T4.id WHERE T4.genre_name = 'Puzzle' GROUP BY T3.publisher_name HAVING COUNT(DISTINCT T1.id) > 3 ) t |
What's the Finish rank of 31? | SELECT finish FROM table_name_71 WHERE rank = "31" |
What is the sum of the game with a PWin% of —, Term [c] of 1987–1988, and Win% less than 0.506? | SELECT SUM(games) FROM table_name_30 WHERE Pwin_percentage = — AND term_[c_] = "1987–1988" AND win_percentage < 0.506 |
What is the type earlier than 1968, and a Title of stretchin' out? | SELECT type FROM table_name_42 WHERE year < 1968 AND title = "stretchin' out" |
Which lowest played has a Position of 2, and Goals against larger than 53? | SELECT MIN(played) FROM table_name_6 WHERE position = 2 AND goals_against > 53 |
Calculate the average number of current male legislators who chose Democrat from 2000 until 2021. | SELECT CAST(COUNT(T1.bioguide_id) AS REAL) / 22 FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.gender_bio = 'M' AND CAST(T2.start AS DATE) >= 2000 AND CAST(T2.END AS DATE) <= 2021 AND T2.party = 'Democrat' |
Who is the oldest person whose job is student? | SELECT name FROM Person WHERE job = 'student' AND age = (SELECT MAX(age) FROM person WHERE job = 'student') |
How about in CV? | SELECT count ( * ) FROM Documents where Document_Type_Code = "CV" |
What's the smallest track written by dennis linde that's 2:50 minutes long | SELECT MIN(track) FROM table_name_37 WHERE writer_s_ = "dennis linde" AND time = "2:50" |
What is the cardinalatial order of the elector elevated circa 1116? | SELECT cardinalatial_order_and_title FROM table_name_26 WHERE elevated = "circa 1116" |
State the team id which has the highest rank in the list? | select team_id from team order by rank limit 1 |
Return the average, maximum, and minimum budgets in millions for movies made before the year 2000. | SELECT avg(budget_million) , max(budget_million) , min(budget_million) FROM movie WHERE YEAR < 2000 |
Which event names were used more than twice for party events? | SELECT event_name FROM party_events GROUP BY event_name HAVING count(*) > 2 |
What is the name on the Republican ticket when the Socialist ticket was louis waldman? | SELECT republican_ticket FROM table_name_17 WHERE socialist_ticket = "louis waldman" |
Hi! May i ask how many total games were played? | SELECT count ( * ) FROM game |
What is the nationality of th player who's school is Clemson? | SELECT nationality FROM table_15621965_16 WHERE school_club_team = "Clemson" |
What championship had a final score of 6–4, 6–2, 6–2? | SELECT championship FROM table_22839669_1 WHERE score_in_the_final = "6–4, 6–2, 6–2" |
If the aircraft was ussr mig-25 rb how many were destroyed? | SELECT destroyed FROM table_1817852_1 WHERE aircraft = "USSR MiG-25 RB" |
Who were the opponents during game 30? | SELECT opponent FROM table_name_82 WHERE game = 30 |
Name the year for jerry sichting | SELECT year FROM table_name_26 WHERE color_commentator_s_ = "jerry sichting" |
What is the lowest Perigee with a Launch date of 1970-08-26? | SELECT MIN(perigee__km_) FROM table_name_30 WHERE launch_date = "1970-08-26" |
What are the names of the three artists who have produced the most songs, and how many works did they produce? | SELECT T1.artist_name , count(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY count(*) DESC LIMIT 3 |
What is Alice friend name? | SELECT friend from personfriend where name = 'Alice' |
List the state in the US with the most invoices. | SELECT billing_state , COUNT(*) FROM invoices WHERE billing_country = "USA" GROUP BY billing_state ORDER BY COUNT(*) DESC LIMIT 1; |
Please list director IDs who have the quality of at least 3 and have made at least 2 different genres of movies. | SELECT T1.directorid FROM directors AS T1 INNER JOIN movies2directors AS T2 ON T1.directorid = T2.directorid WHERE T1.d_quality >= 3 GROUP BY T1.directorid HAVING COUNT(T2.movieid) >= 2 |
Which team played on April 9? | SELECT team FROM table_27744976_11 WHERE date = "April 9" |
How many services has each resident requested | SELECT T1.resident_id ,count ( * ) FROM Residents AS T1 JOIN Residents_Services AS T2 ON T1.resident_id = T2.resident_id GROUP BY T1.resident_id |
Which Opponent has Attendances of 60,594? | SELECT opponent FROM table_name_34 WHERE attendance = "60,594" |
Who has rank 5? | SELECT name FROM table_name_23 WHERE rank = 5 |
What is the lowest ranking team in Australia? | SELECT MIN(rank) FROM table_name_57 WHERE country = "australia" |
Which city has most population other than its capital in Bangladesh? | SELECT T3.Name FROM country AS T1 INNER JOIN province AS T2 ON T1.Code = T2.Country INNER JOIN city AS T3 ON T3.Province = T2.Name WHERE T1.Name = 'Bangladesh' AND T3.Name <> T1.Capital ORDER BY T3.Population DESC LIMIT 1 |
Could you please find the products with the pages per minute color smaller than 5? | SELECT product FROM product WHERE pages_per_minute_color < 5 |
Show all locations and the number of gas stations in each location ordered by the count. | SELECT LOCATION , count(*) FROM gas_station GROUP BY LOCATION ORDER BY count(*) |
Show different carriers of phones together with the number of phones with each carrier. | SELECT Carrier, COUNT(*) FROM phone GROUP BY Carrier |
What's the voltage for the pentium dual-core e2140? | SELECT voltage FROM table_name_49 WHERE model_number = "pentium dual-core e2140" |
Among the coaches who have served more than 2 NBA teams, during which coach's period of coaching, a team has the least numbers of games lost in the post-season games? | SELECT coachID FROM coaches WHERE lgID = 'NBA' AND post_wins != 0 AND post_losses != 0 AND coachID IN ( SELECT coachID FROM coaches WHERE lgID = 'NBA' GROUP BY coachID HAVING COUNT(tmID) > 2 ) ORDER BY post_losses ASC LIMIT 1 |
Among the students enrolled in UCLA, what is the percentage of male students in the air force department? | SELECT CAST(COUNT(T4.name) AS REAL) * 100 / COUNT(T2.name) FROM enlist AS T1 INNER JOIN person AS T2 ON T1.name = T2.name INNER JOIN enrolled AS T3 ON T3.name = T2.name LEFT JOIN male AS T4 ON T2.name = T4.name WHERE T3.school = 'ucla' AND T1.organ = 'air_force' |
How many Poles have a Class of 125cc, and a Team of matteoni racing team, and Points larger than 3? | SELECT SUM(poles) FROM table_name_39 WHERE class = "125cc" AND team = "matteoni racing team" AND points > 3 |
What ship has a pennant number h05? | SELECT ship FROM table_name_89 WHERE pennant_number = "h05" |
Name the high assists for madison square garden 19,763 and record is 39–38 | SELECT high_assists FROM table_27713583_11 WHERE location_attendance = "Madison Square Garden 19,763" AND record = "39–38" |
What is his address, please? | SELECT address FROM customers WHERE first_name = "Roberto" AND last_name = "Almeida" |
find the code of the country where has the greatest number of players. | SELECT country_code FROM players GROUP BY country_code ORDER BY COUNT(*) DESC LIMIT 1 |
What is the template type descriptions for template type code "AD". | SELECT template_type_description FROM Ref_template_types WHERE template_type_code = "AD" |
what is the position for the competitor that has a score more than 7 | SELECT position FROM table_name_44 WHERE a_score > 7 |
Among the Ivy League Schools, which school have the highest number of Hispanic graduates of all time? | SELECT T1.chronname FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.chronname IN ( 'Brown University', 'Columbia University', 'Cornell University', 'Dartmouth College', 'Harvard University', 'Princeton University', 'University of Pennsylvania', 'Yale University' ) AND T2.race = 'H' GROUP BY T1.chronname ORDER BY SUM(T2.grad_cohort) DESC LIMIT 1 |
how many programs are there? | SELECT count(*) FROM program |
What Shooter has a Total of 28? | SELECT shooter FROM table_name_9 WHERE total = "28" |
How many years did BBC One rank 20th? | SELECT COUNT(year) FROM table_103084_4 WHERE bbc_one_rank = "20th" |
Find the names of all instructors in Comp. Sci. department with salary > 80000. | SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.' AND salary > 80000 |
What's the number of infant mortality in Switzerland in a year? | SELECT T2.Infant_Mortality * T1.Population * T2.Population_Growth FROM country AS T1 INNER JOIN population AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'Switzerland' |
What is the ratio for subscriber to customer given that the starting and the ending stations is 2nd at South Park? | SELECT CAST(SUM(IIF(subscription_type = 'Subscriber', 1, 0)) AS REAL) / SUM(IIF(subscription_type = 'Customer', 1, 0)) FROM trip WHERE start_station_name = '2nd at South Park' AND end_station_name = '2nd at South Park' |
List all the actors who have played characters with "captain" in their names. | SELECT DISTINCT T1.person_name FROM person AS T1 INNER JOIN movie_cast AS T2 ON T1.person_id = T2.person_id WHERE T2.character_name LIKE '%captain%' |
how many district there | SELECT count ( * ) FROM district |
What catalogue has a length of 2:10? | SELECT catalogue FROM table_name_82 WHERE time = "2:10" |
What is the lowest top-5 of the tournament with less than 1 top-10 and less than 1 top-25? | SELECT MIN(top_5) FROM table_name_74 WHERE top_10 < 1 AND top_25 < 1 |
What is the average and maximum age for each pet type? | SELECT avg(pet_age) , max(pet_age) , pettype FROM pets GROUP BY pettype |
Give the total number of all graduated students from a 2-year public schools in Alabama in 2011. | SELECT SUM(T2.grad_cohort) FROM state_sector_details AS T1 INNER JOIN state_sector_grads AS T2 ON T2.stateid = T1.stateid WHERE T1.state = 'Alabama' AND T2.year = 2011 AND T1.level = '2-year' AND T1.control = 'Public' AND T2.race = 'X' |
When did Ismail Qemali Bej's term start? | SELECT term_start FROM table_name_61 WHERE name = "ismail qemali bej" |
what is the place for ireland? | SELECT place FROM table_name_64 WHERE country = "ireland" |
What was the overall score when the score for set 3 is 21–25? | SELECT score FROM table_name_55 WHERE set_3 = "21–25" |
What is the Speed when Construction begun in 2010, and an Expected start of revenue services of 2015? | SELECT speed FROM table_name_3 WHERE construction_begun = "2010" AND expected_start_of_revenue_services = 2015 |
When did South Melbourne play as the home team? | SELECT date FROM table_name_66 WHERE home_team = "south melbourne" |
What was the highest pick for a player from a school or club team of Arkansas? | SELECT MAX(pick) FROM table_name_9 WHERE school_club_team = "arkansas" |
How many fault status codes are recorded in the fault log parts table? | SELECT DISTINCT fault_status FROM Fault_Log_Parts |
Return the distinct name of customers whose order status is Pending, in the order of customer id. | SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = "Pending" ORDER BY T2.customer_id |
How many different female users have rated movies from France? | SELECT COUNT(DISTINCT T2.userid) FROM users AS T1 INNER JOIN u2base AS T2 ON T1.userid = T2.userid INNER JOIN movies AS T3 ON T2.movieid = T3.movieid WHERE T1.u_gender = 'F' AND T3.country = 'France' |
Among the actors who acted in UK movies, what percentage of actors received a rating of at least 3? | SELECT CAST(SUM(IIF(T3.a_quality >= 3, 1, 0)) AS REAL) * 100 / COUNT(T1.movieid) FROM movies AS T1 INNER JOIN movies2actors AS T2 ON T1.movieid = T2.movieid INNER JOIN actors AS T3 ON T2.actorid = T3.actorid WHERE T1.country = 'UK' |
What was the score with a 16–14–6 record? | SELECT score FROM table_name_37 WHERE record = "16–14–6" |
How many different colleges are there? | SELECT count(*) FROM College |
What is the long title of the Shakespeare's work with Act 4 Scene 5 described as "Mytilene. A street before the brothel."? | SELECT T1.LongTitle FROM works AS T1 RIGHT JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Description = 'Mytilene. A street before the brothel.' |
Find the names of catalog entries with level number 8. | SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = "8" |
How many flights were there on 2018/8/1? | SELECT COUNT(*) FROM Airlines WHERE FL_DATE = '2018/8/1' |
Count the number of friends Kyle has. | SELECT count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = "Kyle" |
4tab of commercial broadcaster Radio Tab broadcasts at what frequency? | SELECT frequency FROM table_name_75 WHERE purpose = "commercial" AND on_air_id = "radio tab" AND callsign = "4tab" |
Show the maximum and minimum share count of different transaction types. | SELECT transaction_type_code , max(share_count) , min(share_count) FROM TRANSACTIONS GROUP BY transaction_type_code |
What is the result at match reports? | SELECT result FROM table_name_98 WHERE location = "match reports" |
What is the location for the club trophy? | SELECT location FROM table_name_69 WHERE type = "club trophy" |
What are the names of the movie that was rated by the user between 1/1/2013 to 12/31/2013 by the user who created the list "100 Greatest Living American Filmmakers"? Calculate for the average rating score of those movies in 2013. | SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id INNER JOIN lists AS T3 ON T3.user_id = T1.user_id WHERE T1.rating_timestamp_utc BETWEEN '2013-01-01' AND '2013-12-31' AND T3.list_title = '100 Greatest Living American Filmmakers' |
What is the song name that featured Marcus Temu as the lead supporting vocalist? | SELECT song FROM table_name_12 WHERE lead_supporting_vocal = "marcus temu" |
Decision of parent, and a Home of philadelphia, and a Record of 20–16–7 is on what date? | SELECT date FROM table_name_23 WHERE decision = "parent" AND home = "philadelphia" AND record = "20–16–7" |
Thank you! Can you list the facility codes for each of those apartment IDs (3 4 6 11 12 13 15)? | select T2.facility_code from Apartments as T1 JOIN Apartment_Facilities as T2 ON T1.apt_id = T2.apt_id WHERE T1.bedroom_count > 4 |
What was the average year that Thuppakki movies came out? | SELECT AVG(year) FROM table_name_12 WHERE movie = "thuppakki" |
Name the start with Laps of 199 with qual of 224.838 | SELECT start FROM table_name_13 WHERE laps = 199 AND qual = "224.838" |
Name the most game for w 113–96 (ot) | SELECT MAX(game) FROM table_23281862_10 WHERE score = "W 113–96 (OT)" |
Can you also show me what clubs they are in? | SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.major = "600" GROUP BY t1.clubname |
Among all the employees, how many percent more for the publishers than designers? | SELECT CAST(SUM(CASE WHEN T2.job_desc = 'publisher' THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.job_desc = 'designer' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.job_id) FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id |
Which gender logged in the most to an event in the first 10 days of May 2016? | SELECT T.gender FROM ( SELECT T1.gender, COUNT(T1.device_id) AS num FROM gender_age AS T1 INNER JOIN events_relevant AS T2 ON T1.device_id = T2.device_id WHERE date(T2.timestamp) BETWEEN '2016-05-01' AND '2016-05-10' GROUP BY T1.gender ) AS T ORDER BY T.num DESC LIMIT 1 |
How many communes associated with over 10 cantons and an area (Square km) of 1,589? | SELECT AVG(communes) FROM table_name_83 WHERE cantons > 10 AND area__square_km_ = 1 OFFSET 589 |
Among all the incidents with no arrest made, what is the percentage of them having a generic description of "BATTERY" in the IUCR classification? | SELECT CAST(SUM(CASE WHEN T1.primary_description = 'BATTERY' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*)FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T1.iucr_no = T2.iucr_no WHERE T2.arrest = 'FALSE' |
Which Census Ranking has a Population smaller than 879, and an Area km 2 larger than 537.62? | SELECT census_ranking FROM table_name_36 WHERE population < 879 AND area_km_2 > 537.62 |
How many points did North Melbourne score? | SELECT home_team AS score FROM table_name_12 WHERE home_team = "north melbourne" |
Which team drafted Esa Tikkanen? | SELECT nhl_team FROM table_2679061_4 WHERE player = "Esa Tikkanen" |
how many viewers (m) with overall being 91/101 | SELECT COUNT(viewers__m_) FROM table_13110459_2 WHERE overall = "91/101" |
Which Advisor has most of students? List advisor and the number of students. | SELECT Advisor , count(*) FROM Student GROUP BY Advisor ORDER BY count(Advisor) DESC LIMIT 1; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.