sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What was the fastest lap time in the Escort Radar Warning 200? | SELECT fastest_lap FROM table_10706961_2 WHERE name = "Escort Radar Warning 200" |
What is the nationality of the player in round 7? | SELECT nationality FROM table_name_33 WHERE round = "7" |
What is High Rebounds, when Date is "March 13"? | SELECT high_rebounds FROM table_name_93 WHERE date = "march 13" |
What is the name of the player from club pro recco? | SELECT name_v_t_e FROM table_name_87 WHERE club = "pro recco" |
The Decile of 6 has which corresponding Years? | SELECT years FROM table_name_91 WHERE decile = "6" |
Which teams homeeground is Stemmemyren? | SELECT team FROM table_2522473_1 WHERE home_ground = "Stemmemyren" |
Which 2005 has a 2006 of 126,511? | SELECT 2005 FROM table_name_39 WHERE 2006 = "126,511" |
Show the denomination shared by schools founded before 1890 and schools founded after 1900 | SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900 |
Name the championship for hard surface 7–5, 6–4 | SELECT championship FROM table_24638867_6 WHERE score = "7–5, 6–4" AND surface = "Hard" |
How many times did Valencia's home team win in the LaLiga division? | SELECT COUNT(T1.HomeTeam) FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T2.name = 'LaLiga' AND T1.HomeTeam = 'Valencia' AND T1.FTR = 'H' |
What are the course credits of those courses? | SELECT t2.crs_credit FROM department AS T1 JOIN course AS T2 ON T1.dept_code = T2.dept_code WHERE dept_name = "Accounting" |
List all the order numbers for In-Store sales and find the city where the store is located. | SELECT DISTINCT T1.OrderNumber, T2.`City Name` FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T1.`Sales Channel` = 'In-Store' |
How many characteristics does the product named "sesame" have? | SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = "sesame" |
Where is the championship where 6–1, 3–6, 3–6 is the score in the final? | SELECT championship FROM table_26202847_6 WHERE score_in_the_final = "6–1, 3–6, 3–6" |
Show different occupations along with the number of players in each occupation. | SELECT Occupation , COUNT(*) FROM player GROUP BY Occupation |
Show me the prices of the products named "Dining" | SELECT Product_Price FROM Products WHERE Product_Name = 'Dinning' |
List the nations that have more than two ships. | SELECT Nationality FROM ship GROUP BY Nationality HAVING COUNT(*) > 2 |
What Genre has the Network Zee TV? | SELECT genre FROM table_name_93 WHERE network = "zee tv" |
Which counties have two or more delegates? Give me the county names. | SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id HAVING COUNT(*) >= 2 |
Which Attendance has more than 90 points? | SELECT attendance FROM table_name_60 WHERE points > 90 |
When the laps driven were under 9 and the time/retired recorded was engine, what's the total number of grid values? | SELECT COUNT(grid) FROM table_name_69 WHERE laps < 9 AND time_retired = "engine" |
What is the highest salary? who did earn it | SELECT * from employees order by salary desc limit 1 |
How many "bars" are there in the Yelp business? | SELECT COUNT(T1.category_id) FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id WHERE T1.category_name LIKE 'Bars' |
What is the average number of stars assigned to The simpson 20s: S20-E12? What is the said episode all about? | SELECT AVG(T2.stars), T1.summary FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T1.episode_id = 'S20-E12'; |
Which city was the 1992 Summer Olympic held? | SELECT T2.city_name FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T3.games_name = '1992 Summer' |
What is the highest Shooting Total with a Bronze less than 0? | SELECT MAX(total) FROM table_name_40 WHERE sport = "shooting" AND bronze < 0 |
Name the number of titles written by adam i. lapidus | SELECT COUNT(title) FROM table_12030612_9 WHERE written_by = "Adam I. Lapidus" |
list the name of the members in the order of their rank in rounds | SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID ORDER BY Rank_in_Round ASC |
Calculate the average duration of absense of disabled students. | SELECT AVG(T1.month) FROM longest_absense_from_school AS T1 INNER JOIN disabled AS T2 ON T1.name = T2.name |
what is the stream(s) and / or lake(s) when the date founded is 1959? | SELECT stream_s__and___or_lake_s_ FROM table_name_42 WHERE date_founded = 1959 |
Which direction do most of the trains with rectangle-shaped second cars run? | SELECT T2.direction FROM cars AS T1 INNER JOIN trains AS T2 ON T1.train_id = T2.id WHERE T1.position = 2 AND T1.shape = 'rectangle' GROUP BY T2.direction ORDER BY COUNT(T2.id) DESC LIMIT 1 |
How long is the orbital period for the planet that has a semimajor axis of 5.20 au? | SELECT orbital_period FROM table_10932739_2 WHERE semimajor_axis___au__ = "5.20" |
How many episodes had rating/share (18-49) of 0.7/2 and a rating of 2.1? | SELECT COUNT(episode_number) FROM table_25751274_2 WHERE rating / SHARE(18 - 49) = 0.7 / 2 AND rating = "2.1" |
What percentage of customers from the African region is in the household segment? | SELECT CAST(SUM(IIF(T2.r_name = 'AFRICA', 1, 0)) AS REAL) * 100 / COUNT(T1.n_nationkey) FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2.r_regionkey INNER JOIN customer AS T3 ON T1.n_nationkey = T3.c_nationkey WHERE T3.c_mktsegment = 'HOUSEHOLD' |
What are the names of documents that do not have any images? | SELECT document_name FROM documents EXCEPT SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code JOIN document_sections_images AS t3 ON t2.section_id = t3.section_id |
Of all players with an overall rating greater than 80, how many are right-footed and left-footed? | SELECT preferred_foot , count(*) FROM Player_Attributes WHERE overall_rating > 80 GROUP BY preferred_foot |
What country did Bart Bryant with a score of 69-70=139 belong to? | SELECT country FROM table_name_37 WHERE score = 69 - 70 = 139 AND player = "bart bryant" |
Find the maximum price of wins from the appelations in Central Coast area and produced before the year of 2005. | SELECT MAX(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = "Central Coast" AND T2.year < 2005 |
What is No. 3, when No. 7 is Abigail, and when No. 4 is Ava? | SELECT no_3 FROM table_name_79 WHERE no_7 = "abigail" AND no_4 = "ava" |
What is the description of the type of the company who concluded its contracts most recently? | SELECT T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Contracts AS T2 ON T1.company_id = T2.maintenance_contract_company_id JOIN Ref_Company_Types AS T3 ON T1.company_type_code = T3.company_type_code ORDER BY T2.contract_end_date DESC LIMIT 1 |
What's the highest lowest number of capacity that ibrox stadium has when the average is larger than 49,143? | SELECT MAX(lowest) FROM table_name_67 WHERE stadium = "ibrox stadium" AND average > 49 OFFSET 143 |
okay great - can you tell me the maximum fastest lap speed during this race? | SELECT max ( T2.fastestlapspeed ) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = "Monaco Grand Prix" |
List the name of rooms with king or queen bed. | SELECT roomName FROM Rooms WHERE bedType = "King" OR bedType = "Queen"; |
What is the average longitude of stations that never had bike availability more than 10? | SELECT avg(long) FROM station WHERE id NOT IN (SELECT station_id FROM status GROUP BY station_id HAVING max(bikes_available) > 10) |
What player had less than 6 appearances at the FA cup, 33 at the premier league, and more than 5 at the UEFA cup? | SELECT player FROM table_name_62 WHERE fa_cup < 6 AND premier_league = 33 AND UEfa_cup > 5 |
What is the average rental rate of sci-fi film titles? | SELECT AVG(T1.rental_rate) 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 T3.`name` = 'Sci-Fi' |
in which season the position was center | SELECT season FROM table_19897896_7 WHERE position = "Center" |
What faults does the middle have? | SELECT fault_short_name from Part_Faults WHERE part_id in ( SELECT T2.part_id FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_name ORDER BY count ( * ) ASC LIMIT 1 ) |
What was the name of the race in Bordeaux? | SELECT race_name FROM table_1140113_5 WHERE circuit = "Bordeaux" |
For Tie #2, who was the home team? | SELECT home_team FROM table_name_33 WHERE tie_no = "2" |
What was the date of the game at Princes Park? | SELECT date FROM table_name_83 WHERE venue = "princes park" |
Return the id of the customer who has the most cards, as well as the number of cards. | SELECT customer_id , count(*) FROM Customers_cards GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1 |
What was the attendance on 31 January 2009 when the opponent was Airdrie United? | SELECT AVG(attendance) FROM table_name_33 WHERE opponent = "airdrie united" AND date = "31 january 2009" |
Can you show me the number of customers? | select count ( distinct custid ) from accounts |
find the number of players whose points are lower than 30 in each position. | SELECT COUNT(*), POSITION FROM player WHERE points < 30 GROUP BY POSITION |
What was the away team score when Waverley Park was the ground and the home team was collingwood? | SELECT away_team AS score FROM table_name_80 WHERE ground = "waverley park" AND home_team = "collingwood" |
For each station, return its longitude and the average duration of trips that started from the station. | SELECT T1.name, T1.long, AVG(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id GROUP BY T2.start_station_id |
WHICH COUNTRY HAVE A ROLLER COASTER LONGER THAN 5000 | select T2.Name from roller_coaster as T1 JOIN country as T2 ON T1.Country_ID = T2.Country_ID where T1.Length > 5000 |
Name all the authors for all business titles. | SELECT T3.au_fname, T3.au_lname FROM titles AS T1 INNER JOIN titleauthor AS T2 ON T1.title_id = T2.title_id INNER JOIN authors AS T3 ON T2.au_id = T3.au_id WHERE T1.type = 'business' |
Name the right ascension for sagittarius and NGC number larger than 6522 for open cluster and declination of °22′ | SELECT right_ascension___j2000__ FROM table_name_78 WHERE constellation = "sagittarius" AND ngc_number > 6522 AND object_type = "open cluster" AND declination___j2000__ = "°22′" |
Which students are advised by Michael Goodrich? Give me their first and last names. | SELECT T2.fname , T2.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.fname = "Michael" AND T1.lname = "Goodrich" |
What engine did the Team Lotus have after 1965? | SELECT engine FROM table_name_63 WHERE entrant = "team lotus" AND year > 1965 |
What is the score of the home team olimpia? | SELECT score FROM table_name_14 WHERE home = "olimpia" |
Find the names of all the clubs that have at least a member from the city with city code "BAL". | SELECT DISTINCT t1.clubname 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 t3.city_code = "BAL" |
Which position is round 7? | SELECT position FROM table_name_27 WHERE round = 7 |
What is the establishment's name and employee involved in the inspection ID 44256 on May 5, 2010? | SELECT T1.dba_name, T3.first_name, T3.last_name FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no INNER JOIN employee AS T3 ON T2.employee_id = T3.employee_id WHERE T2.inspection_date = '2010-05-05' AND T2.inspection_id = 44256 |
How many orders have more than two invoices? | SELECT COUNT ( * ) FROM ( SELECT * FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id GROUP BY T2.order_id HAVING count ( * ) > 2 ) |
Which round lasted 2:32? | SELECT round FROM table_name_84 WHERE time = "2:32" |
What was the score when the tie number was a replay and the home team was mansfield town? | SELECT score FROM table_name_59 WHERE tie_no = "replay" AND home_team = "mansfield town" |
Which Week has a Tournament of monte carlo? | SELECT week FROM table_name_18 WHERE tournament = "monte carlo" |
How many player with total points of 75 | SELECT COUNT(player) FROM table_14342367_15 WHERE total_points = 75 |
Which sport does the event "Shooting Women's Trap" belong to? | SELECT T1.sport_name FROM sport AS T1 INNER JOIN event AS T2 ON T1.id = T2.sport_id WHERE T2.event_name LIKE 'Shooting Women%s Trap' |
Which Clock Multiplier has a Model Number of c7-m 764? | SELECT clock_multiplier FROM table_name_23 WHERE model_number = "c7-m 764" |
What is the menu id of the menu sponsored by Occidental and Oriental Steamship Company with the highest number of pages? | SELECT T2.menu_id FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id WHERE T1.sponsor = 'OCCIDENTAL & ORIENTAL STEAMSHIP COMPANY' GROUP BY T2.menu_id ORDER BY COUNT(T2.page_number) DESC LIMIT 1 |
What is the Venue with an Attendance that is larger than 6,938? | SELECT venue FROM table_name_55 WHERE attendance > 6 OFFSET 938 |
what is name of headquarters on General Electric | SELECT Headquarters FROM Companies where name = "General Electric" |
Of the titles, which title is about the Carefully researched study of the effects of strong emotions on the body, which state-based publisher published this book, and what is the year-to-date sale? | SELECT T1.title, T2.pub_name, T1.ytd_sales FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T1.notes = 'Carefully researched study of the effects of strong emotions on the body. Metabolic charts included.' |
Show the names of customers having an order with shipping method FedEx and order status Paid. | SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE shipping_method_code = 'FedEx' AND order_status_code = 'Paid' |
Which delegates are from counties with population smaller than 100000? | SELECT T2.Delegate FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population < 100000 |
What is the structure of the document with the least number of accesses? | SELECT t2.document_structure_description FROM documents AS t1 JOIN document_structures AS t2 ON t1.document_structure_code = t2.document_structure_code GROUP BY t1.document_structure_code ORDER BY count(*) DESC LIMIT 1 |
Actually, can you also give me the name of that race? | SELECT name,date FROM races ORDER BY date DESC LIMIT 1 |
Name the total number of places which has played more than 18 | SELECT COUNT(place) FROM table_name_59 WHERE played > 18 |
Determine the percentage of manufacturers who are from Texas among all of Lorenzo's customers. | SELECT CAST(SUM(CASE WHEN cust_type = 'manufacturer' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM customer WHERE state = 'TX' |
What is Apogee, when Designation is Prognoz 6? | SELECT apogee FROM table_name_9 WHERE designation = "prognoz 6" |
What was the losing bonus for the 20 played, and 353 points? | SELECT losing_bonus FROM table_name_89 WHERE played = "20" AND points_for = "353" |
How many hours does a goalie need to play to meet the minimum? | SELECT min ( T2.HS ) FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID and T1.pPos = 'goalie' GROUP BY T1.pPos |
List the IUCR numbers and index status of homicide incidents. | SELECT index_code FROM IUCR WHERE primary_description = 'HOMICIDE' |
Show the names of companies and of employees. | SELECT T3.Name, T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID |
Which state had an average of less than 8.67, a swimsuit score of 8.27, an evening gown score of 8.78, and an interview number of 8.52? | SELECT state FROM table_name_70 WHERE average < 8.67 AND swimsuit = 8.27 AND evening_gown = 8.78 AND interview = 8.52 |
What location contains a school that has an enrollment of 2686? | SELECT location FROM table_1973729_1 WHERE enrollment = 2686 |
What are the total hours per week students under the age of 20 played games? | SELECT sum ( hoursperweek ) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.age < 20 |
What is the table when the team is slovan bratislava? | SELECT table FROM table_27683516_3 WHERE team = "Slovan Bratislava" |
What is the civil parish of the cappanaboul townland? | SELECT civil_parish FROM table_30120547_1 WHERE townland = "Cappanaboul" |
What is the name of the line from Karratha to Port Hedland? | SELECT name__year_commissioned_ FROM table_name_74 WHERE from_to = "karratha to port hedland" |
On April 28, what was the average number of people attending? | SELECT AVG(attendance) FROM table_name_6 WHERE date = "april 28" |
Calculate the percentage of population in Edmonton city to the population of its province. | SELECT CAST(T1.Population AS REAL) * 100 / T2.Population FROM city AS T1 INNER JOIN province AS T2 ON T1.Province = T2.Name WHERE T1.Name = 'Edmonton' |
what's the date with attendance being 40657 | SELECT date FROM table_14951643_1 WHERE attendance = 40657 |
Find the name and position of physicians who prescribe some medication whose brand is X? | SELECT DISTINCT T1.name , T1.position FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.Brand = "X" |
What position is for Plant high school? | SELECT position FROM table_name_47 WHERE school = "plant high school" |
Which region has the highest number of games sold on all platforms? | SELECT T.region_name FROM ( SELECT T2.region_name, SUM(T1.num_sales) FROM region_sales AS T1 INNER JOIN region AS T2 ON T1.region_id = T2.id INNER JOIN game_platform AS T3 ON T1.game_platform_id = T3.id INNER JOIN platform AS T4 ON T3.platform_id = T4.id GROUP BY T4.platform_name ORDER BY SUM(T1.num_sales) DESC LIMIT 1 ) t |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.