sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Name the number of cfl teams for jeff traversy | SELECT COUNT(cfl_team) FROM table_28059992_2 WHERE player = "Jeff Traversy" |
Show the ministers and the time they took and left office, listed by the time they left office. | SELECT minister , took_office , left_office FROM party ORDER BY left_office |
Give the name of the business which met all the required standards during the unscheduled routine inspection on 2016/9/28. | SELECT T2.name FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.score = 100 AND T1.`date` = '2016-09-28' AND T1.type = 'Routine - Unscheduled' |
Which game has a high rebound of Evans (7) and a high assist of Evans, Ollie (3)? | SELECT MAX(game) FROM table_name_11 WHERE high_rebounds = "evans (7)" AND high_assists = "evans, ollie (3)" |
actually i mean how many product are on the table | Did you mean to ask for the distinct number of product ids in the table Products_Booked? | exactly | SELECT COUNT ( DISTINCT product_id ) FROM Products_Booked |
WHAT ARE THE SEATS IN Hamburgische Bürgerschaft WITH THE NAME alliance '90/the greens? | SELECT seats_in_hamburgische_bürgerschaft FROM table_name_57 WHERE name__english_ = "alliance '90/the greens" |
Who is the entrant when the chassis is ferrari 125? | SELECT entrant FROM table_name_88 WHERE chassis = "ferrari 125" |
What is the highest numbered grid for piercarlo ghinzani with over 3 laps? | SELECT MAX(grid) FROM table_name_80 WHERE driver = "piercarlo ghinzani" AND laps > 3 |
What is the D43 associated with a D41 of r 21? | SELECT d_43 FROM table_name_44 WHERE d_41 = "r 21" |
What venue was the tour match against eastern province played at with more than 0 against? | SELECT venue FROM table_name_31 WHERE status = "tour match" AND against > 0 AND opposing_team = "eastern province" |
List the dates of enrollment and completion of the student with family name "Zieme" and personal name "Bernie". | SELECT T1.date_of_enrolment , T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.family_name = "Zieme" AND T2.personal_name = "Bernie" |
Can you find the first and last names of all people who paid less than the rooms' base prices? | SELECT T1.firstname , T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T1.Rate - T2.basePrice < 0 |
What is the phone number of the customer who owns the credit card of number 6011179359005380? | SELECT DISTINCT T1.PhoneNumber FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.CreditCardNumber = 6011179359005382 |
What was the lowest re-elected result for Sylvester C. Smith? | SELECT MIN(first_elected) FROM table_name_47 WHERE result = "re-elected" AND incumbent = "sylvester c. smith" |
Can you list the color code that has a color description of 'white'? | select color_code from Ref_Colors where color_description = 'white' |
What rank was the team from Australia? | SELECT COUNT(rank) FROM table_name_77 WHERE country = "australia" |
Tally the email addresses and phone numbers of customers from Sacramento who gave a star rating of more than 3 in 2014. | SELECT DISTINCT T1.Email, T1.PhoneNumber FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.StarRating > 3 AND T1.City = 'Sacramento' AND T2.ReviewDate BETWEEN '2014-01-01' AND '2014-12-31' |
Name the landesliga mitte for fc gundelfingen and vfl frohnlach | SELECT landesliga_mitte FROM table_20181270_3 WHERE landesliga_süd = "FC Gundelfingen" AND landesliga_nord = "VfL Frohnlach" |
Which Runner-up has a Last win smaller than 1998, and Wins of 1, and a Rank larger than 13? | SELECT COUNT(runner_up) FROM table_name_71 WHERE last_win < 1998 AND wins = 1 AND rank > 13 |
What is the most popular file format? | SELECT formats FROM files GROUP BY formats ORDER BY COUNT (*) DESC LIMIT 1 |
Could you tell me the name of the customer that made the order that had the largest quantity of items in it? | SELECT t1.customer_name 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 ) |
What county has a school mascot of the Pioneers? | SELECT county FROM table_name_71 WHERE mascot = "pioneers" |
Which language does the film AIRPORT POLLOCK use? List the language name. | SELECT T2.name FROM film AS T1 JOIN LANGUAGE AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'AIRPORT POLLOCK' |
What is Surface, when Edition is 2012, and when Outcome is Winner? | SELECT surface FROM table_name_51 WHERE edition = 2012 AND outcome = "winner" |
what is the iata for malta international airport? | SELECT iata FROM table_name_89 WHERE airport = "malta international airport" |
What is the average attendance for all events held at Palmerston Park venue? | SELECT AVG(attendance) FROM table_name_24 WHERE venue = "palmerston park" |
What's the target of the antibody rituximab? | SELECT target FROM table_name_90 WHERE antibody = "rituximab" |
Who was the winner of binibining pilipinas-International wheh Gionna Cabrera won Miss Universe Philippines? | SELECT binibining_pilipinas_international FROM table_1825751_4 WHERE miss_universe_philippines = "Gionna Cabrera" |
Which biwords pair has a higher occurrence, "àbac-xinès" or "àbac-grec"? | SELECT CASE WHEN ( SELECT occurrences FROM biwords WHERE w1st = ( SELECT wid FROM words WHERE word = 'àbac' ) AND w2nd = ( SELECT wid FROM words WHERE word = 'xinès' ) ) > ( SELECT occurrences FROM biwords WHERE w1st = ( SELECT wid FROM words WHERE word = 'àbac' ) AND w2nd = ( SELECT wid FROM words WHERE word = 'grec' ) ) THEN 'àbac-xinès' ELSE 'àbac-grec' END AS CALUS FROM words LIMIT 1 |
What is the number of unemployed and bankrupt students? | SELECT COUNT(T1.name) FROM unemployed AS T1 INNER JOIN filed_for_bankrupcy AS T2 ON T1.name = T2.name |
Who are the authors for the malasaurus of the vyazniki assemblage? | SELECT authors FROM table_name_16 WHERE unit = "vyazniki assemblage" AND name = "malasaurus" |
When was Glassfish released? | SELECT release_date FROM table_name_15 WHERE product = "glassfish" |
What are the names of all the clubs ordered in descending alphabetical order? | SELECT name FROM club ORDER BY name DESC |
* I have left the chat * | select distinct rid from routes where alid = '410' |
What was the incident in imam sahib area, kunduz province? | SELECT nature_of_incident FROM table_name_99 WHERE location = "imam sahib area, kunduz province" |
Among the menu pages on which the dish "Paysanne Soup" had appeared, how many of them had a stable price for the dish? | SELECT SUM(CASE WHEN T1.name = 'Paysanne Soup' THEN 1 ELSE 0 END) FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.highest_price IS NULL |
What is the least number of people to attend a game when Los Angeles was the home team? | SELECT MIN(attendance) FROM table_name_97 WHERE home = "los angeles" |
What year was the institution of St. Catharine College founded? | SELECT MIN(founded) FROM table_262534_2 WHERE institution = "St. Catharine College" |
Where did Footscray play as the away team? | SELECT venue FROM table_name_27 WHERE away_team = "footscray" |
What is the total number of against when they had 14 losses and more than 0 byes? | SELECT SUM(against) FROM table_name_34 WHERE losses = 14 AND byes > 0 |
How many students are enrolled in Chinese Painting? | select count ( * ) from Student_Course_Enrolment AS T1 JOIN Courses AS T2 ON T2.course_id = T1.course_id WHERE course_name = 'Chinese Painting' |
Show the first names and last names of customers without any account. | SELECT customer_first_name , customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id |
what is the name of the swimmer id 4? | SELECT name FROM swimmer where id = 4 |
Which country has the widest range of religious practices? | SELECT T1.Name FROM country AS T1 INNER JOIN religion AS T2 ON T1.Code = T2.Country GROUP BY T1.Name ORDER BY COUNT(DISTINCT T2.Name) DESC LIMIT 1 |
What are the number of different course codes? | SELECT count(DISTINCT crs_code) FROM CLASS |
What Weblink has a College or Campus Name of anna university college of engineering kanchipuram? | SELECT weblink FROM table_name_85 WHERE college_or_campus_name = "anna university college of engineering kanchipuram" |
Count the number of parties. | SELECT count(*) FROM party |
What is the total amount purchased of those? | SELECT T1.supplier_id,T1.total_amount_purchased FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T2.product_name = 'red jeans' |
How many accounts have a savings balance above the average savings balance? | SELECT count(*) FROM savings WHERE balance > (SELECT avg(balance) FROM savings) |
What are the names of the people who have no friends who are students? | SELECT name FROM person EXCEPT SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.job = 'student' |
Name the number of population density 2010 for duque de caxias | SELECT COUNT(population_density_2010___km²_) FROM table_14986292_1 WHERE administrative_division = "Duque de Caxias" |
What school has a county of 69 ripley? | SELECT school FROM table_name_74 WHERE county = "69 ripley" |
Count the number of products with the 'hot' charactersitic. | SELECT count(*) 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 WHERE t3.characteristic_name = "hot" |
What is the end (UTC) if the duration is 6 hours, 55 minutes? | SELECT end__utc_ FROM table_22385461_8 WHERE duration = "6 hours, 55 minutes" |
How many credits is Care and Feeding of Cats? | SELECT credits FROM course WHERE title = 'Care and Feeding of Cats' |
What are the names of all tracks that belong to the Rock genre and whose media type is MPEG? | SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "Rock" OR T3.name = "MPEG audio file"; |
Who is the youngest employee in the company? List employee's first and last name. | SELECT first_name , last_name FROM employees ORDER BY birth_date DESC LIMIT 1; |
What is the valvetrain with an engine model that is engine model? | SELECT valvetrain FROM table_name_94 WHERE "engine_model" = "engine_model" |
Find the title and star rating of the movie that got the least rating star for each reviewer. | 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 |
Who was the opponent at the qf(r) round? | SELECT opponent FROM table_name_9 WHERE round = "qf(r)" |
Sort the list of names and costs of all procedures in the descending order of cost. | SELECT name , cost FROM procedures ORDER BY cost DESC |
What is the Wavelength of Frequency (MHz) 14.050–14.150? | SELECT wavelength FROM table_name_53 WHERE frequency__mhz_ = "14.050–14.150" |
Show theme and year for all exhibitions with ticket prices lower than 15. | SELECT theme , YEAR FROM exhibition WHERE ticket_price < 15 |
Return the name of the heaviest entrepreneur. | SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1 |
Which Player has a Round smaller than 11, and a Pick smaller than 152, and a Position of guard? | SELECT player FROM table_name_10 WHERE round < 11 AND pick < 152 AND position = "guard" |
On what date was god & guns released? | SELECT date_of_release FROM table_name_15 WHERE title = "god & guns" |
what is the name of the policy types used by more than 2 customers? | SELECT policy_type_code FROM policies GROUP BY policy_type_code HAVING count ( * ) > 2 |
Which NBA team that didn't play in playoffs had the most winning rate in the 2000 NBA regular season? | SELECT T2.tmID FROM players_teams AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.PostGP = 0 AND T1.year = 2000 ORDER BY CAST(T2.won AS REAL) / (T2.won + T2.lost) DESC LIMIT 1 |
If the round of 16 was yulius fernando ( ina ) l pts 5-6, what was the semifinals? | SELECT semifinals FROM table_26335424_86 WHERE round_of_16 = "Yulius Fernando ( INA ) L PTS 5-6" |
How many additional timers were born in USA? | SELECT COUNT(*) FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T2.role = 'additional timer' AND T1.birth_country = 'USA'; |
What is the capacity of 3500v volts? | SELECT capacity FROM table_name_4 WHERE volts = "3500v" |
Which class from 1928 had a class to 1928 of BDi-21? | SELECT class_from_1928 FROM table_name_88 WHERE class_to_1928 = "bdi-21" |
What was the result on October 8, 1985? | SELECT result FROM table_name_58 WHERE date = "october 8, 1985" |
what is the lowest week when the date is september 16, 1979 and the attendance less than 54,212? | SELECT MIN(week) FROM table_name_2 WHERE date = "september 16, 1979" AND attendance < 54 OFFSET 212 |
Where is the place of birth of the actor with the number nm0007064 who has not been credited for playing the role of a "Narrator"? | SELECT DISTINCT T1.birth_place FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.person_id = T2.person_id WHERE T1.person_id = 'nm0007064' AND T2.role = 'Narrator' AND T2.credited = 'false' |
What is the indoor number for the NJ wing/ | SELECT indoor FROM table_19534874_2 WHERE wing = "NJ" |
What is the season number of the episode seen by 10.11 million people in the US? | SELECT no_in_season FROM table_19995378_1 WHERE us_viewers__millions_ = "10.11" |
What is the percentage of the words that have been repeated under 180 times in the Catalan language? | SELECT CAST(COUNT(CASE WHEN T2.occurrences < 180 THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.lid) FROM langs AS T1 INNER JOIN langs_words AS T2 ON T1.lid = T2.lid WHERE T1.lang = 'ca' |
What are the names of those users? | select uid, name from user_profiles where uid in ( SELECT T2.f1 FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f2 WHERE T1.name = "Mary" OR T1.name = "Susan" ) |
How many nhl teams are listed when college/junior/club team is listed as newton north high school (ushs-ma)? | SELECT COUNT(nhl_team) FROM table_2850912_7 WHERE college_junior_club_team = "Newton North High School (USHS-MA)" |
How many enzymes do not have any interactions? | SELECT count ( * ) FROM enzyme WHERE id NOT IN ( SELECT enzyme_id FROM medicine_enzyme_interaction ) |
How many votes for brown in the place that had 84.1% for coakley? | SELECT MAX(brown_votes) FROM table_24115349_6 WHERE coakley__percentage = "84.1%" |
WHAT IS THE LOWEST $50-1/2 OZ COIN WITH A 1997 YEAR AND $25-1/4 OZ LARGER THAN $27,100? | SELECT MIN AS $50___1_2_oz FROM table_name_59 WHERE year = 1997 AND $25___1_4_oz > 27 OFFSET 100 |
What is the ratio of game sales between North America and Japan? | SELECT SUM(CASE WHEN T2.region_name = 'North America' THEN T1.num_sales ELSE 0 END) / SUM(CASE WHEN T2.region_name = 'Japan' THEN T1.num_sales ELSE 0 END) FROM region_sales AS T1 INNER JOIN region AS T2 ON T1.region_id = T2.id |
what is the lowest points when name is ehc münchen ii and position is less than 7? | SELECT MIN(points) FROM table_name_24 WHERE name = "ehc münchen ii" AND position < 7 |
What is the average Area (in km²), when Markatal is less than 0? | SELECT AVG(area__in_km²_) FROM table_name_81 WHERE markatal < 0 |
What are the issues of the complains of male clients and products from age 25 and below? | SELECT DISTINCT T2.Issue FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.sex = 'Male' AND T1.age < 25 |
What is the r (ω/km) when the frequency is 10k? | SELECT r__ω_km_ FROM table_261642_3 WHERE frequency__hz_ = "10k" |
Return the channel code and contact number of the customer contact channel whose active duration was the longest. | SELECT channel_code , contact_number FROM customer_contact_channels WHERE active_to_date - active_from_date = (SELECT active_to_date - active_from_date FROM customer_contact_channels ORDER BY (active_to_date - active_from_date) DESC LIMIT 1) |
Which common has an area (km2) of 38.38? | SELECT common FROM table_1449169_1 WHERE area__km_2__ = "38.38" |
Find the names of songs whose genre is modern or language is English. | SELECT song_name FROM song WHERE genre_is = "modern" OR languages = "english" |
What position was the team who had less then 63 goals against and less than 6 losses? | SELECT AVG(position) FROM table_name_20 WHERE goals_against < 63 AND lost < 6 |
What's the change over same quarter the previous year in the period when the 89.6% of the trains arrive within 5 minutes of scheduled time (over three months)? | SELECT change_over_same_quarter_the_previous_year FROM table_171748_3 WHERE _percentage_trains_arriving_within_5_mins_of_scheduled_time__over_three_months_ = "89.6%" |
Show the name and age for all male people who don't have a wedding. | SELECT name, age FROM people WHERE is_male = 'T' AND NOT people_id IN (SELECT male_id FROM wedding) |
How man students were from Maryland in Fall 05? | SELECT fall_05 FROM table_15055594_6 WHERE states = "Maryland" |
Which general election had a vote swing of 1.84? | SELECT general_election FROM table_149330_1 WHERE votes_swing = "1.84" |
Does Thomas Carnes have an account on ballotpedia.org? | SELECT CASE WHEN ballotpedia_id IS NULL THEN 'doesn''t have' ELSE 'have' END AS HaveorNot FROM historical WHERE first_name = 'Thomas' AND last_name = 'Carnes' |
What season number corresponds to series number 102? | SELECT MAX(season__number) FROM table_15717093_1 WHERE series__number = 102 |
What are the title and id of the film which has a rental rate of 0.99 and an inventory of below 3? | SELECT title , film_id FROM film WHERE rental_rate = 0.99 INTERSECT SELECT T1.title , T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id HAVING count(*) < 3 |
Which Attendance has a Date of november 18, 1951? | SELECT attendance FROM table_name_22 WHERE date = "november 18, 1951" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.