sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
who is the first flight's pilot?
|
SELECT Pilot FROM flight ORDER BY Date LIMIT 1
|
Show the police force shared by counties with location on the east and west.
|
SELECT Police_force FROM county_public_safety WHERE LOCATION = "East" INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION = "West"
|
What are the mission codes, fates, and names of the ships involved?
|
SELECT T1.Code , T1.Fate , T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID
|
Whsts the name of the student thst took prerequisite course title internatoinal finance?
|
SELECT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE T2.course_id IN ( SELECT T4.prereq_id FROM course AS T3 JOIN prereq AS T4 ON T3.course_id = T4.course_id WHERE T3.title = 'International Finance' )
|
What's the date the score was 379?
|
SELECT date FROM table_name_5 WHERE score = "379"
|
What is the lowest Sack with a Solo of 24, with Tackles larger than 25.5, with Yards larger than 0?
|
SELECT MIN(sack) FROM table_name_1 WHERE solo = 24 AND tackles > 25.5 AND yards > 0
|
When John Harkes was the color commentator, and Alexi Lalas and Steve McManaman were the pregame analysts, who were the sideline reporters?
|
SELECT sideline_reporters FROM table_name_84 WHERE color_commentator = "john harkes" AND pregame_analysts = "alexi lalas and steve mcmanaman"
|
What is the lowest overall amount of no votes?
|
SELECT MIN(no_votes) FROM table_256286_13
|
What was the constructor in the Belgian Grand Prix round?
|
SELECT constructor FROM table_2911781_3 WHERE grand_prix = "Belgian grand_prix"
|
Which Current car has a Number of cars of 1, and a Year started of 1999?
|
SELECT current_car FROM table_name_54 WHERE number_of_cars = 1 AND year_started = 1999
|
What are the average ages of male engineers and male doctors?
|
SELECT avg ( age ) , job FROM Person WHERE gender = 'male' GROUP BY job
|
What is the weight in kg of Tony Martensson?
|
SELECT T2.weight_in_kg FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T1.PlayerName = 'Tony Martensson'
|
Return the name of the organization which has the most contact individuals.
|
SELECT t1.organization_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id GROUP BY t1.organization_name ORDER BY count(*) DESC LIMIT 1
|
what's the naturalisation by marriage with regbeingtration of a minor child being 114
|
SELECT naturalisation_by_marriage FROM table_11214212_1 WHERE registration_of_a_minor_child = 114
|
What kind of Chassis supports a Maserati Straight-6 engine with Points greater than 0 and built in the year 1955?
|
SELECT chassis FROM table_name_93 WHERE engine = "maserati straight-6" AND points > 0 AND year = 1955
|
Which Tournament has a Margin of victory of 7 strokes
|
SELECT tournament FROM table_name_38 WHERE margin_of_victory = "7 strokes"
|
How many bonus points were won by 5?
|
SELECT bonus_points FROM table_17510803_2 WHERE won = "5"
|
What are the ids and names of the architects who built at least 3 bridges ?
|
SELECT T1.id, T1.name FROM architect AS T1 JOIN bridge AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING COUNT(*) >= 3
|
What is the total number of wins with 10 cuts made and a score average under 74.09?
|
SELECT COUNT(wins) FROM table_name_52 WHERE cuts_made = 10 AND scoring_average < 74.09
|
Which zone had mădălina gojnea monica niculescu as the opponent?
|
SELECT zone FROM table_name_30 WHERE opponents = "mădălina gojnea monica niculescu"
|
How many years have a Pick of 12, and a Position of dt, and a College of penn state?
|
SELECT COUNT(year) FROM table_name_20 WHERE pick = "12" AND position = "dt" AND college = "penn state"
|
What is the roll for the school with state authority and a decile of 9?
|
SELECT roll FROM table_name_42 WHERE authority = "state" AND decile = 9
|
Show the industries shared by companies whose headquarters are "USA" and companies whose headquarters are "China".
|
SELECT Industry FROM Companies WHERE Headquarters = "USA" INTERSECT SELECT Industry FROM Companies WHERE Headquarters = "China"
|
What is the sum number of years where the wheel arrangement of 0-4-0t?
|
SELECT COUNT(year_made) FROM table_name_18 WHERE wheel_arrangement = "0-4-0t"
|
What engine did Dick Simon Racing use?
|
SELECT engine FROM table_name_21 WHERE team = "dick simon racing"
|
What is the nationality of "Customer#000000055"?
|
SELECT T2.n_name FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_name = 'Customer#000000055'
|
What's the 1996 if 1986 has a 1R?
|
SELECT 1996 FROM table_name_53 WHERE 1986 = "1r"
|
What is the average age of all the female students (sex with F) from each city?
|
SELECT avg ( age ) , city_code FROM student WHERE sex = 'F' GROUP BY city_code
|
What year is that musical with id 6?
|
SELECT DISTINcT ( T2.Year ) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID WHERE T2.musical_ID = 6
|
What years have a total of 395 (0)?
|
SELECT years FROM table_name_64 WHERE total = "395 (0)"
|
Please include the full name of the patient who received a lung transplant.
|
SELECT T2.first, T2.last FROM procedures AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'Transplant of lung (procedure)'
|
What are the categories of businesses that have opening time on Sunday?
|
SELECT DISTINCT T1.category_name FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business_Hours AS T3 ON T2.business_id = T3.business_id INNER JOIN Days AS T4 ON T3.day_id = T4.day_id WHERE T4.day_of_week = 'Sunday' AND T3.opening_time <> ''
|
How heavy is Matthias Trattnig in kilograms?
|
SELECT T2.weight_in_kg FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T1.PlayerName = 'Pavel Patera'
|
Which customer status code has least number of customers?
|
SELECT customer_status_code FROM Customers GROUP BY customer_status_code ORDER BY count(*) ASC LIMIT 1;
|
What is the category and typical buying price of the product with name "cumin"?
|
SELECT product_category_code, typical_buying_price FROM products WHERE product_name = "cumin"
|
Show ids for all employees who do not have a certificate.
|
SELECT eid FROM Employee EXCEPT SELECT eid FROM Certificate
|
What are the names of all instructors who have taught a course, as well as the corresponding course id?
|
SELECT name , course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID
|
what is the old English name of Saturday?
|
SELECT old_english_day_name FROM table_2624098_1 WHERE modern_english_day_name = "Saturday"
|
What are the wifi and screen mode type of the hardware model named "LG-P760"?
|
SELECT T1.WiFi , T3.Type FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model JOIN screen_mode AS T3 ON T2.screen_mode = T3.Graphics_mode WHERE T2.Hardware_Model_name = "LG-P760";
|
What is the highest crowd when fitzroy is the home team?
|
SELECT MAX(crowd) FROM table_name_24 WHERE home_team = "fitzroy"
|
What is the Outcome of the Match played after 2003 with a Score of 6–0, 6–3?
|
SELECT outcome FROM table_name_88 WHERE year > 2003 AND score = "6–0, 6–3"
|
What is the to par when the year(s) won is larger than 1999?
|
SELECT to_par FROM table_name_53 WHERE year_s__won > 1999
|
What is the least number of Gold for a Rank smaller than 5, and 1 silver medal for Poland with more than 1 medal in total?
|
SELECT MIN(gold) FROM table_name_31 WHERE rank < 5 AND silver = 1 AND nation = "poland" AND total > 1
|
What is the least common category?
|
SELECT category FROM categories GROUP BY category ORDER BY COUNT(podcast_id) ASC LIMIT 1
|
What is the decor of room Recluse and defiance?
|
SELECT decor FROM Rooms WHERE roomName = "Recluse and defiance";
|
Hello! Can you show me all school names and bus driver names for each of the school buses in this database?
|
SELECT T2.school , T3.name FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id JOIN driver AS T3 ON T1.driver_id = T3.driver_id
|
Srdjan Dragojevic worked on a film which earned what nomination?
|
SELECT nomination FROM table_10236830_4 WHERE director = "Srdjan Dragojevic"
|
can you show me average of credit scores?
|
SELECT AVG ( credit_score ) FROM customer
|
In the crew, who was born in 1962 in California?
|
SELECT name FROM Person WHERE SUBSTR(birthdate, 1, 4) = '1962' AND birth_region = 'California';
|
What is the name of the teacher who teaches in that classroom?
|
SELECT T2.firstname , T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom GROUP BY T2.firstname , T2.lastname ORDER BY count ( * ) DESC LIMIT 1
|
Show all directors.
|
SELECT DISTINCT directed_by FROM film
|
Name the number of apps for total g is 8
|
SELECT COUNT(l_apps) FROM table_19018191_5 WHERE total_g = 8
|
Among the countries with more than 3% population growth rate, state the country name in full along with its GDP.
|
SELECT T1.Name, T3.GDP FROM country AS T1 INNER JOIN population AS T2 ON T1.Code = T2.Country INNER JOIN economy AS T3 ON T3.Country = T2.Country WHERE T2.Population_Growth > 3
|
How many movie reviews does each director get?
|
SELECT count(*) , T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director
|
List out the city name of states located in South region.
|
SELECT T FROM ( SELECT DISTINCT CASE WHEN T1.Region = 'South' THEN T2.`City Name` END AS T FROM Regions T1 INNER JOIN `Store Locations` T2 ON T2.StateCode = T1.StateCode ) WHERE T IS NOT NULL
|
List 5 solution path that has sampling time of 636431758961741000.
|
SELECT DISTINCT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.SampledAt = 636431758961741000 LIMIT 5
|
What city of license has a value of k293bg for its call sign?
|
SELECT city_of_license FROM table_name_82 WHERE call_sign = "k293bg"
|
How many hours computer literacy course in a week?
|
SELECT hours from course where cname = "COMPUTER LITERACY"
|
which Points has Wins smaller than 2?
|
SELECT MIN(points) FROM table_name_41 WHERE wins < 2
|
What is the total number of games of the team against the Los Angeles Kings after January 5?
|
SELECT COUNT(game) FROM table_name_69 WHERE opponent = "los angeles kings" AND january > 5
|
How many patients have diabetes that started in 1988?
|
SELECT COUNT(PATIENT) FROM conditions WHERE DESCRIPTION = 'Diabetes' AND strftime('%Y', START) = '1988'
|
What is the name of the student with id 4? | Here are the first, middle, and last name of the student with id 4. | What is their email address?
|
SELECT email_address FROM Students WHERE student_id = 4
|
Give the name of the community area which had the most pocket-picking thefts.
|
SELECT T3.community_area_name FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T1.iucr_no = T2.iucr_no INNER JOIN Community_Area AS T3 ON T2.community_area_no = T3.community_area_no WHERE T1.primary_description = 'THEFT' AND T1.secondary_description = 'POCKET-PICKING' GROUP BY T2.community_area_no ORDER BY T2.case_number DESC LIMIT 1
|
Give me the temperature of Shanghai in January.
|
SELECT T2.Jan FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T1.city = "Shanghai"
|
What is Quantity made, when Wheel Arrangement is "2-6-0", and when Class is "D-3"?
|
SELECT quantity_made FROM table_name_31 WHERE wheel_arrangement = "2-6-0" AND class = "d-3"
|
What is the least rank with more than 3 losses and less than 25 sets lost?
|
SELECT MIN(rank) FROM table_name_34 WHERE loss > 3 AND sets_lost < 25
|
Name the Score on 17 december 1979?
|
SELECT score FROM table_name_80 WHERE date = "17 december 1979"
|
What is the highest number of ends lost?
|
SELECT MAX(Ends) AS lost FROM table_17012578_37
|
What team was the player that received a penalty at time 32:17 playing for?
|
SELECT team FROM table_name_13 WHERE time = "32:17"
|
When 24:31 is the run time how many measurements of viewers (in millions) are there?
|
SELECT COUNT(viewers__in_millions_) FROM table_2102945_1 WHERE run_time = "24:31"
|
If the title if the Lost Boy, how many directors were there?
|
SELECT COUNT(directed_by) FROM table_19517621_3 WHERE title = "The Lost Boy"
|
Among all the claims, what is the settlement amount of the claim with the largest claim amount? List both the settlement amount and claim amount.
|
SELECT Amount_Settled , Amount_Claimed FROM Claims ORDER BY Amount_Claimed DESC LIMIT 1
|
Count the number of building IDs
|
SELECT count ( id ) FROM buildings
|
Which Record has a February smaller than 8, and an Opponent of montreal canadiens?
|
SELECT record FROM table_name_51 WHERE february < 8 AND opponent = "montreal canadiens"
|
How many cities in France have a population of more than 100,000?
|
SELECT COUNT(T2.Name) FROM country AS T1 INNER JOIN city AS T2 ON T2.Country = T1.Code WHERE T1.Name = 'France' AND T2.Population > 100000
|
Which body tackle has yes for the diving tackle and the sliding tackle classified as a trip?
|
SELECT body_tackle FROM table_name_56 WHERE diving_tackle = "yes" AND sliding_tackle = "classified as a trip"
|
Who had the high assists on october 6?
|
SELECT high_assists FROM table_27756474_2 WHERE date = "October 6"
|
What is the Word Form, when the Khmer is greater than ១០០០០០, and the UNGEGN is (muŏy) dáb leăn?
|
SELECT word_form FROM table_name_39 WHERE khmer > ១០០០០០ AND ungegn = "(muŏy) dáb leăn"
|
List down the brand names of root beer that gained a 5-star rating from a customer's review in 2013. Calculate the unit profit available to wholesalers for each brand.
|
SELECT T1.BrandName, T1.CurrentRetailPrice - T1.WholesaleCost AS result FROM rootbeerbrand AS T1 INNER JOIN rootbeerreview AS T2 ON T1.BrandID = T2.BrandID WHERE T2.StarRating = 5 AND T2.ReviewDate BETWEEN '2013-01-01' AND '2013-12-31'
|
What are the names of all the players who received a yes during tryouts, and also what are the names of their colleges?
|
SELECT T1.pName , T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'
|
List the height and weight of people in descending order of height.
|
SELECT Height, Weight FROM people ORDER BY Height DESC
|
Name the number of headphone class for sr100
|
SELECT COUNT(headphone_class) FROM table_1601027_2 WHERE headphone_model = "SR100"
|
When did these failures occur?
|
SELECT T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Fail"
|
Find the first name of students who are living in the Smith Hall.
|
SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall'
|
What is Year is Walt Disney Pictures Imagemovers Digital?
|
SELECT SUM(year) FROM table_name_59 WHERE studio_s_ = "walt disney pictures imagemovers digital"
|
Return the highest acc percent across all basketball matches.
|
SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1
|
What is the code for rank 10?
|
SELECT code__iata_icao_ FROM table_name_18 WHERE rank = 10
|
Among the recipes whose source is the National Potato Board, which recipe has the highest calories?
|
SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.source = 'National Potato Board' ORDER BY T2.calories DESC LIMIT 1
|
How many titles were released on 21 October 1992?
|
SELECT COUNT(rank) FROM table_18590048_1 WHERE release_date = "21 October 1992"
|
What is the aspect ratio for the September 1, 2009 release?
|
SELECT aspect_ratio FROM table_name_56 WHERE release_date = "september 1, 2009"
|
Name the least episode for fibre cement siding
|
SELECT MIN(episode) FROM table_15187735_18 WHERE segment_d = "Fibre Cement Siding"
|
What is the document id and name with greatest number of paragraphs?
|
SELECT T1.document_id , T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id ORDER BY count(*) DESC LIMIT 1
|
What competition was held on the 26th?
|
SELECT competition FROM table_name_50 WHERE date = "26th"
|
Find the name of the department which has the highest average salary of professors
|
SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY avg ( salary ) DESC LIMIT 1
|
What are the names of all songs produced by the artist with the first name "Marianne"?
|
SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.firstname = "Marianne"
|
How many different riders are there that won riding Omr Tsunami?
|
SELECT COUNT(rider_names) FROM table_27833186_1 WHERE horse_name = "OMR Tsunami"
|
What is the L2 cache with a release date on September 10, 2009, a 128-bit FPU width, and a 12x multi 1?
|
SELECT l2_cache FROM table_name_80 WHERE release_date = "september 10, 2009" AND fpu_width = "128-bit" AND multi_1 = "12x"
|
How many head coaches did Kent state golden flashes have?
|
SELECT COUNT(opponents_head_coach) FROM table_28418916_3 WHERE fbs_opponent = "Kent State Golden Flashes"
|
What about their attribute value
|
SELECT t2.attribute_value FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = "8"
|
On which site was the game against Louisville played?
|
SELECT site FROM table_name_22 WHERE opponent = "louisville"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.