sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Name the coverage area for licesne of hillsboro, west virginia | SELECT coverage_area FROM table_name_25 WHERE city_of_license = "hillsboro, west virginia" |
What are the unique types of player positions in the tryout? | SELECT count(DISTINCT pPos) FROM tryout |
Where is the school whose students are nicknamed Panthers located? | SELECT location FROM table_1971074_1 WHERE nickname = "Panthers" |
What in 2013 has a 2009 of 3r? | SELECT 2013 FROM table_name_29 WHERE 2009 = "3r" |
What is the total number of Ends Won, when Province is "Saskatchewan", and when Stolen Ends is less than 6? | SELECT COUNT(ends_won) FROM table_name_92 WHERE province = "saskatchewan" AND stolen_ends < 6 |
list the course ids available | select course_id from courses |
How many users have "uber" number of fans? | SELECT COUNT(user_id) FROM Users WHERE user_fans LIKE 'Uber' |
which categories fit under the institution calvin college? | SELECT type FROM table_261895_1 WHERE institution = "Calvin College" |
What are the names of the districts that have both mall and village store style shops? | SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = "City Mall" INTERSECT SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = "Village Store" |
What are the names of banks that have loaned money to customers with credit scores below 100? | SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100 |
What players finished 2nd? | SELECT player FROM table_1506950_4 WHERE finish = "2nd" |
Provide the average elevation of the cities with alias Amherst. | SELECT AVG(T2.elevation) FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.alias = 'Amherst' |
How many people attended when the record was broken with 47–63? | SELECT attendance FROM table_name_38 WHERE record = "47–63" |
What is the year that the Roughriders left the conference? | SELECT MAX(year_left) FROM table_name_25 WHERE mascot = "roughriders" |
Who was No. 9 when Ava was No. 4 and Addison was No. 6? | SELECT no_9 FROM table_name_37 WHERE no_4 = "ava" AND no_6 = "addison" |
Show the product ids and the number of unique orders containing each product. | SELECT product_id , count(DISTINCT order_id) FROM Order_items GROUP BY product_id |
What are the details for the paragraph that includes the text 'Korea ' ? | select other_details from paragraphs where paragraph_text like 'korea' |
How many final venues were there in the 1997-98 season? | SELECT COUNT(final_venue) FROM table_19651669_1 WHERE season = "1997-98" |
Who are the members whose hometown address includes Kentucky | Did you want the names of the members whose hometown address includes the word Kentucky? | Yes please give their names. | SELECT Name FROM member WHERE Hometown LIKE "%Kentucky%" |
Does the length of the tip influence the number of likes for hotel and travel business category? | SELECT T3.tip_length, SUM(T3.likes) AS likes FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Tips AS T3 ON T2.business_id = T3.business_id WHERE T1.category_name = 'Hotels & Travel' GROUP BY T3.tip_length |
Who was the home team that played against Aylesbury Vale? | SELECT home_team FROM table_name_37 WHERE away_team = "aylesbury vale" |
What is the country of the airport with the highest elevation? | SELECT country FROM airports ORDER BY elevation DESC LIMIT 1 |
Name the candidates in 1964 | SELECT candidates FROM table_1341586_43 WHERE first_elected = 1964 |
Show names of musicals and the number of actors who have appeared in the musicals. | SELECT T2.Name , COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID |
What are the names of stations that are located in Palo Alto city but have never been the ending point of trips more than 100 times? | SELECT name FROM station WHERE city = "Palo Alto" EXCEPT SELECT end_station_name FROM trip GROUP BY end_station_name HAVING count(*) > 100 |
What's the Call sign with a Frequency MHz thats smaller than 95.9 and an ERP W of 10? | SELECT call_sign FROM table_name_26 WHERE frequency_mhz < 95.9 AND erp_w = 10 |
Check whether Mr. Eduardo Martin is a customer or not? | Great. Which is the first name? | Eduardo. | SELECT * FROM customers WHERE first_name = "Eduardo" AND last_name = "Martins" |
State the birth name of crews who are director and have birth country in South Korea. | SELECT T1.birth_name FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T2.role = 'director' AND T1.birth_country = 'South Korea'; |
What was the nationality of the winner of the 42nd Edition? | SELECT country FROM table_name_90 WHERE edition = "42nd" |
Was the game home or away when the record is 6-12? | SELECT home___away FROM table_name_23 WHERE record = "6-12" |
What is the total when the B Score was 9.15 for Cheng Fei ( chn )? | SELECT AVG(total) FROM table_name_70 WHERE b_score = 9.15 AND gymnast = "cheng fei ( chn )" |
What is the Record for April 13? | SELECT record FROM table_name_14 WHERE date = "april 13" |
What are the names of all people who are friends with Alice for the shortest amount of time? | SELECT name FROM PersonFriend WHERE friend = 'Alice' AND YEAR = (SELECT min(YEAR) FROM PersonFriend WHERE friend = 'Alice') |
What are the names of all the aircrafts associated with London Gatwick airport? | SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Gatwick" |
What team(s) had 120 consecutive starts? | SELECT teams FROM table_28606933_7 WHERE consecutive_starts = 120 |
Show the number of locations. | SELECT count(*) FROM Ref_locations |
what row is the population of Latin America/Caribbean when Asia is 4,894 (46.1%)? | SELECT COUNT(latin_america_caribbean) FROM table_19017269_5 WHERE asia = "4,894 (46.1%)" |
Name the number of first elected for thomas maxwell (j) 60.1% david woodcock (aj) 39.9% | SELECT COUNT(first_elected) FROM table_2668243_17 WHERE candidates = "Thomas Maxwell (J) 60.1% David Woodcock (AJ) 39.9%" |
Find the names of customers who either have an deputy policy or uniformed policy. | SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = "Deputy" OR t1.policy_type_code = "Uniform" |
What City/State did the Atlanta Hawks (retired) team play for? | SELECT city_state FROM table_name_24 WHERE team = "atlanta hawks (retired)" |
When did Final Score of 31-7 happen? | SELECT date FROM table_name_64 WHERE final_score = "31-7" |
Which flag was on the Green Marine's boat? | SELECT flag FROM table_19872699_1 WHERE builder = "Green Marine" |
What is the precise coordinate of the location where simple assault incidents happened the most in Chatham? | SELECT T2.latitude, T2.longitude FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T1.fbi_code_no = T2.fbi_code_no INNER JOIN Community_Area AS T3 ON T2.community_area_no = T3.community_area_no WHERE T1.title = 'Simple Assault' AND T3.community_area_name = 'Chatham' AND T3.community_area_no = 44 ORDER BY T2.latitude DESC, T2.longitude DESC LIMIT 1 |
Hello, can you please provide me with a list of all Event IDs and Event names? | SELECT event_id, event_name from party_events |
What is the average number of bedrooms of all apartments? | SELECT avg(bedroom_count) FROM Apartments |
Return the names of entrepreneurs do no not have the investor Rachel Elnaugh. | SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor != "Rachel Elnaugh" |
How many people are in the staff? | SELECT count ( * ) from staff |
What is the number eliminated for the person with a time of 12:38? | SELECT eliminated AS by FROM table_name_15 WHERE time = "12:38" |
What is the earliest game against Orlando? | SELECT MIN(game) FROM table_name_57 WHERE team = "orlando" |
what is the name id of the person with the longest laptime? | Do you mean driver id? | yes | SELECT T1.driverid FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds DESC LIMIT 1 |
When the status is rural community what's the lowest area in kilometers squared? | SELECT MIN(area_km_2) FROM table_name_47 WHERE status = "rural community" |
What is the record of the game on February 25, 2008? | SELECT record FROM table_name_59 WHERE date = "february 25, 2008" |
What is the earliest year? | SELECT MIN(year) FROM table_2127933_3 |
Who is the "Next-Door Bike Store" point of contact? | SELECT T1.Name FROM ContactType AS T1 INNER JOIN BusinessEntityContact AS T2 ON T1.ContactTypeID = T2.ContactTypeID INNER JOIN Store AS T3 ON T2.BusinessEntityID = T3.BusinessEntityID WHERE T3.Name = 'Next-Door Bike Store' |
What was team 2 when team 1 was omonia? | SELECT team_2 FROM table_name_9 WHERE team_1 = "omonia" |
Which supercharger gear ratio has a Octane rating of 68? | SELECT supercharger_gear_ratio FROM table_name_22 WHERE octane_rating = "68" |
Return the cell phone number and email address for all students. | SELECT cell_mobile_number, email_address FROM STUDENTS |
Show each apartment type code, and the maximum and minimum number of rooms for each type. | SELECT apt_type_code , max(room_count) , min(room_count) FROM Apartments GROUP BY apt_type_code |
Pick 5 clients with 0 priority and write down their last name. | SELECT T1.last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.priority = 0 LIMIT 5 |
How many gas companies are there? | SELECT count(*) FROM company |
Find the first name and office of the professor who is in the history department and has a Ph.D. degree. | SELECT T1.emp_fname , T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T3.dept_code = T2.dept_code WHERE T3.dept_name = 'History' AND T2.prof_high_degree = 'Ph.D.' |
What is the strongs # for the english spelling of the word jirmejah? | SELECT strongs__number FROM table_1242447_2 WHERE english_spelling = "Jirmejah" |
What league has 2-3 as the away? | SELECT league FROM table_name_18 WHERE away = "2-3" |
how many journalist there | SELECT count ( * ) FROM journalist |
What is Maksim Botin's position? | SELECT position FROM table_14038363_1 WHERE player = "Maksim Botin" |
What is the highest wins entry with fewer than 51 goals, more than 39 points, and a goal difference smaller than 13? | SELECT MAX(wins) FROM table_name_74 WHERE goals_against < 51 AND points > 39 AND goal_difference < 13 |
What percentage of players have Legbreak skill? | SELECT CAST(SUM(CASE WHEN T2.Bowling_skill = ' Legbreak' THEN 1 ELSE 0 END) AS REAL) * 100 / TOTAL(T1.Player_Id) FROM Player AS T1 INNER JOIN Bowling_Style AS T2 ON T1.Bowling_skill = T2.Bowling_Id |
List out projects which has staff for researcher role ? | SELECT project_id FROM Project_Staff WHERE role_code = 'researcher' |
What is the list of school locations sorted in descending order of school foundation year? | SELECT LOCATION FROM school ORDER BY Founded DESC |
Name the segment 1 for episode # 2/225 | SELECT segment_1 FROM table_24172078_2 WHERE episode__number = "2/225" |
What are the names , themes , and number of singers for every concert ? | select t2.concert_name , t2.theme , count(*) from singer_in_concert as t1 join concert as t2 on t1.concert_id = t2.concert_id group by t2.concert_id |
If the total number of seats is under 144, and the seats won is 32, which election is this? | SELECT election FROM table_name_37 WHERE total_seats < 144 AND seats = 32 |
Show the name and description of the role played by the employee named Ebba. | SELECT T2.role_name , T2.role_description FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T1.employee_name = "Ebba" |
What is the lyric fm for rnag 93.2? | SELECT lyric_fm__mhz_ FROM table_18475946_2 WHERE rnag__mhz_ = "93.2" |
What is the percentage ration of customers to subscribers that started their trips within the city of San Francisco? | SELECT CAST(SUM(CASE WHEN T1.subscription_type = 'Customer' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN T1.subscription_type = 'Subscriber' THEN 1 ELSE 0 END) FROM trip AS T1 LEFT JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T2.city = 'San Francisco' |
how many departments are there? | SELECT count ( * ) FROM department |
Which season's winner is Panathinaikos and is located in Athens? | SELECT season FROM table_name_33 WHERE location = "athens" AND winners = "panathinaikos" |
Name the 2nd m for gregor schlierenzauer | SELECT 2 AS nd__m_ FROM table_14407512_24 WHERE name = "Gregor Schlierenzauer" |
Find the names of the trains that do not pass any station located in London. | SELECT T2.name FROM train_station AS T1 JOIN train AS T2 ON T1.train_id = T2.train_id WHERE T1.station_id NOT IN (SELECT T4.station_id FROM train_station AS T3 JOIN station AS T4 ON T3.station_id = T4.station_id WHERE t4.location = "London") |
What was the original name of the restaurant located in Orillia, ON? | SELECT original_name FROM table_name_50 WHERE location = "orillia, on" |
Lee Trevino of the United States with a total greater than 294 had what To par? | SELECT to_par FROM table_name_73 WHERE total > 294 AND country = "united states" AND player = "lee trevino" |
How many years did John Player Lotus used Cosworth v8? | SELECT SUM(year) FROM table_name_3 WHERE engine = "cosworth v8" AND entrant = "john player lotus" |
What is the sum of total values for Rd 7 less than 8? | SELECT SUM(total) FROM table_name_53 WHERE rd_7 < 8 |
Name the runs conceded where overs bowled is 53 | SELECT COUNT(runs_conceded) FROM table_15700367_2 WHERE overs_bowled = "53" |
Who was the vistiting team in the game with the final score of 7-13? | SELECT visiting_team FROM table_name_3 WHERE final_score = "7-13" |
Can you list the awards of the musical nominee "Cleavant Derricks"? | SELECT DISTINCT Award FROM musical WHERE Nominee = "Cleavant Derricks" |
Name the men doubles for caroline persyn smids | SELECT men_doubles FROM table_14903355_2 WHERE womens_doubles = "Caroline Persyn Smids" |
Find the claim id and the number of settlements made for the claim with the most recent settlement date. | SELECT count(*) , T1.claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id ORDER BY T1.Date_Claim_Settled DESC LIMIT 1 |
List all directors along with the number of films directed by each director. | SELECT directed_by , count(*) FROM film GROUP BY directed_by |
What is the home team's score when the away team is south melbourne? | SELECT home_team AS score FROM table_name_12 WHERE away_team = "south melbourne" |
Please provide the number of stars that the repository of the solution 20 have. | SELECT T1.Stars FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Id = 20 |
How many events were there on 30th April, 2016? | SELECT COUNT(event_id) FROM events WHERE SUBSTR(`timestamp`, 1, 10) = '2016-04-30' |
how many students there | SELECT count ( * ) from student |
For the order paying the highest freight, how many kinds of products does it contain? | SELECT COUNT(T2.ProductID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID WHERE T1.Freight = ( SELECT MAX(Freight) FROM Orders ) GROUP BY T1.OrderID |
How many attended the game with north melbourne as the away side? | SELECT COUNT(crowd) FROM table_name_99 WHERE away_team = "north melbourne" |
What are the corresponding classes for the "very large bike" attribute? | SELECT ATT_CLASS_ID FROM ATT_CLASSES WHERE ATT_CLASS = 'very large' |
What is the total of Bronze with a total smaller than 3, and a nation of Poland, and a rank larger than 4? | SELECT COUNT(bronze) FROM table_name_52 WHERE total < 3 AND nation = "poland" AND rank > 4 |
Please show the different statuses, ordered by the number of cities that have each. | SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC |
Which pick came from Pittsburgh? | SELECT COUNT(pick) FROM table_name_60 WHERE college = "pittsburgh" |
How many of the episodes in the top 50 rankings were originally aired on June 28, 2010? | SELECT COUNT(top_50_ranking) FROM table_22170495_7 WHERE original_airing = "June 28, 2010" |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.