sentence
stringlengths
3
347
sql
stringlengths
18
804
What is the full name of employee who sold 1000 units?
SELECT DISTINCT T2.FirstName, T2.MiddleInitial, T2.LastName FROM Sales AS T1 INNER JOIN Employees AS T2 ON T1.SalesPersonID = T2.EmployeeID WHERE T1.Quantity = 1000
What is the Away Team score of North Melbourne?
SELECT away_team AS score FROM table_name_24 WHERE away_team = "north melbourne"
What are the points 1 for the team with position less than 13 and goal difference of +16?
SELECT points_1 FROM table_name_93 WHERE position < 13 AND goal_difference = "+16"
Which H/A/N has a score of 105*♠?
SELECT h_a_n FROM table_name_13 WHERE score = "105*♠"
What is the total number of Round, when Position is "D", and when Player is "Andrew Campbell"?
SELECT COUNT(round) FROM table_name_94 WHERE position = "d" AND player = "andrew campbell"
Show me all products supplied by supplier id 2. | Do you mean the product ID of all products supplied by supplier id 2? | Yes
SELECT product_id from Product_Suppliers where supplier_id = 2
Count the number of cinemas.
SELECT count(*) FROM cinema
Find the total saving balance for each account name.
SELECT sum(T2.balance) , T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid GROUP BY T1.name
Can you tell me what is FCC info for harmony township, new jersey?
SELECT fcc_info FROM table_name_39 WHERE city_of_license = "harmony township, new jersey"
How many times on page number 16 does the second word in the pair of words 1 and 109 appear?
SELECT SUM(T1.occurrences) FROM pages_words AS T1 INNER JOIN biwords AS T2 ON T2.w2nd = T1.wid WHERE T2.w2nd = 109 AND T2.w1st = 1 AND T1.pid = 16
What is the average duration of a bike trip made on the day with the hottest temperature ever in 2014?
SELECT AVG(T1.duration) FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE T2.date LIKE '%2014%' AND T1.start_station_name = '2nd at Folsom' AND T2.max_temperature_f = ( SELECT max_temperature_f FROM weather ORDER BY max_temperature_f DESC LIMIT 1 )
Show aircraft names and number of flights for each aircraft.
SELECT T2.name, COUNT(*) FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid
Fulham as Team 1 has the 2nd leg score of what?
SELECT 2 AS nd_leg FROM table_name_44 WHERE team_1 = "fulham"
Which gender has an Authority of state, Years of 1–8, and a Decile smaller than 10, and a Roll of 36?
SELECT gender FROM table_name_76 WHERE authority = "state" AND years = "1–8" AND decile < 10 AND roll = 36
Show the names of editors on the list with at least two journal committees.
SELECT T1.Name FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.Name HAVING COUNT ( * ) > = 2
Which method had a time of 0:46?
SELECT method FROM table_name_85 WHERE time = "0:46"
Please list the weights of all the cars with the price over $40000.
SELECT T1.weight FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T2.price > 40000
What was the time of the driver with a finish position of 19?
SELECT time_retired FROM table_name_13 WHERE fin_pos = "19"
What is the lowest attandance recorded at Cappielow?
SELECT MIN(lowest) FROM table_11207040_5 WHERE stadium = "Cappielow"
What is the lowest number of wins of a team?
SELECT MIN(wins) FROM table_19741316_1
On what Date is the Winning Score 71-69-68-70=278?
SELECT date FROM table_name_60 WHERE winning_score = 71 - 69 - 68 - 70 = 278
Which game type has most number of games?
SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) DESC LIMIT 1
What's the Opponent with a Week that's larger than 16?
SELECT opponent FROM table_name_9 WHERE week > 16
When dennis ross (r) unopposed is the candidate what is the party?
SELECT party FROM table_25030512_12 WHERE candidates = "Dennis Ross (R) unopposed"
How many episodes have a weekly rank tba and are broadcast at 8:00 p.m.?
SELECT COUNT(_number) FROM table_16072430_1 WHERE weekly_rank = "TBA" AND timeslot = "8:00 P.M."
Which Opponents have a Year of 1999–2000, and a Team of leeds united?
SELECT opponents FROM table_name_78 WHERE year = "1999–2000" AND team = "leeds united"
What is the total for the player whose finish was t66?
SELECT total FROM table_name_70 WHERE finish = "t66"
Which conference has the longest name?
SELECT FullName FROM Conference ORDER BY LENGTH(FullName) DESC LIMIT 1
Can you tell me the County that has the Year Joined of 1964, and the Location of montezuma?
SELECT county FROM table_name_24 WHERE year_joined = 1964 AND location = "montezuma"
What is the archive of the show that aired on 18april1970?
SELECT archive FROM table_2102898_1 WHERE broadcast_date = "18April1970"
Find the name and rank of the 3 youngest winners across all matches.
SELECT DISTINCT winner_name, winner_rank FROM matches ORDER BY winner_age LIMIT 3
At what Location did Robert Morris University (Illinois) Host the Lindenwood National Chamption?
SELECT location FROM table_name_71 WHERE host = "robert morris university (illinois)" AND national_champion = "lindenwood"
What party did incumbent Howard Coble belong to?
SELECT party FROM table_1341568_34 WHERE incumbent = "Howard Coble"
Which entrepreneur has the highest weight? Thanks! | What attribute would you like to know about the entrepreneur with the highest weight? | I would like to know the name of the entrepreneur with the highest weight.
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
hi, what is the maximum low temperature at Amersham station?
SELECT max ( t1.low_temperature ) FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id WHERE t2.network_name = "Amersham"
Can you tell me the sum of Podiums that has the Season of 2006, and the Races larger than 16?
SELECT SUM(podiums) FROM table_name_20 WHERE season = "2006" AND races > 16
Show the names of customers who have both an order in completed status and an order in part status.
SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Completed' INTERSECT SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Part'
Among all the current legislators born after the year 1960, how many of them are not google entities?
SELECT COUNT(*) FROM current WHERE strftime('%Y', birthday_bio) > '1960' AND google_entity_id_id IS NULL
What is the name of the browser that became compatible with the accelerator 'CProxy' after year 1998 ?
SELECT T1.name FROM browser AS T1 JOIN accelerator_compatible_browser AS T2 ON T1.id = T2.browser_id JOIN web_client_accelerator AS T3 ON T2.accelerator_id = T3.id WHERE T3.name = 'CProxy' AND T2.compatible_since_year > 1998
What are week 4 results?
SELECT result FROM table_14608759_1 WHERE week = 4
which project are least hours on the table
SELECT name from projects WHERE hours = ( SELECT min ( hours ) FROM projects )
Which location is most profitable? | What do you mean by location? We have different companies in different countries. | Which company is the most profitable?
select Company from company order by assets_billion desc limit 1
What are the names of people in ascending order of height?
SELECT Name FROM People ORDER BY Height ASC
Who visited phoenix with a Record of 2–5–0?
SELECT visitor FROM table_name_64 WHERE home = "phoenix" AND record = "2–5–0"
How many courses that do not have prerequisite?
SELECT count ( * ) FROM course WHERE course_id NOT IN ( SELECT course_id FROM prereq )
Which 2006 cfl draft pick played college ball at Idaho state?
SELECT pick__number FROM table_name_91 WHERE college = "idaho state"
What are all the album titles, in alphabetical order?
SELECT Title FROM ALBUM ORDER BY Title
Return the names of shops, ordered by year of opening ascending.
SELECT Shop_Name FROM shop ORDER BY Open_Year ASC
What is the Place 2 Player?
SELECT player FROM table_name_1 WHERE place = "2"
What is the most recent year founded with an enrollment of 42,708?
SELECT MAX(founded) FROM table_name_81 WHERE enrollment = 42 OFFSET 708
Can you please also include their names and the number of peole attended?
SELECT event_id, event_attendance, name FROM event ORDER BY Event_Attendance DESC
What party does joel r. poinsett represent?
SELECT party FROM table_2668264_22 WHERE incumbent = "Joel R. Poinsett"
What jersey number did Al Harrington wear
SELECT MAX(no) FROM table_15621965_8 WHERE player = "Al Harrington"
List down the award name, result, credit category and credited status of the "Billy Kimball".
SELECT DISTINCT T1.award, T1.result, T2.category, T2.credited FROM Award AS T1 INNER JOIN Credit AS T2 ON T2.episode_id = T1.episode_id WHERE T2.person = 'Billy Kimball';
What is Michael Del Zotto's nationality?
SELECT nationality FROM table_name_54 WHERE player = "michael del zotto"
Which Nationality of the person has a Position on left wing?
SELECT nationality FROM table_name_30 WHERE position = "left wing"
How many classrooms are not in Lamberton?
SELECT count(*) FROM classroom WHERE building != 'Lamberton'
Show each premise type and the number of premises in that type.
SELECT premises_type, COUNT(*) FROM premises GROUP BY premises_type
What round was in canberra stadium?
SELECT round FROM table_name_40 WHERE venue = "canberra stadium"
When did the staff member with first name as Janessa and last name as Sawayn leave the company?
SELECT date_left_staff FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn";
What is the color description of the product with name "catnip"?
SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = "catnip"
Which phone brand and model was used for event ID "6701"?
SELECT T2.phone_brand, T2.device_model FROM events AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.event_id = 6701
Among the Yelp_Businesses in Arizona, how many of them are still running?
SELECT COUNT(business_id) FROM Business WHERE state LIKE 'AZ' AND active LIKE 'True'
How big is the province with the Armenian name of փայտակարան?
SELECT MIN(area__km²_) FROM table_23887174_1 WHERE armenian_name = "Փայտակարան"
How many male employees work at the address 450 Peachtree Rd?
SELECT COUNT(*) FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID WHERE T2.address = '450 Peachtree Rd' AND T1.gender = 'M'
What was the Illinois Derby purse?
SELECT purse___us$__ FROM table_name_32 WHERE race = "illinois derby"
How many vuts made for a player with 2 wins and under 7 top 5s?
SELECT AVG(cuts_made) FROM table_name_96 WHERE wins = 2 AND top_5 < 7
What was the attendance on October 27, 1968?
SELECT MAX(week) FROM table_name_9 WHERE date = "october 27, 1968"
what is the scoreboard when karen was 4.5
SELECT scoreboard FROM table_19744915_3 WHERE karen = "4.5"
What sound has cantonese as the language, N/A as the classification, and spectrum dvd as the publisher?
SELECT sound FROM table_name_77 WHERE language = "cantonese" AND classifaction = "n/a" AND publisher = "spectrum dvd"
What type has the most games?
SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) DESC LIMIT 1
Which allergy affects student ID 1001
SELECT Allergy FROM Has_allergy where StuID = 1001
How many region 4 dates are associated with a region 2 date of July 9, 2007?
SELECT COUNT(region_4__australia_) FROM table_240936_2 WHERE region_2__uk_ = "July 9, 2007"
What was the winning score of the Greater Vancouver Open tournament?
SELECT winning_score FROM table_name_50 WHERE tournament = "greater vancouver open"
Among the pairs of genes that are both located in the nucleus, what is the highest expression correlation score?
SELECT T2.Expression_Corr FROM Genes AS T1 INNER JOIN Interactions AS T2 ON T1.GeneID = T2.GeneID1 INNER JOIN Genes AS T3 ON T3.GeneID = T2.GeneID2 WHERE T1.Localization = 'nucleus' AND T3.Localization = 'nucleus' ORDER BY T2.Expression_Corr DESC LIMIT 1
What is the average salary for each job title?
SELECT job_title , AVG(salary) FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id GROUP BY T2.job_title
Which Number has a Year Start smaller than 1874, and a Year End larger than 1873?
SELECT MAX(number) FROM table_name_13 WHERE year_start < 1874 AND year_end > 1873
How many complaints on credit cards in the year 2016 were filed by male clients?
SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE strftime('%Y', T2.`Date received`) = '2016' AND T1.sex = 'Male' AND T2.Product = 'Credit card'
How long is the total lesson time took by customer with first name as Rylan and last name as Goodwin?
SELECT sum(T1.lesson_time) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = "Rylan" AND T2.last_name = "Goodwin";
In what season was the conference record 4-3?
SELECT MIN(season) FROM table_20319085_2 WHERE conference_record = "4-3"
Name the points classification for levi leipheimer
SELECT points_classification FROM table_29077342_19 WHERE general_classification = "Levi Leipheimer"
What day has a record of 25–30–13 and less than 63 points?
SELECT AVG(march) FROM table_name_70 WHERE record = "25–30–13" AND points < 63
What are the names of all the storms that affected at least 10 cities and two regions?
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 INTERSECT 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 sum ( T2.number_city_affected ) > = 10
What is the correlation between the review starts and business stars?
SELECT CAST(SUM(T2.review_stars) AS REAL) / COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id
What is the position of the song that was eliminated on 11 november?
SELECT MAX(position) FROM table_23585197_3 WHERE date_eliminated = "11 November"
When the Fowler is 16, what is the number of cylinders?
SELECT COUNT(stanier), _3_cylinder FROM table_20142629_2 WHERE fowler = 16
What are the coreceptors of the chromosomes in that location 11q22.2-q22.3?
SELECT coreceptor FROM table_29871617_1 WHERE chromosomal_location = "11q22.2-q22.3"
What was the Attendance when Oxford United was the Home team?
SELECT SUM(attendance) FROM table_name_58 WHERE home_team = "oxford united"
For the oldest movie listed, what is its average rating and title?
SELECT avg(T1.stars) , T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.year = (SELECT min(YEAR) FROM Movie)
which of the physicians have zero patients?
SELECT name FROM physician WHERE name NOT IN ( SELECT T1.name FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP )
Can you tell me the Overall Record that has the Week of 3?
SELECT overall_record FROM table_name_81 WHERE week = 3
Can you tell me the Nation that has the Bronze of 1, and the Gold of 0?
SELECT nation FROM table_name_68 WHERE bronze = 1 AND gold = 0
What was the date of the game played at Gillette Stadium with a score of 40-21?
SELECT date FROM table_name_97 WHERE location = "gillette stadium" AND result = "40-21"
What Venue had 2 or more Goals in a Friendly Competition?
SELECT venue FROM table_name_48 WHERE competition = "friendly" AND goal > 2
what is the average price among all products?
SELECT avg ( Price ) FROM products
What score has october 16, 2000 as the date?
SELECT score FROM table_name_71 WHERE date = "october 16, 2000"
Find all the stores in the district with the most population.
SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id WHERE district_id = (SELECT district_id FROM district ORDER BY city_population DESC LIMIT 1)
And what was the average followers for those who do not have any tweets?
SELECT avg ( followers ) FROM user_profiles WHERE UID NOT IN ( SELECT UID FROM tweets )
what is the total number of employees?
SELECT count ( * ) FROM employees
When cardboard boxes is segment c what is segment a?
SELECT segment_a FROM table_15187735_5 WHERE segment_c = "Cardboard Boxes"