sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Can you please provide me with the phone number and email addresses of these five customers? | SELECT T1.customer_phone, T1.customer_email FROM customers AS T1 JOIN mailshot_customers AS T2 ON T1.customer_id = T2.customer_id where T2.outcome_code = "No Response" |
What were the Points on December 13? | SELECT MAX(points) FROM table_name_63 WHERE date = "december 13" |
what's the song title with artbeingt being pat boone | SELECT song_title FROM table_13805432_2 WHERE artist = "Pat Boone" |
What was the attendance for the game when the challenge leader was at Big East (4-2)? | SELECT MAX(attendance) FROM table_20540006_6 WHERE challenge_leader = "Big East (4-2)" |
Who had a to par of +2 and a score of 78-69-68=215? | SELECT player FROM table_name_22 WHERE to_par = "+2" AND score = 78 - 69 - 68 = 215 |
Find the average age of the members in the club "Bootup Baltimore". | SELECT avg(t3.age) 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 t1.clubname = "Bootup Baltimore" |
What country is the show aired on TVNZ? | SELECT country FROM table_14523485_9 WHERE channel = "TVNZ" |
Show the result of the submission with the highest score. | SELECT T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY T2.Scores DESC LIMIT 1 |
what is the average points when played is less than 16? | SELECT AVG(points) FROM table_name_55 WHERE played < 16 |
Which phones does TMobile support? | SELECT name FROM phone where carrier = "TMobile" |
What is catcher Josh Donaldson's pick number? | SELECT pick FROM table_name_11 WHERE position = "catcher" AND player = "josh donaldson" |
What is the smoke point when the polyunsaturated fat is 69g (4g in high oleic variety)? | SELECT smoke_point FROM table_name_24 WHERE polyunsaturated_fat = "69g (4g in high oleic variety)" |
Name the high assists for december 14 | SELECT high_assists FROM table_15869204_5 WHERE date = "December 14" |
Which Top Division debut for Kitazakura has Tournaments less than 88? | SELECT top_division_debut FROM table_name_12 WHERE tournaments < 88 AND name = "kitazakura" |
What are the name and the nationality of the host of the highest age? | SELECT Name , Nationality FROM HOST ORDER BY Age DESC LIMIT 1 |
What is the highest possible discount rate for 'Excess Inventory'? | SELECT DiscountPct FROM SpecialOffer WHERE Type = 'Excess Inventory' ORDER BY DiscountPct DESC LIMIT 1 |
Which units are commanded by Lieutenant Colonel Francis Hepburn? | SELECT unit FROM table_11793221_2 WHERE commander = "Lieutenant Colonel Francis Hepburn" |
What is the customer first, last name and id with least number of accounts. | SELECT T2.customer_first_name , T2.customer_last_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1 |
On what circuit was the iii Reims Grand Prix held? | SELECT circuit FROM table_name_43 WHERE race_name = "iii reims grand prix" |
What's the IHSAA Football Class in Decatur with an AAA IHSAA class? | SELECT ihsaa_football_class FROM table_name_78 WHERE ihsaa_class = "aaa" AND location = "decatur" |
What time has a lane less than 5, with Poland as the nationality? | SELECT time FROM table_name_63 WHERE lane < 5 AND nationality = "poland" |
Find the ids of orders which are shipped after 2000-01-01. | SELECT order_id FROM shipments WHERE shipment_date > "2000-01-01" |
Find the name of the storm that affected both Afghanistan and Albania regions. | SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Afghanistan' INTERSECT SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Albania' |
What is the Government the has the Kadima Party? | SELECT governments FROM table_name_23 WHERE party = "kadima" |
Find the id of suppliers whose average amount purchased for each product is above 50000 or below 30000 | SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING avg ( total_amount_purchased ) > 50000 OR avg ( total_amount_purchased ) < 30000 |
How many people have won the gold medal of the event "Rowing Women's Coxed Eights"? | SELECT COUNT(T1.competitor_id) FROM competitor_event AS T1 INNER JOIN event AS T2 ON T1.event_id = T2.id INNER JOIN medal AS T3 ON T1.medal_id = T3.id WHERE T2.event_name LIKE 'Rowing Women%s Coxed Eights' AND T3.medal_name = 'Gold' |
What is the total number of Byes, when South West DFL is "Coleraine", and when Wins is less than 12? | SELECT COUNT(byes) FROM table_name_80 WHERE south_west_dfl = "coleraine" AND wins < 12 |
Who was the husband date that was married in 1858? | SELECT husband_dates FROM table_name_54 WHERE date_married = "1858" |
What year did the term end for those elected in 1990 | SELECT term_ended FROM table_1602620_1 WHERE elected = 1990 |
How many residents does each property have? List property id and resident count. | SELECT T1.property_id , count(*) FROM properties AS T1 JOIN residents AS T2 ON T1.property_id = T2.property_id GROUP BY T1.property_id |
List all the solutions of repositories with the Forks higher than half of the watchers. | SELECT DISTINCT T2.Id FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Forks > T1.Watchers / 2 |
How many total units were built of Model ds-4-4-660 with a b-b wheel arrangement and a PRR Class of bs6? | SELECT SUM(total_produced) FROM table_name_13 WHERE wheel_arrangement = "b-b" AND prr_class = "bs6" AND builder’s_model = "ds-4-4-660" |
What are the contact number of customer id 3? | SELECT contact_number FROM Customer_Contact_Channels WHERE customer_id = 3 |
Among the vendors that sell the product Hex Nut 5, how many of them have a good credit rating? | SELECT COUNT(DISTINCT T3.Name) FROM ProductVendor AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Vendor AS T3 ON T1.BusinessEntityID = T3.BusinessEntityID WHERE T2.Name = 'Hex Nut 5' AND T3.CreditRating = 1 AND 3 |
What's the percentage of votes for Tom Horner according to the poll source that claimed 31% for Matt Entenza? | SELECT tom_horner__i_ FROM table_20032301_3 WHERE matt_entenza__dfl_ = "31%" |
Please list out the first name and last name of player who attended California college and have been selected as all stars? | SELECT DISTINCT T1.firstName, T1.lastName FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T1.college = 'California' |
If the constellation is Gemini, what is the spectral type? | SELECT spectral_type FROM table_1820752_1 WHERE constellation = "Gemini" |
Which Position has a School/Club Team of stanford? | SELECT position FROM table_name_15 WHERE school_club_team = "stanford" |
What is the number of games for Shlomi Avrahami? | SELECT COUNT(games) FROM table_name_75 WHERE name = "shlomi avrahami" |
Show name and distance for all aircrafts. | SELECT name , distance FROM Aircraft |
How many teams eliminated when 11 teams started? | SELECT teams_that_have_been_eliminated FROM table_23995075_2 WHERE teams_started = "11" |
Where is the free fare zone for the Arena station? | SELECT free_fare_zone FROM table_name_65 WHERE station_name = "arena" |
What is the full name of the client whose complaint on 2017/3/27 was received by MICHAL? | SELECT T1.first, T1.middle, T1.last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.`Date received` = '2017-03-27' AND T2.server = 'MICHAL' |
What are the total number of Wickets that ranger higher than 5? | SELECT COUNT(wickets) FROM table_name_22 WHERE rank > 5 |
Which category does BABY HALL film belong to? | SELECT T3.`name` FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T3.category_id = T2.category_id WHERE T1.title = 'BABY HALL' |
What is Tournament, when Date is "6 April 1992"? | SELECT tournament FROM table_name_40 WHERE date = "6 april 1992" |
What is the email of the customers who place their orders with priority method? | SELECT T1.email FROM customer AS T1 INNER JOIN cust_order AS T2 ON T1.customer_id = T2.customer_id INNER JOIN shipping_method AS T3 ON T3.method_id = T2.shipping_method_id WHERE T3.method_name = 'Priority' |
What is the title of the course that was offered at building Chandler during the fall semester in the year of 2010? | SELECT T1.title FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id WHERE building = 'Chandler' AND semester = 'Fall' AND YEAR = 2010 |
What is Series, when Winner is Jetmir Salaj? | SELECT series FROM table_name_54 WHERE winner = "jetmir salaj" |
what are the life spans of representatives from New York? | SELECT Lifespan FROM representative WHERE State = "New York" |
Find the name of the employee who got the highest one time bonus. | SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID ORDER BY t2.bonus DESC LIMIT 1 |
What are the name and payment method of customers who have both mailshots in 'Order' outcome and mailshots in 'No Response' outcome. | SELECT T2.customer_name, T2.payment_method FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.outcome_code = 'Order' INTERSECT SELECT T2.customer_name, T2.payment_method FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.outcome_code = 'No Response' |
What is the average attendance for a game against Phoenix? | SELECT AVG(attendance) FROM table_name_16 WHERE visitor = "phoenix" |
What is average ratings for Japanese title of ホタルノヒカリ, with episodes larger than 9? | SELECT average_ratings FROM table_name_38 WHERE episodes > 9 AND japanese_title = "ホタルノヒカリ" |
How many percent of Bluefish dishes are located at the center of the menu page? | SELECT CAST(SUM(CASE WHEN T2.xpos BETWEEN 0.25 AND 0.75 AND T2.ypos BETWEEN 0.25 AND 0.75 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.id) FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.name LIKE '%BLuefish%' |
how many of the storms caused damage to at least two regions? | select count ( * ) from ( SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING count ( * ) > = 2 ) |
What is the status code, mobile phone number and email address of the customer with last name as Kohler or first name as Marina? | SELECT customer_status_code , cell_mobile_phone_number , email_address FROM Customers WHERE first_name = "Marina" OR last_name = "Kohler" |
Show the party with drivers from Hartford and drivers older than 40. | SELECT party FROM driver WHERE home_city = 'Hartford' AND age > 40 |
What is European Release Date, when North American Release Date is "2013-03-05"? | SELECT european_release_date FROM table_name_50 WHERE north_american_release_date = "2013-03-05" |
What is the name of the team from cisne fairfield school? | SELECT team_name FROM table_name_84 WHERE schools = "cisne fairfield" |
When 48-30 is the record who has the highest amount of points? | SELECT high_points FROM table_23286158_10 WHERE record = "48-30" |
Calculate the percentage of legislators who are not Senator and were born before 1975. | SELECT CAST(COUNT(CASE WHEN T2.class IS NULL THEN T1.bioguide_id ELSE NULL END) AS REAL) * 100 / COUNT(T1.bioguide_id) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE CAST(T1.birthday_bio AS DATE) <= 1975 |
Which Player has a Round larger than 5, and a School/Club Team of bethune-cookman? | SELECT player FROM table_name_52 WHERE round > 5 AND school_club_team = "bethune-cookman" |
Which Award has a nominated, and outstanding choreography? | SELECT award FROM table_name_92 WHERE result = "nominated" AND category = "outstanding choreography" |
can you filter out the results where count less than 4 and only show more than 4 | SELECT count ( document_structure_code ) , document_type_code FROM documents GROUP BY document_type_code HAVING count ( * ) > 4 |
What is the average age of all males? | SELECT avg ( age ) FROM Person WHERE gender = 'male' |
Find the names of all the products whose stock number starts with "2". | SELECT catalog_entry_name FROM catalog_contents WHERE product_stock_number LIKE "2%" |
How many authors is affiliated to the organization "Otterbein University"? | SELECT COUNT(Name) FROM Author WHERE Affiliation = 'Otterbein University' |
What year was that school founded? | SELECT founded FROM university WHERE affiliation ! = 'Public' |
What is the Finish of 28 Wins? | SELECT finish FROM table_name_8 WHERE wins = "28" |
What was the away team when the game was at Princes Park? | SELECT away_team FROM table_name_12 WHERE venue = "princes park" |
how many customers are presented on the table | SELECT COUNT ( customer_id ) FROM Customers |
What is the date of attack of the Circe Shell Ship? | SELECT date FROM table_name_55 WHERE name = "circe shell" |
Who was the CM winning team when the FM winning team was #17 Elva - Ford? | SELECT cm_winning_team FROM table_29225103_2 WHERE fm_winning_team = "#17 Elva - Ford" |
How many settlements does each claim correspond to? List the claim id and the number of settlements. | SELECT T1.Claim_id, COUNT(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id |
How many spectators attended the game on 11/09/1935? | SELECT attendance FROM table_name_22 WHERE date = "11/09/1935" |
Find the states where have some college students in tryout and their decisions are yes. | SELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes' |
Which sales channel was most preferred in commercializing products in January 2020 based on the number of orders placed? | SELECT `Sales Channel` FROM `Sales Orders` WHERE OrderDate LIKE '1/%/20' GROUP BY `Sales Channel` ORDER BY COUNT(`Sales Channel`) DESC LIMIT 1 |
Show the maximum scores of the team Boston Red Stockings when the team won in postseason? | SELECT max ( T1.wins ) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' |
What team was the lower when the winner was the new york jets, and a Year earlier than 1994, and a Result of 37–13? | SELECT loser FROM table_name_98 WHERE winner = "new york jets" AND year < 1994 AND result = "37–13" |
Please list the id and detailed position of all stores in Birmingham city. | SELECT StoreID, Latitude, Longitude FROM `Store Locations` WHERE `City Name` = 'Birmingham' |
What are the names of departments either in division AS, or in division EN and in building NEB? | SELECT DName FROM DEPARTMENT WHERE Division = "AS" UNION SELECT DName FROM DEPARTMENT WHERE Division = "EN" AND Building = "NEB" |
Which employees have the role with code "HR"? Find their names. | SELECT employee_name FROM Employees WHERE role_code = "HR" |
Show me the train number of all trains that go to Chennai | SELECT train_number FROM train WHERE destination = 'Chennai' |
Which name has an Area of kennedy bay? | SELECT name FROM table_name_50 WHERE area = "kennedy bay" |
How many orders does Lucas Mancini has? | SELECT count(*) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = "Lucas" AND T1.last_name = "Mancini"; |
Which professionals have operated a treatment that costs less than the average? Give me theor first names and last names. | SELECT DISTINCT T1.first_name , T1.last_name FROM Professionals AS T1 JOIN Treatments AS T2 WHERE cost_of_treatment < ( SELECT avg(cost_of_treatment) FROM Treatments ) |
List the violation type ID of business with business ID from 30 to 50 and located at 747 IRVING St, San Francisco. | SELECT DISTINCT T1.violation_type_id FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.business_id BETWEEN 30 AND 50 AND T2.address = '747 IRVING St' AND T2.city = 'San Francisco' |
What is Pick #, when Round is "10"? | SELECT pick__number FROM table_name_49 WHERE round = 10 |
What is the total population and average area of countries in the continent of North America whose area is bigger than 3000 ? | select sum(population) , avg(surfacearea) from country where continent = "north america" and surfacearea > 3000 |
When fitzroy was the home team, how much did the away team score? | SELECT away_team AS score FROM table_name_76 WHERE home_team = "fitzroy" |
What is the name of the nurse has the most appointments? | SELECT T1.name FROM nurse AS T1 JOIN appointment AS T2 ON T1.employeeid = T2.prepnurse GROUP BY T1.employeeid ORDER BY count(*) DESC LIMIT 1 |
Which Label-Nr has a Year smaller than 1968, and a Label of world pacific, and an album of chile con soul? | SELECT label - Nr FROM table_name_78 WHERE year < 1968 AND label = "world pacific" AND from_album = "chile con soul" |
Which brand has the lowest star rating with a "Too spicy!" review? | SELECT T1.BrandName FROM rootbeerbrand AS T1 INNER JOIN rootbeerreview AS T2 ON T2.BrandID = T1.BrandID WHERE T2.StarRating = 1 AND T2.Review = 'Too Spicy!' |
what was the away team with st kilda as the away team? | SELECT away_team AS score FROM table_name_15 WHERE away_team = "st kilda" |
Which 2005 has a Tournament of grand slam tournaments? | SELECT 2005 FROM table_name_52 WHERE tournament = "grand slam tournaments" |
How many tonnes of cargo did the airport have with the IATA Code IND? | SELECT tonnes FROM table_18047346_5 WHERE iata_code = "IND" |
In what Round was a player from College of Connecticut drafted? | SELECT round FROM table_name_1 WHERE college = "connecticut" |
What Chinese Title Ranking #7 has an Average of 32 and Peak less than 38? | SELECT chinese_title FROM table_name_3 WHERE average = 32 AND peak < 38 AND rank = 7 |
show the titles, and authors or editors for all books made after the year 1989. | SELECT book_title , author_or_editor FROM book_club WHERE YEAR > 1989 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.