sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Name the number of dates for alouettes | SELECT COUNT(date) FROM table_24126518_2 WHERE opponent = "Alouettes" |
For each city, return the highest latitude among its stations. | SELECT city , max(lat) FROM station GROUP BY city |
What is the job position of the oldest employee? | SELECT T2.PersonType FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID ORDER BY T1.BirthDate ASC LIMIT 1 |
How many votes did Jeannemarie Devolites Davis get in 1995-Special? | SELECT votes FROM table_name_90 WHERE opponent = "jeannemarie devolites davis" AND year = "1995-special" |
Find the email and phone number of the customers who have never filed a complaint before. | SELECT email_address , phone_number FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM complaints) |
Which Can Yayınları has a Güzelçamlı’nin Kayıp Panteri of çevreci peri? | SELECT can_yayınları FROM table_name_39 WHERE güzelçamlı’nin_kayıp_panteri = "çevreci peri" |
What are the names and year of joining for artists that do not have the country "United States"? | SELECT name , year_join FROM artist WHERE country != 'United States' |
What is the record of the game before week 5 and a bye game site? | SELECT record FROM table_name_54 WHERE week < 5 AND game_site = "bye" |
Find the ids of the students who participate in Canoeing and Kayaking. | SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Canoeing' INTERSECT SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Kayaking' |
What year was Frank Annunzio elected | SELECT MIN(first_elected) FROM table_1341663_14 WHERE incumbent = "Frank Annunzio" |
How many transactions correspond to each invoice number? | SELECT invoice_number , count(*) FROM Financial_transactions GROUP BY invoice_number |
What is the average rating of all movies reviewed by Brittany Harris. | SELECT avg ( T1.stars ) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T2.name = "Brittany Harris" |
What is the title of the episode that had 9.76 million U.S. viewers? | SELECT title FROM table_22181917_2 WHERE us_viewers__millions_ = "9.76" |
What is the reverse when the £1 fraction is 1/480? | SELECT reverse FROM table_1682865_1 WHERE £1_fraction = "1/480" |
Which season is the wicket 2nd partnership in? | SELECT season FROM table_name_41 WHERE wicket_partnership = "2nd" |
Which title was directed by chuck jones and released on 1958-04-12? | SELECT title FROM table_name_56 WHERE director = "chuck jones" AND release_date = "1958-04-12" |
Who were the guests for the episode with an original airdate of december 07? | SELECT guest FROM table_25691838_12 WHERE original_airdate = "December 07" |
State the number of users who are under 50 and above 20 use device model of Galaxy Premier. | SELECT COUNT(T1.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.age BETWEEN 20 AND 50 AND T2.device_model = 'Galaxy Premier' |
What is the total number of squad no when there are more than 8 points, Danny Mcguire is a player, and there are more than 0 goals? | SELECT SUM(squad_no) FROM table_name_23 WHERE points > 8 AND player = "danny mcguire" AND goals > 0 |
Can you provide me with a list of all of the names of the races? | SELECT name FROM races |
and can you please also give me the project details? | SELECT T1.project_details , T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY count ( * ) DESC LIMIT 1 |
For each reviewer id, what is the title and rating for the movie with the smallest rating? | SELECT T2.title , T1.rID , T1.stars , min(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.rID |
what is the total number of record where streak is l2 and leading scorer is roy : 23 | SELECT COUNT(record) FROM table_11964047_5 WHERE streak = "L2" AND leading_scorer = "Roy : 23" |
Avg/G that has a GP-GS of 13–13, and a Effic smaller than 114.23 has what total of numbers? | SELECT COUNT(avg_g) FROM table_name_82 WHERE gp_gs = "13–13" AND effic < 114.23 |
Can you tell me the Chassis that has the Points of 13, and the Year of 1975, and the Entrant of scuderia citta del mille? | SELECT chassis FROM table_name_5 WHERE points = 13 AND year = 1975 AND entrant = "scuderia citta del mille" |
Which Country has a Player of arjun atwal? | SELECT country FROM table_name_19 WHERE player = "arjun atwal" |
Find the number of visitors who did not visit any museum opened after 2010. | SELECT count(*) FROM visitor WHERE id NOT IN (SELECT t2.visitor_id FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID = t2.Museum_ID WHERE t1.open_year > 2010) |
What are the booking start and end dates of the apartments with more than 2 bedrooms ? | SELECT T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2 |
How many contestants were there in a season where alejandra espinoza won? | SELECT COUNT(number_of_contestants) FROM table_name_65 WHERE winner = "alejandra espinoza" |
what is the highest saving balance? | select max ( balance ) from savings |
Who was the home team when the venue was Junction Oval? | SELECT home_team FROM table_name_82 WHERE venue = "junction oval" |
How old was Mr. Stacy Morar at the time of his first emergency room admission due to a drug overdose? | SELECT T2.DATE - T1.birthdate AS age FROM patients AS T1 INNER JOIN encounters AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Stacy' AND T1.last = 'Morar' AND T2.DESCRIPTION = 'Emergency Room Admission' AND T2.REASONDESCRIPTION = 'Drug overdose' ORDER BY T2.DATE LIMIT 1 |
List the name and population of the communities where more than average solicit for prostitutes were reported. | SELECT T2.community_area_name, T2.population FROM Crime AS T1 INNER JOIN Community_Area AS T2 ON T2.community_area_no = T1.community_area_no INNER JOIN IUCR AS T3 ON T3.iucr_no = T1.iucr_no WHERE T3.iucr_no = ( SELECT iucr_no FROM IUCR WHERE secondary_description = 'SOLICIT FOR PROSTITUTE' GROUP BY iucr_no HAVING COUNT(iucr_no) > ( SELECT SUM(CASE WHEN secondary_description = 'SOLICIT FOR PROSTITUTE' THEN 1.0 ELSE 0 END) / COUNT(iucr_no) AS average FROM IUCR ) ) |
What are the contestant numbers and names of the contestants who had at least two votes? | SELECT T1.contestant_number , T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number GROUP BY T1.contestant_number HAVING count(*) >= 2 |
What was the Tyre for the German Grand Prix? | SELECT tyre FROM table_name_27 WHERE race = "german grand prix" |
For all reviews with the worst rating, state the podcast title as well as the review title and content. | SELECT DISTINCT T1.title, T2.title, T2.content FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.rating = 1 |
Provide the facebook ID of the facebook account named "RepWilson". | SELECT facebook_id FROM `social-media` WHERE facebook = 'RepWilson' |
Show the draft pick numbers and draft classes of players whose positions are defenders. | SELECT Draft_Pick_Number , Draft_Class FROM match_season WHERE POSITION = "Defender" |
Which Pick has the College named Far Eastern / PSBA? | SELECT pick FROM table_name_68 WHERE college = "far eastern / psba" |
What is the foot per second speed where time to feet ratio is 9.2 at 25 degrees? | SELECT m_v_ft_s FROM table_16439764_1 WHERE time_to_ft__m__at_25°__seconds_ = "9.2" |
What is the 2009 for 2012 1R in Wimbledon and a 2011 2r? | SELECT 2009 FROM table_name_77 WHERE 2012 = "1r" AND tournament = "wimbledon" AND 2011 = "2r" |
List the grape, winery and year of the wines whose price is bigger than 100 ordered by year. | SELECT Grape , Winery , YEAR FROM WINE WHERE Price > 100 ORDER BY YEAR |
What was the most recent associated invoice date for Lucas Mancini? | SELECT T2.invoice_date FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = "Lucas" AND T1.last_name = "Mancini" ORDER BY t2.invoice_date DESC LIMIT 1 |
who are the writer of the series episode number 170? | SELECT written_by FROM table_22580855_1 WHERE series_no = 170 |
What location did Anke Huber win the championship? | SELECT location FROM table_name_68 WHERE champion = "anke huber" |
Return the color code and description for the product with the name 'chervil'. | SELECT t1.color_code , t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = "chervil" |
Which opponent has a Score of 15.4.94? | SELECT opponent FROM table_name_89 WHERE score = "15.4.94" |
What city and state is the bank with the name morningside in? | SELECT city , state FROM bank WHERE bname = 'morningside' |
Can you tell me the average Chapter that has Articles smaller than 15? | SELECT AVG(chapter) FROM table_name_48 WHERE articles < 15 |
What is the zip code of staff with first name as Janessa and last name as Sawayn? | SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn"; |
How many points were scored when the record was 6-8-6? | SELECT COUNT(points) FROM table_17360840_5 WHERE record = "6-8-6" |
Name the D46 when it has D 44 of ← majority | SELECT d_46 FROM table_name_50 WHERE d_44 = "← majority" |
How many players and coaches are awarded after death? | SELECT COUNT(note) FROM AwardsMisc WHERE note IS NOT NULL |
List the forename and surname of all distinct drivers who once had laptime less than 93000 milliseconds? | SELECT DISTINCT T1.forename , T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000 |
Find the name of the department that offers the highest total credits? | SELECT dept_name FROM course GROUP BY dept_name ORDER BY sum(credits) DESC LIMIT 1 |
What is the velocity of the pilot named 'Thompson'? | SELECT AVG(velocity) FROM flight WHERE pilot = 'Thompson' |
What is the marketing region code that has the most drama workshop groups? | SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code ORDER BY count(*) DESC LIMIT 1 |
What is the highest when pohang steelers is the team? | SELECT highest FROM table_21824695_8 WHERE team = "Pohang Steelers" |
What country has a silver medal in the boxing, heavyweight event? | SELECT country FROM table_name_77 WHERE medal = "silver" AND event = "boxing, heavyweight" |
How many won the Men's Open if the players are from Sweden? | SELECT COUNT(mens_open) FROM table_182298_5 WHERE country = "Sweden" |
Who plays on the date september 29? | SELECT opponent FROM table_name_48 WHERE date = "september 29" |
What are the maximum and minimum week on top of all volumes? | SELECT MAX(Weeks_on_Top), MIN(Weeks_on_Top) FROM volume |
How many origins have titles of Samoan cricket bats? | SELECT COUNT(origin) FROM table_29635868_1 WHERE title_ & _link_to_episode_on_youtube = "Samoan Cricket Bats" |
What information do you have on colleges sorted by increasing enrollment numbers? | SELECT * FROM College ORDER BY enr |
How many years has there been a competition in Helsinki? | SELECT COUNT(year) FROM table_name_78 WHERE location = "helsinki" |
which sport has most number of students on scholarship? | SELECT sportname FROM Sportsinfo WHERE onscholarship = "Y" GROUP BY sportname ORDER BY count ( * ) DESC LIMIT 1 |
Name the class when position is rt | SELECT class FROM table_14624447_39 WHERE position = "RT" |
Which Title is from 1952? | SELECT title FROM table_name_6 WHERE year = 1952 |
Find the name and category of the most expensive product. | SELECT product_name , product_category_code FROM products ORDER BY product_price DESC LIMIT 1 |
Which of the films released in 2006 was the most popular among Mubi users? | SELECT movie_title FROM movies WHERE movie_release_year = 2006 ORDER BY movie_popularity DESC LIMIT 1 |
How many movies were released between 1937 and 1950? | SELECT COUNT(movie_title) FROM characters WHERE SUBSTR(release_date, LENGTH(release_date) - 1, LENGTH(release_date)) BETWEEN '37' AND '50' |
How about the end date, please? | SELECT Policy_Type_Code,Start_Date,End_Date FROM policies where Customer_ID = 380 |
Thanks! Can you update this list to show both the city name and state associated with each of these customers? | select t1.customer_id, t3.city, t3.state_province_county 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' |
What is the feature type name of feature AirCon? | SELECT T2.feature_type_name FROM Other_Available_Features AS T1 JOIN Ref_Feature_Types AS T2 ON T1.feature_type_code = T2.feature_type_code WHERE T1.feature_name = "AirCon" |
Which model was made from 2001–2004, with a Torque of n·m (lb·ft) @ 3750, and an Engine code of n42b18 / n46b18? | SELECT model FROM table_name_72 WHERE years = "2001–2004" AND torque = "n·m (lb·ft) @ 3750" AND engine_code = "n42b18 / n46b18" |
What is the lowest number of losses a goalkeeper with more than 2776 minutes had? | SELECT MIN(loses) FROM table_name_54 WHERE minutes > 2776 |
Provide the ID of 1C Company. | SELECT T.id FROM publisher AS T WHERE T.publisher_name = '1C Company' |
Show all cities without a branch having more than 100 memberships. | SELECT city FROM branch EXCEPT SELECT city FROM branch WHERE membership_amount > 100 |
What are the average prominence of the mountains in country 'Morocco'? | SELECT avg(prominence) FROM mountain WHERE country = 'Morocco' |
What is the name of the subject who ran in the general election for Queen Anne's County State's Attorney? | SELECT subject FROM table_name_63 WHERE election = "general" AND office = "queen anne's county state's attorney" |
who is the home team when the away team is bolton wanderers? | SELECT home_team FROM table_name_12 WHERE away_team = "bolton wanderers" |
Name the average clean and jerk for snatch of 140 and total kg less than 315 | SELECT AVG(clean_) & _jerk FROM table_name_10 WHERE snatch = 140 AND total__kg_ < 315 |
What is the complete description of the researcher role. | SELECT role_description FROM Staff_Roles WHERE role_code = 'researcher' |
What Player has a To par of +1 and a Score of 73-71-71=217? | SELECT player FROM table_name_24 WHERE to_par = "+1" AND score = 73 - 71 - 71 = 217 |
How many states that have some college students playing in the mid position but not in the goalie position. | SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie') |
Who was Canada's lead? | SELECT lead FROM table_name_76 WHERE country = "canada" |
Show names of technicians and the number of machines they are assigned to repair. | SELECT T2.Name , COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID = T2.technician_ID GROUP BY T2.Name |
What is Website, when Last Release is 2009-08-09, 1.2.9? | SELECT website FROM table_name_25 WHERE last_release = "2009-08-09, 1.2.9" |
How many party classifications are there for the senator from Canton? | SELECT party FROM table_26129220_2 WHERE residence = "Canton" |
What is the highest Super G that had an 11 Downhill and an overall less than 16? | SELECT MAX(super_g) FROM table_name_6 WHERE downhill = "11" AND overall < 16 |
Calculate the percentage of legislators who are Senator and were born in 1964. | SELECT CAST(SUM(CASE WHEN T2.class IS NOT NULL THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.birthday_bio LIKE '%1964%' |
How many top-25s are associated with more than 91 events? | SELECT SUM(top_25) FROM table_name_24 WHERE events > 91 |
Which company falls under the category of an associated member? Please provide the organization's full name. | SELECT NAME FROM organization WHERE country IN ( SELECT country FROM politics WHERE dependent != '' ) |
What is the theme for these cities? | The themes of competitions with host cities having populations larger than 1000 are Carnival M is back!, Codehunters, and MTV Asia Aid | Which cities have populations less than 1000? List their ids. | SELECT DISTINCT T1.CITY_ID FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population < 1000 |
Where was the game held that was played on 2002-03-07? | SELECT venue FROM table_name_36 WHERE date = "2002-03-07" |
Which country published the least papers? | SELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.country ORDER BY count ( * ) LIMIT 1 |
Who wrote the episode with the production code of 942A? | SELECT written_by FROM table_16432167_1 WHERE production_code = "942A" |
What is the name of all the people who are older than at least one engineer? Order them by age. | SELECT name FROM Person WHERE age > (SELECT min(age) FROM person WHERE job = 'engineer') ORDER BY age |
What was the away team that played at Princes Park? | SELECT away_team FROM table_name_97 WHERE venue = "princes park" |
What is the competition on 23 February 1929? | SELECT competition FROM table_name_27 WHERE date = "23 february 1929" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.