sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What is the team name and acc regular season score of the school that was founded for the longest time? | SELECT t2.team_name , t2.ACC_Regular_Season FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t1.founded LIMIT 1 |
What was the result of rank 1? | SELECT result FROM table_name_73 WHERE rank = 1 |
What's the name of the 1985 city with a Spire (m) of 105, and a Roof (m) smaller than 96? | SELECT city FROM table_name_69 WHERE spire__m_ = "105" AND roof___m__ < 96 AND built = 1985 |
Who are all the writers of episodes in season 24? | SELECT writer_s_ FROM table_25800134_2 WHERE season__number = 24 |
What is the maximum number of wins in the formula 3 euro series? | SELECT MAX(wins) FROM table_24330803_1 WHERE series = "Formula 3 Euro series" |
On which date was the position less than 4 at Piraeus? | SELECT date FROM table_name_27 WHERE pos < 4 AND venue = "piraeus" |
Show the names and ids of tourist attractions that are visited at least two times. | SELECT T1.Name , T2.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING count(*) >= 2 |
What country does david gilford play for? | SELECT country FROM table_name_90 WHERE player = "david gilford" |
How many percent of the mountains on Andes which are non-volcanic? | SELECT CAST(SUM(CASE WHEN type != 'volcano' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM mountain WHERE Mountains = 'Andes' |
What is the average page number of the menus that have the dish "Clear green turtle"? | SELECT AVG(T1.page_number) FROM MenuPage AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.menu_page_id INNER JOIN Dish AS T3 ON T2.dish_id = T3.id WHERE T3.name = 'Clear green turtle' |
How many students are there? | SELECT count ( * ) FROM student |
What is the Title of the Pye Label mono LP release? | SELECT title FROM table_name_18 WHERE format = "mono lp" AND label = "pye" |
Please show me all the information about each apartment | select * from apartments |
Which sport resulted in a gold medal in the 2000 Sydney games? | SELECT sport FROM table_name_41 WHERE medal = "gold" AND games = "2000 sydney" |
How many games were played on March 15? | SELECT COUNT(game) FROM table_17323042_9 WHERE date = "March 15" |
What is the title of episode nominated for WGA Award (TV) with votes greater than 1000? | SELECT DISTINCT T2.title FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T2.votes > 1000 AND T1.award_category = 'WGA Award (TV)' AND T1.result = 'Nominee'; |
How many rain figures are provided for sunlight hours in 1966? | SELECT COUNT(rain) FROM table_12837_1 WHERE sunlight_hours = 1966 |
What's the record of Carlos Boozer (23) as the leading scorer? | SELECT record FROM table_name_83 WHERE leading_scorer = "carlos boozer (23)" |
What are the booking start and end dates of the apartments with more than 2 bedrooms? | SELECT T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2 |
Find the total revenue of companies whose revenue is larger than the revenue of some companies based in Austin. | SELECT SUM(revenue) FROM manufacturers WHERE revenue > (SELECT MIN(revenue) FROM manufacturers WHERE headquarter = 'Austin') |
What is Circuit, when Team is "R.J.MacArthur Onslow", and when City / State is "Sydney , New South Wales"? | SELECT circuit FROM table_name_54 WHERE team = "r.j.macarthur onslow" AND city___state = "sydney , new south wales" |
List the record company shared by the most number of orchestras. | SELECT Record_Company FROM orchestra GROUP BY Record_Company ORDER BY COUNT(*) DESC LIMIT 1 |
How old are the students with allergies to food and animal types on average? | SELECT avg(age) FROM Student WHERE StuID IN ( SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "food" INTERSECT SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "animal") |
Please list the IDs of all the cars with double sides on trains that run in the west direction. | SELECT T1.id FROM cars AS T1 INNER JOIN trains AS T2 ON T1.train_id = T2.id WHERE T2.direction = 'east' AND T1.sides = 'double' |
What are the amenity id of those? | SELECT T2.amenid FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall' ORDER BY T3.amenity_name |
What is that church a continuation of? | SELECT open_date FROM church order BY open_date desc limit 1 |
What is the percentage of all the trains with at least 4 cars? List the directions of the said trains. | SELECT CAST(COUNT(CASE WHEN T2.trailPosi >= 4 THEN T1.id ELSE NULL END) AS REAL) * 100 / COUNT(T1.id) FROM trains AS T1 INNER JOIN ( SELECT train_id, MAX(position) AS trailPosi FROM cars GROUP BY train_id ) AS T2 ON T1.id = T2.train_id UNION ALL SELECT T1.direction FROM trains AS T1 INNER JOIN ( SELECT train_id, MAX(position) AS trailPosi FROM cars t GROUP BY train_id ) AS T2 ON T1.id = T2.train_id AND T2.trailPosi >= 4 |
What is the description of the department whose name has the substring the computer? | SELECT department_description FROM Departments WHERE department_name LIKE '%computer%' |
List all employees in the circulation history of the document with id 1. List the employee's name. | SELECT Employees.employee_name FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id WHERE Circulation_History.document_id = 1; |
how many wins had series formula renault 2.0 nec and the position is 18th? | SELECT wins FROM table_26178824_1 WHERE series = "Formula Renault 2.0 NEC" AND position = "18th" |
Find the first and last name of all the students of age 18 who have vice president votes. | SELECT DISTINCT T1.Fname , T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_President_VOTE WHERE T1.age = 18 |
Which order has the most recent shipment? Give me the order id. | SELECT order_id FROM shipments WHERE shipment_date = (SELECT max(shipment_date) FROM shipments) |
How many rooms have king beds? Report the number for each decor type. | SELECT decor , count(*) FROM Rooms WHERE bedType = "King" GROUP BY decor; |
What is the total number of Top-25, when Events is greater than 86? | SELECT COUNT(top_25) FROM table_name_65 WHERE events > 86 |
From 1980 to 1983, how many of the NBA All-Star players have more than 60% three point rate? | SELECT DISTINCT T2.playerID FROM player_allstar AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T2.year BETWEEN 1980 AND 1983 AND T1.three_made / T1.three_attempted > 0.6 |
How many friends does the high school student Kyle have? | SELECT count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = "Kyle" |
Among all the claims, what is the amount claimed in the claim with the least amount settled? List both the settlement amount and claim amount. | SELECT Amount_Settled , Amount_Claimed FROM Claims ORDER BY Amount_Settled ASC LIMIT 1 |
How many trucks were manufactured in year 2009? | SELECT COUNT(truck_id) FROM truck WHERE model_year = 2009 |
What team hosted at Tampa Stadium? | SELECT host_team FROM table_name_75 WHERE stadium = "tampa stadium" |
Name the Result of the Lineup of start, an Assist/pass of carli lloyd, and an Competition of 2011 fifa women’s world cup – group stage? | SELECT result FROM table_name_63 WHERE lineup = "start" AND assist_pass = "carli lloyd" AND competition = "2011 fifa women’s world cup – group stage" |
What is the list of distinct product names sorted by product id? | SELECT DISTINCT product_name FROM product ORDER BY product_id |
What away team score has carlton home team? | SELECT away_team AS score FROM table_name_85 WHERE home_team = "carlton" |
Please list the top 5 products with the most orders. | SELECT T1.Name FROM Product AS T1 INNER JOIN SalesOrderDetail AS T2 ON T1.ProductID = T2.ProductID GROUP BY T1.Name ORDER BY SUM(T2.OrderQty) DESC LIMIT 0, 5 |
Where was the Singapore Charity Shield tournament played? | SELECT location FROM table_name_8 WHERE tournament = "singapore charity shield" |
What's the rank of Igor Rakočević of Tau Cerámica with more than 377 points? | SELECT SUM(rank) FROM table_name_87 WHERE team = "tau cerámica" AND name = "igor rakočević" AND points > 377 |
What is the difference in the most populated city of Allentown-Bethlehem-Easton, PA-NJ in 2020 against its population in 2010? | SELECT T1.population_2020 - T1.population_2010 AS result_data FROM zip_data AS T1 INNER JOIN CBSA AS T2 ON T1.CBSA = T2.CBSA WHERE T2.CBSA_name = 'Allentown-Bethlehem-Easton, PA-NJ' ORDER BY T1.population_2020 DESC LIMIT 1 |
What was the date that the episode with a production code of 213 was originally aired? | SELECT original_us_air_date FROM table_21831229_3 WHERE prod_code = 213 |
What shows for Wins when there was a Conference of —, western division, in the 1967–68 season? | SELECT wins FROM table_name_61 WHERE conference = "—" AND division = "western" AND season = "1967–68" |
What was the average when the strike rate is 75.78? | SELECT average FROM table_26041144_10 WHERE strike_rate = "75.78" |
What is the Method of the match with a Time of 4:07? | SELECT method FROM table_name_53 WHERE time = "4:07" |
Can you list the uids and names of all users? | SELECT uid, name FROM user_profiles |
Find the first and last name of the staff members who reported problems from the product "rem" but not "aut"? | SELECT T3.staff_first_name , T3.staff_last_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = "rem" EXCEPT SELECT T3.staff_first_name , T3.staff_last_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = "aut" |
What is the grade of each high schooler? | SELECT grade FROM Highschooler |
Which team has a home field at Glenferrie Oval? | SELECT home_team FROM table_name_48 WHERE venue = "glenferrie oval" |
What is Position in Table, when Replaced By is "Sergio Bueno"? | SELECT position_in_table FROM table_name_21 WHERE replaced_by = "sergio bueno" |
What are goals scored when postition is 17 and tied is 5? | SELECT goals_scored FROM table_28848697_4 WHERE position = 17 AND tied = 5 |
What are the different states that had students successfully try out? | SELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes' |
When was there a team of Simon and the start was 3? | SELECT year FROM table_name_48 WHERE team = "simon" AND start = "3" |
In what city is RJSN located? | SELECT city FROM table_name_57 WHERE icao = "rjsn" |
What is total number of the to par of player john mahaffey, who has a total less than 298? | SELECT COUNT(to_par) FROM table_name_9 WHERE player = "john mahaffey" AND total < 298 |
What are the maximum and minimum settlement amount on record? | SELECT max(settlement_amount) , min(settlement_amount) FROM settlements |
State the explanation about object class 10. | SELECT OBJ_CLASS FROM OBJ_CLASSES WHERE OBJ_CLASS_ID = 10 |
What is the name of the director of photography of the movie "Pirates of the Caribbean: At World's End"? | SELECT T3.person_name FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T1.title LIKE 'Pirates of the Caribbean: At World%s End' AND T2.job = 'Director of Photography' |
How many lessons taken by customer with first name as Rylan and last name as Goodwin were completed? | SELECT COUNT(*) 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" AND T1.lesson_status_code = "Completed" |
Which director is from Italy? | SELECT director FROM table_name_41 WHERE country = "italy" |
What was the result when the opponent was Rory Markham? | SELECT res FROM table_name_96 WHERE opponent = "rory markham" |
What is the fewest shots a glazing can handle? | SELECT MIN(shots) FROM table_21538523_1 |
Name the winner for ss14 | SELECT winner FROM table_name_82 WHERE stage = "ss14" |
How many schools in Suffolk County have Ph.D. teachers? | SELECT COUNT(schoolid) FROM projects WHERE teacher_prefix = 'Dr.' AND school_county = 'Suffolk' |
Which AFC cup does Kenji Arai have? | SELECT afc_cup FROM table_name_43 WHERE name = "kenji arai" |
What is the id of the event with the most participants? | SELECT Event_ID FROM Participants_in_Events GROUP BY Event_ID ORDER BY count(*) DESC LIMIT 1 |
In how many movie does Dariusz Wolski work as the director of photography? | SELECT COUNT(T2.movie_id) FROM person AS T1 INNER JOIN movie_crew AS T2 ON T1.person_id = T2.person_id WHERE T1.person_name = 'Dariusz Wolski' AND T2.job = 'Director of Photography' |
Who were the comedians on episode 1x03? | SELECT comedians FROM table_23122988_1 WHERE episode = "1x03" |
What's the sum of WIns with Draws that's larger than 1, Losses that's smaller than 4, and Conceded of 20? | SELECT SUM(wins) FROM table_name_82 WHERE draws > 1 AND losses < 4 AND conceded = 20 |
What are the numbers of steals associated with players having exactly 3 blocks? | SELECT steals FROM table_24913533_4 WHERE blocks = 3 |
Can you list the names of all the swimmers who have won more than once? | SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win' GROUP BY t2.swimmer_id HAVING count ( * ) > 1 |
In what Week was the Locking Dance? | SELECT MAX(week) FROM table_name_16 WHERE dance = "locking" |
Which rank is 40 for s Wicket with a player of Daniel Marsh? | SELECT rank FROM table_name_63 WHERE s_wicket = "40" AND player = "daniel marsh" |
Who was the opponent at Ullevi? | SELECT opponents FROM table_name_22 WHERE venue = "ullevi" |
Which Gender has a Residence of Haliburton? | SELECT gender FROM table_name_28 WHERE residence = "haliburton" |
Which Tournament has a Winning score of −14 (65-69-72-68=274)? | SELECT tournament FROM table_name_18 WHERE winning_score = −14(65 - 69 - 72 - 68 = 274) |
Who was the builder for the USS cambridge? | SELECT builder FROM table_name_98 WHERE name = "uss cambridge" |
Was the game with Kashima antlers at home or away? | SELECT h___a FROM table_name_86 WHERE opponents = "kashima antlers" |
What is the IATA for Nanjing? | SELECT iata FROM table_name_85 WHERE city = "nanjing" |
Which accession number has a protein name of ccdc165, and a divergence from human lineage (MYA) smaller than 296? | SELECT accession_number FROM table_name_29 WHERE protein_name = "ccdc165" AND divergence_from_human_lineage__mya_ < 296 |
Provide the game publisher's name of the game with sales greater than 90% of the average sales in Japan. | SELECT DISTINCT T5.publisher_name FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id INNER JOIN game_platform AS T3 ON T2.game_platform_id = T3.id INNER JOIN game_publisher AS T4 ON T3.game_publisher_id = T4.id INNER JOIN publisher AS T5 ON T4.publisher_id = T5.id WHERE T2.num_sales * 10000000 > ( SELECT AVG(T2.num_sales) * 100000 * 90 FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id WHERE T1.region_name = 'Japan' ) |
What is the date of the label Dos or Die Recordings? | SELECT date FROM table_name_9 WHERE label = "dos or die recordings" |
What is the highest attendance of the game with eastwood town as the away team? | SELECT MAX(attendance) FROM table_name_46 WHERE away_team = "eastwood town" |
What is the average cost of procedures that physician John Wen was trained in? | SELECT avg(T3.cost) FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = "John Wen" |
What is the average round of the number 16 pick? | SELECT AVG(round) FROM table_name_72 WHERE pick = "16" |
What is the time for Sheffield? | SELECT time FROM table_name_15 WHERE city = "sheffield" |
What event had Xu Zhilin competing? | SELECT event FROM table_name_21 WHERE name = "xu zhilin" |
Find out which hotel and travel business having the most review? Calculate the standard deviation of the review star for this business. | SELECT T2.category_id FROM Business_Categories AS T1 INNER JOIN Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Reviews AS T3 ON T3.business_id = T1.business_id WHERE T2.category_name = 'Hotels & Travel' GROUP BY T2.category_id ORDER BY COUNT(T2.category_id) DESC LIMIT 1 |
Which country is the airport that has the highest altitude located in? | SELECT country FROM airports ORDER BY elevation DESC LIMIT 1 |
What role is Kevin Bishop the actor? | SELECT role FROM table_name_18 WHERE actor = "kevin bishop" |
Name the most wins | SELECT MIN(wins) FROM table_15327489_1 |
Find the title of courses that have two prerequisites? | SELECT T1.title FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING count(*) = 2 |
When collingwood played as the home team who was the away team? | SELECT away_team FROM table_name_88 WHERE home_team = "collingwood" |
Give the name of the student in the History department with the most credits. | SELECT name FROM student WHERE dept_name = 'History' ORDER BY tot_cred DESC LIMIT 1 |
What episode number of the season had BCW410 as a production code? | SELECT no_in_season FROM table_24319661_5 WHERE production_code = "BCW410" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.