sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Which Date has a Score of 2–3, a Time of 20:30, and a Set 3 of 16–25? | SELECT date FROM table_name_38 WHERE score = "2–3" AND time = "20:30" AND set_3 = "16–25" |
Which Season has an Away of 1–2? | SELECT season FROM table_name_94 WHERE away = "1–2" |
What is the highest heat for more than 3 lanes and a time of 2:09.12? | SELECT MAX(heat) FROM table_name_23 WHERE lane > 3 AND time = "2:09.12" |
How many points does the year after 1986 with a AGS JH23B chassis have? | SELECT points FROM table_name_52 WHERE year > 1986 AND chassis = "ags jh23b" |
Which city has the most addresses? List the city name, number of addresses, and city id. | SELECT T2.city , count(*) , T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id = T2.city_id GROUP BY T1.city_id ORDER BY count(*) DESC LIMIT 1 |
What is every original air date with U.S. viewers of 0.23 million? | SELECT original_air_date FROM table_29803475_2 WHERE us_viewers__million_ = "0.23" |
What are the products that belong to the beverage category? | SELECT T2.ProductName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T1.CategoryName = 'Beverages' |
Which Event has a Record of 19-9? | SELECT event FROM table_name_47 WHERE record = "19-9" |
What was the venue of the competition that held the 1st position in 2011? | SELECT venue FROM table_name_68 WHERE position = "1st" AND year = 2011 |
What is the highest number of extra points for players with less than 2 touchdowns and less than 1 point? | SELECT MAX(extra_points) FROM table_name_47 WHERE touchdowns < 2 AND points < 1 |
What are the names of the people with no friends in New York City? | SELECT distinct name FROM PersonFriend WHERE friend NOT IN ( SELECT name FROM person WHERE city = 'new york city' ) |
What is the attendance of the game that was played on September 27, 1964? | SELECT MAX(attendance) FROM table_name_85 WHERE date = "september 27, 1964" |
List the names of all distinct races in reversed lexicographic order? | SELECT DISTINCT name FROM races ORDER BY name DESC |
Name the general classification for mauricio soler | SELECT general_classification FROM table_29077342_19 WHERE winner = "Mauricio Soler" |
Give the number of 30-year-old users who were active in the events on 2016/5/2. | SELECT COUNT(T3.device_id) FROM app_events AS T1 INNER JOIN events AS T2 ON T1.event_id = T2.event_id INNER JOIN gender_age AS T3 ON T2.device_id = T3.device_id WHERE SUBSTR(`timestamp`, 1, 10) = '2016-05-02' AND T1.is_active = 1 AND T3.age = '30' |
How many million of windows phones were shipped during the quarter that shipped 216.2 million total? | SELECT windows_phone FROM table_14260687_3 WHERE total = "216.2" |
Yes please. | SELECT T1.player_id FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' |
How many different departments are there? | SELECT count(DISTINCT dept_name) FROM department |
How many shops are there in each location? | SELECT count(*) , LOCATION FROM shop GROUP BY LOCATION |
What commission pct do they get? | SELECT COMMISSION_PCT FROM employees WHERE first_name LIKE '%m' |
What is Matches, when Year is "2003"? | SELECT matches FROM table_name_72 WHERE year = "2003" |
What is the city of the bank branch that provides business loans? | SELECT T1.city FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T2.loan_type = 'Business' |
What is the country for Sony / Sony Bmg? | SELECT country FROM table_name_61 WHERE label = "sony / sony bmg" |
What is the average amount of transaction? | SELECT avg ( transaction_amount ) FROM Financial_transactions |
Which Attendance has an Arena of arrowhead pond of anaheim, and Points smaller than 5? | SELECT attendance FROM table_name_20 WHERE arena = "arrowhead pond of anaheim" AND points < 5 |
What are the names and account balances of customers with the letter a in their names? | SELECT cust_name , acc_bal FROM customer WHERE cust_name LIKE '%a%' |
What was the maximum speed of the car with 1.556 cc capacity? | SELECT vmax FROM table_name_45 WHERE capacity = "1.556 cc" |
What are the distinct first names of the students who have class president votes? | SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_Senator_VOTE |
Please list the home teams in the matches of the Bundesliga division that ended with a home victory in the 2021 season. | SELECT DISTINCT T1.HomeTeam FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T1.season = 2021 AND T1.FTR = 'H' AND T2.name = 'Bundesliga' |
Which year had a vehicle of Mitsubishi? | SELECT year FROM table_name_88 WHERE vehicle = "mitsubishi" |
How many bridges was built by Frank Gehry? | SELECT count ( * ) from architect as T1 join bridge as T2 on T1.id = T2.architect_id where T1.name = "Frank Gehry" |
When i4 is the engine what is the graphical? | SELECT graphical FROM table_22915134_2 WHERE engine = "I4" |
How many parties were for candidates newt gingrich (r) 59.1% dock h. davis (d) 40.9%? | SELECT COUNT(party) FROM table_1341640_11 WHERE candidates = "Newt Gingrich (R) 59.1% Dock H. Davis (D) 40.9%" |
can you give me the last name, id, and phone number of the person with the most order? | select T1.customer_last_name, T1.customer_id, T1.phone_number from Customers as T1 join orders as T2 on T1.customer_id = T2.customer_id group by T2.customer_id order by count ( * ) desc limit 1 |
What type of surface was played on July 27, 2013? | SELECT surface FROM table_name_31 WHERE date = "july 27, 2013" |
What is the ID of the image with the most number of object samples? | SELECT IMG_ID FROM IMG_OBJ GROUP BY IMG_ID ORDER BY COUNT(OBJ_SAMPLE_ID) DESC LIMIT 1 |
What is the height of that building? | SELECT Height FROM buildings ORDER BY Height DESC LIMIT 1 |
which gender got the highest average uncertain ratio. | SELECT t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex ORDER BY avg(t2.unsure_rate) DESC LIMIT 1 |
Which Team plays at Western Oval? | SELECT home_team FROM table_name_90 WHERE venue = "western oval" |
What's the title in the number 10 in the season? | SELECT title FROM table_27117365_1 WHERE no_in_season = 10 |
WHAT PLAYER HAS THE OAKLAND ATHLETICS? | SELECT player FROM table_name_55 WHERE team = "oakland athletics" |
State the name and affiliation of author for the 'Education, democracy and growth' paper? | SELECT T2.Name, T2.Affiliation FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'Education, democracy and growth' |
What are the ids and makers of all car makers that produce at least 2 models and make more than 3 cars? | SELECT T1.Id, T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING COUNT(*) >= 2 INTERSECT SELECT T1.Id, T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model GROUP BY T1.Id HAVING COUNT(*) > 3 |
What are the first names of all Accounting professors who teach and what are the classrooms of the courses they teach? | SELECT T2.emp_fname , T1.class_room FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Accounting' |
How may times did a player that attended Iowa state appear on the all time roster? | SELECT COUNT(years_for_rockets) FROM table_11734041_1 WHERE school_club_team_country = "Iowa State" |
List all the names of schools with an endowment amount smaller than or equal to 10. | SELECT T2.school_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id GROUP BY T1.school_id HAVING sum(T1.amount) <= 10 |
What is the code of airport that has the highest number of flights? | SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) DESC LIMIT 1 |
How many lines have the segment description of red line mos-2 west? | SELECT line_s_ FROM table_1817879_2 WHERE segment_description = "Red Line MOS-2 West" |
Which Year has a Regular Season of 7th? | SELECT MAX(the_year) FROM table_name_18 WHERE regular_season = "7th" |
What machine has tony rutter as the rider? | SELECT machine FROM table_name_68 WHERE rider = "tony rutter" |
How many state universities are there? | SELECT COUNT(*) FROM university WHERE university_name LIKE '%State%' |
What is the location of the game with attendance of 63,336? | SELECT game_site FROM table_name_93 WHERE attendance = "63,336" |
Name the team for co-drivers of david brabham mario andretti | SELECT team FROM table_name_15 WHERE co_drivers = "david brabham mario andretti" |
What is the name of team with Palmeiras 4-2 portuguesa as the last match? | SELECT team FROM table_name_47 WHERE last_match = "palmeiras 4-2 portuguesa" |
How many players were born in the 90s? | SELECT COUNT(Player_Id) AS cnt FROM Player WHERE DOB BETWEEN '1990-01-01' AND '1999-12-31' |
What is the transfer window of the Leeds United source with a move from Motherwell? | SELECT transfer_window FROM table_name_52 WHERE source = "leeds united" AND moving_from = "motherwell" |
What is the position when drafted is 1974,r11,p11? | SELECT position FROM table_1198175_1 WHERE drafted = "1974,R11,P11" |
How many people directed episode 7 In the season? | SELECT COUNT(directed_by) FROM table_23937219_3 WHERE season__number = 7 |
What Event used submission (rear naked choke) with 9-4? | SELECT event FROM table_name_11 WHERE method = "submission (rear naked choke)" AND record = "9-4" |
What is the order status for order 3 | SELECT order_status_code FROM Customer_Orders WHERE order_id = 3 |
What is the Gaelic Football Stadium at McHale Park's ranking in total capacity? | SELECT COUNT(rank) FROM table_name_30 WHERE stadium = "mchale park" |
WHAT IS THE DECISION FOR NOVEMBER 28? | SELECT decision FROM table_name_10 WHERE date = "november 28" |
What is the average number of bronzes when the rank is below 11 for trinidad and tobago with less than 1 total medal? | SELECT AVG(bronze) FROM table_name_94 WHERE rank < 11 AND nation = "trinidad and tobago" AND total < 1 |
find the training hours of the player Charles | SELECT HS from Player where pName = 'Charles' |
What year has 59th as a finish position? | SELECT year FROM table_name_58 WHERE finish_position = "59th" |
For the event with index f7, what is the status? | SELECT status FROM table_name_23 WHERE index = "f7" |
How many percent of countries in North America use English? | SELECT CAST(SUM(IIF(T2.Language = 'English', 1, 0)) AS REAL) * 100 / COUNT(T1.Code) FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode |
What was the score in the match against Sanaz Marand? | SELECT score FROM table_name_54 WHERE opponent = "sanaz marand" |
What are the id and zip code of the address with the highest monthly rental? | SELECT T2.address_id , T1.zip_postcode FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id ORDER BY monthly_rental DESC LIMIT 1 |
What is the format for the station owned by Dakota Broadcasting? | SELECT format FROM table_2709_4 WHERE owner = "Dakota Broadcasting" |
What is the percentage of Android use when Windows is 1.15%? | SELECT android FROM table_11381701_3 WHERE windows = "1.15%" |
Which Particulate size approaching 100% retention has a Usage of semi hepa and a Class of h12? | SELECT particulate_size_approaching_100_percentage_retention FROM table_name_47 WHERE usage = "semi hepa" AND class = "h12" |
Which Year is the lowest when the Viewers are 13.7 million? | SELECT MIN(year) FROM table_name_7 WHERE viewers = "13.7 million" |
Who was the winner that had a Points Classification of Giuseppe Saronni, a Trofeo Fast Team of Bianchi, and was Stage 3? | SELECT winner FROM table_name_71 WHERE points_classification = "giuseppe saronni" AND trofeo_fast_team = "bianchi" AND stage = "3" |
What party represents the district with incumbent matthew clay? | SELECT party FROM table_2668378_18 WHERE incumbent = "Matthew Clay" |
What is the name of the director of the episode written by robin schwartz & robert tarlow? | SELECT directed_by FROM table_name_55 WHERE written_by = "robin schwartz & robert tarlow" |
Can you find me student with first name "Emma"? | What do you want to know about that student? | Student id | SELECT student_id FROM Students WHERE first_name = "Emma" |
What is the bleeding time in Bernard-soulier syndrome? | SELECT bleeding_time FROM table_1557752_1 WHERE condition = "Bernard-Soulier syndrome" |
What is the place result of the downhill race before the 1996 season on 11-Mar-1995? | SELECT place FROM table_name_17 WHERE race = "downhill" AND season < 1996 AND date = "11-mar-1995" |
How many scenes are there in Act 1 in Twelfth Night? | SELECT COUNT(T1.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Act = 1 AND T1.Title = 'Twelfth Night' |
What is the date of completion in the course named "advanced database?" | SELECT T2.date_of_completion FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "advanced database" |
Which Gold Coast has a Perth of no, a Sydney of yes, and an Auckland of yes? | SELECT gold_coast FROM table_name_49 WHERE perth = "no" AND sydney = "yes" AND auckland = "yes" |
What was the No. 6 name when Emma was No. 2 and Sophia was No. 3? | SELECT no_6 FROM table_name_78 WHERE no_2 = "emma" AND no_3 = "sophia" |
what is employee number of james ? | Is James a first name or last name? | first name | SELECT EMP_NUM FROM EMPLOYEE WHERE EMP_FNAME = "James" |
Find the name of airports whose altitude is between -50 and 50. | SELECT name FROM airports WHERE elevation BETWEEN -50 AND 50 |
How many English films have a duration of over 50 minutes and the cost of replacement are under 10.99? | SELECT COUNT(T1.film_id) FROM film AS T1 INNER JOIN language AS T2 ON T1.language_id = T2.language_id WHERE T2.name = 'English' AND T1.length > 50 AND T1.replacement_cost < 10.99 |
List players' first name and last name who have weight greater than 220 or height shorter than 75. | SELECT name_first , name_last FROM player WHERE weight > 220 OR height < 75 |
Name the time with track number less than 4 for you're my everything | SELECT time FROM table_name_58 WHERE track_number < 4 AND song_title = "you're my everything" |
How many platinum points were awarded for 5th place? | SELECT MAX(points_awarded__platinum_) FROM table_11254821_2 WHERE finishing_position = "5th" |
Which park did the most people attend in 2008? | SELECT T2.park_name FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2008 ORDER BY T1.attendance DESC LIMIT 1; |
List down email address of customers who were attended by staff with ID 2. | SELECT DISTINCT T1.email FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id WHERE T2.staff_id = 2 |
Who played Captain Jack Sparrow in all of the Pirates of the Caribbean movies? | SELECT DISTINCT T3.person_name FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T2.character_name = 'Captain Jack Sparrow' AND T1.title LIKE 'Pirates of the Caribbean%' |
What is the to par of player ed sneed, who has a t5 place? | SELECT to_par FROM table_name_45 WHERE place = "t5" AND player = "ed sneed" |
Find the names of all the product characteristics. | SELECT DISTINCT characteristic_name FROM CHARACTERISTICS |
What's the average attendance of the league with a total attendance of 2268508? | SELECT average_attendance FROM table_name_75 WHERE total_attendance = "2268508" |
What was the date of the game against Hayes & Yeading United? | SELECT date FROM table_name_60 WHERE opponent = "hayes & yeading united" |
Find the number and time of the train that goes from Chennai to Guruvayur. | SELECT train_number, TIME FROM train WHERE origin = 'Chennai' AND destination = 'Guruvayur' |
How many tries for does Pontardawe RFC have? | SELECT tries_for FROM table_14070062_3 WHERE club = "Pontardawe RFC" |
What's the year that Hagerstown joined? | SELECT year_joined FROM table_name_66 WHERE school = "hagerstown" |
Who was the customer in the South Region superstore who bought the most “Hon Multipurpose Stacking Arm Chairs"? | SELECT T2.`Customer Name` FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T3.`Product Name` = 'Hon Multipurpose Stacking Arm Chairs' GROUP BY T2.`Customer Name` ORDER BY COUNT(T2.`Customer Name`) DESC LIMIT 1 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.