sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What is the name of the player that is pick #69?
|
SELECT player FROM table_name_51 WHERE pick__number = "69"
|
What is the motive before 2007?
|
SELECT motive FROM table_name_25 WHERE year < 2007
|
What is the id of the organization with the maximum number of outcomes and how many outcomes are there?
|
SELECT T1.organisation_id , count(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1
|
What is the sum Total (kg) associated with a Snatch less than 110, and a Clean & jerk larger than 120?
|
SELECT SUM(total__kg_) FROM table_name_26 WHERE snatch < 110 AND clean_ & _jerk > 120
|
What is the number of jews asarb where the metro area is philadelphia?
|
SELECT number_of_jews__asarb_ FROM table_1131183_2 WHERE metro_area = "Philadelphia"
|
Which Rank has a Bronze larger than 1, and a Silver larger than 0, and a Nation of norway (host nation), and a Total larger than 16?
|
SELECT COUNT(rank) FROM table_name_6 WHERE bronze > 1 AND silver > 0 AND nation = "norway (host nation)" AND total > 16
|
What is the child sex ration for the population with 37.7% work participation?
|
SELECT MAX(sex_ratio__child_) FROM table_name_24 WHERE work_participation___percentage_ = "37.7%"
|
Which Opponent had a Surface of hard, and a Partner of maria elena camerin?
|
SELECT opponent FROM table_name_26 WHERE surface = "hard" AND partner = "maria elena camerin"
|
What was the home team score when Brisbane lions was the home team?
|
SELECT home_team AS score FROM table_16388398_1 WHERE home_team = "Brisbane Lions"
|
Show the name of drivers in descending order of age.
|
SELECT name FROM driver ORDER BY age DESC
|
What is the name of the instructor who advises the student with the greatest number of total credits?
|
SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id ORDER BY T3.tot_cred DESC LIMIT 1
|
What wiaa classifications does vancouver itech prepratory have?
|
SELECT wiaa_classification FROM table_22058547_1 WHERE high_school = "Vancouver iTech Prepratory"
|
Show the investors shared by entrepreneurs that requested more than 140000 and entrepreneurs that requested less than 120000.
|
SELECT Investor FROM entrepreneur WHERE Money_Requested > 140000 INTERSECT SELECT Investor FROM entrepreneur WHERE Money_Requested < 120000
|
In the Year 1939, what was the Finish when Al was the League?
|
SELECT finish FROM table_name_88 WHERE league = "al" AND year = 1939
|
What is the family name of the employee who shipped the order 10521 to CACTU?
|
SELECT T1.LastName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10521 AND T2.CustomerID = 'CACTU'
|
Which episode ids are rated 5 stars and have more than 100 votes?
|
SELECT episode_id FROM Vote WHERE stars = 5 AND votes > 100;
|
What is the Serial number of the Locomotive that Entered Service in November 1984 and has an Owner of Chicago Freight Car Leasing Australia?
|
SELECT serial_no FROM table_name_90 WHERE entered_service = "november 1984" AND owner = "chicago freight car leasing australia"
|
Whose permanent address is different from his or her current address? List his or her first name.
|
SELECT first_name FROM Students WHERE current_address_id != permanent_address_id
|
For all donors from Texas City, list their donation message and name of the project they donated to.
|
SELECT T2.donation_message, T1.title FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.donor_city = 'Texas City'
|
How many playoffs did Per Mars participate in?
|
SELECT SUM(T2.GP) FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.PlayerName = 'Per Mars' AND T2.GAMETYPE = 'Playoffs'
|
where are the date of ceremony of music festivals with category 'best song' and 'awarded'?
|
SELECT Date_of_ceremony FROM music_festival WHERE Category = "Best Song" AND RESULT = "Awarded"
|
Which Class Pos has a Year larger than 1997, a Team of corvette racing, a Class of gt1, and 327 laps?
|
SELECT class AS pos FROM table_name_25 WHERE year > 1997 AND team = "corvette racing" AND class = "gt1" AND laps = 327
|
Compute the average age of all the dogs.
|
SELECT avg(age) FROM Dogs
|
Great! Can you update that list to include the year that the school was founded?
|
SELECT School,Founded FROM university WHERE affiliation ! = 'Public'
|
Which Away team has a Home team of walsall?
|
SELECT away_team FROM table_name_3 WHERE home_team = "walsall"
|
Who is the actor required when Edna Stricken is the FlatSpin actor?
|
SELECT actor_required FROM table_name_24 WHERE flatspin = "edna stricken"
|
What is the after for the player kevin streelman?
|
SELECT after FROM table_28498999_3 WHERE player = "Kevin Streelman"
|
What city is she in?
|
SELECT city_code FROM Student WHERE Fname = "Linda" AND Lname = "Smith"
|
Name the opponent with attendance of 31,777
|
SELECT opponent FROM table_name_6 WHERE attendance = "31,777"
|
What is the lowest density of a town with a 13,708 2011 population census ?
|
SELECT MIN(density) FROM table_name_74 WHERE population_2011_census = 13 OFFSET 708
|
Write me the titles of the movies starring Jim Carrey.
|
SELECT T1.title 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 T3.person_name = 'Jim Carrey'
|
For all of the 4 cylinder cars, which model has the most horsepower?
|
SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Cylinders = 4 ORDER BY T2.horsepower DESC LIMIT 1;
|
What is the color of the grape whose wine products have the highest average price?
|
SELECT T1.Color FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape GROUP BY T2.Grape ORDER BY AVG(Price) DESC LIMIT 1
|
How many customers who are in Norway and have credit line under 220000?
|
SELECT COUNT(creditLimit) FROM customers WHERE creditLimit < 220000 AND country = 'Norway'
|
Among the players who went to high school in Chicago, how many of them belongs to the west conference?
|
SELECT COUNT(DISTINCT T1.playerID) FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T1.hsCity = 'Chicago' AND T2.conference = 'West'
|
When did the Broncos play the Miami Dolphins?
|
SELECT date FROM table_17294353_1 WHERE opponent = "Miami Dolphins"
|
What is the Home team when Motagua is the Away team?
|
SELECT home FROM table_name_68 WHERE away = "motagua"
|
Calculate the percentage of women who have participated in Equestrianism Mixed Three-Day Event, Individual.
|
SELECT CAST(COUNT(CASE WHEN T1.gender = 'F' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.id) FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id INNER JOIN competitor_event AS T3 ON T2.id = T3.competitor_id INNER JOIN event AS T4 ON T3.event_id = T4.id WHERE T4.event_name = 'Equestrianism Mixed Three-Day Event, Individual'
|
Find the semester when both Master students and Bachelor students got enrolled in.
|
SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Bachelor'
|
What is Record, when High Rebounds is "Tyson Chandler (6)"?
|
SELECT record FROM table_name_68 WHERE high_rebounds = "tyson chandler (6)"
|
List the distinct payment method codes with the number of orders made
|
SELECT payment_method_code , count(*) FROM INVOICES GROUP BY payment_method_code
|
Who is the senator for district 24?
|
SELECT member_senator FROM table_11948857_1 WHERE district = 24
|
Can you show me the average enrollment of all schools?
|
SELECT avg ( enrollment ) FROM school
|
How tall is the contestant from Ecuador?
|
SELECT height__ft_ FROM table_20669355_2 WHERE country = "Ecuador"
|
Show the nations that have both hosts older than 45 and hosts younger than 35.
|
SELECT Nationality FROM HOST WHERE Age > 45 INTERSECT SELECT Nationality FROM HOST WHERE Age < 35
|
What is the longest duration for a bike trip starting on a day with a fog in 2013?
|
SELECT MAX(T1.duration) FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE T2.date LIKE '%2013%' AND T2.events = 'Fog' AND T2.zip_code = 94107
|
What country has a To par of +1 and the score of 71-76-70=217?
|
SELECT country FROM table_name_25 WHERE to_par = "+1" AND score = 71 - 76 - 70 = 217
|
What were the goals at Sydney?
|
SELECT goals FROM table_name_16 WHERE venue = "sydney"
|
Show names of actors and names of musicals they are in.
|
SELECT T1.Name , T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID
|
What is the average amount due for all the payments?
|
SELECT AVG(amount_due) FROM payments
|
What is the mean Year when the IWCR number was 5 and the Year withdrawn was bigger than 1926?
|
SELECT AVG(year_made) FROM table_name_85 WHERE iwcr_no = "5" AND year_withdrawn > 1926
|
What is the title of the song that received 259 points?
|
SELECT song_title FROM table_13805773_2 WHERE points = 259
|
List the number of games that ended up with 5-0 in Greece.
|
SELECT COUNT(T1.Div) FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T2.country = 'Greece' AND T1.FTHG = 5 AND T1.FTAG = 0
|
Please list any five app categories that are related to games, along with their label ID.
|
SELECT category, label_id FROM label_categories WHERE category LIKE '%game%' LIMIT 5
|
what is the number of different channel owners?
|
SELECT count(DISTINCT OWNER) FROM channel
|
Sum up the number of students enlisted in foreign legion, peace corps and army.
|
SELECT COUNT(name) FROM enlist WHERE organ IN ('army', 'peace_corps', 'foreign_legion')
|
Who was Carlton's away team opponent?
|
SELECT away_team FROM table_name_79 WHERE home_team = "carlton"
|
what is the title of the episode with the production code of ad1a22?
|
SELECT title FROM table_name_1 WHERE production_code = "ad1a22"
|
Hi, what journalist had worked the most amount of years?
|
SELECT journalist_ID FROM journalist ORDER BY Years_working DESC LIMIT 1
|
What is the sum of grid values of driver Michael Schumacher with lap counts larger than 66?
|
SELECT SUM(grid) FROM table_name_7 WHERE laps > 66 AND driver = "michael schumacher"
|
Which stadiums have an average attendance of 13840?
|
SELECT stadium FROM table_11208143_9 WHERE average = 13840
|
What are the changes from 2009 to 2010 in Tunisia?
|
SELECT change__2009_to_2010_ FROM table_14752049_2 WHERE country = "Tunisia"
|
What is No. 1, when Region (Year) is Mississippi (2010)?
|
SELECT no_1 FROM table_name_25 WHERE region__year_ = "mississippi (2010)"
|
And what decisions resulted from those tryouts?
|
SELECT decision FROM tryout where pPos = ( SELECT pPos FROM tryout GROUP BY pPos ORDER BY count ( * ) DESC LIMIT 1 )
|
Of all the products ordered in order no. 10248, which product has the highest user satisfaction?
|
SELECT T1.ProductName FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10248 ORDER BY T1.ReorderLevel DESC LIMIT 1
|
Which is the lowest points value that had a Chevrolet car, whose driver was Sterling Marlin, and whose car number was less than 14?
|
SELECT MIN(points) FROM table_name_51 WHERE make = "chevrolet" AND driver = "sterling marlin" AND car__number < 14
|
Find the names and descriptions of courses that belong to the subject named "Computer Science".
|
SELECT T1.course_name, T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id WHERE T2.subject_name = "Computer Science"
|
Show the average, minimum, and maximum ticket prices for exhibitions for all years before 2009.
|
SELECT avg(ticket_price) , min(ticket_price) , max(ticket_price) FROM exhibition WHERE YEAR < 2009
|
What is the postion when the nhl team is los angeles kings?
|
SELECT position FROM table_2850912_7 WHERE nhl_team = "Los Angeles Kings"
|
What is the smallest percentage of marine area for Pacific Marine ecozone and percentage of total area greater than 3.1?
|
SELECT MIN(percentage_of_marine_area__foreez_) FROM table_name_50 WHERE ecozone = "pacific marine" AND percentage_of_total_area__foreez_ > 3.1
|
Among the cars with an engine displacement of no less than 400 cubic millimeter, how many cars cost at least 30,000?
|
SELECT COUNT(*) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.displacement > 400 AND T2.price > 30000
|
WHAT IS THE HIGHEST ROUND FOR MIKE TAYLOR, WITH PICK HIGHER THAN 55?
|
SELECT MAX(round) FROM table_name_86 WHERE player = "mike taylor" AND pick > 55
|
Provide order number, warehouse code of customers Elorac, Corp.
|
SELECT DISTINCT T1.OrderNumber, T1.WarehouseCode FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID WHERE T2.`Customer Names` = 'Elorac, Corp'
|
What are the ages and genders of the LG L70 users?
|
SELECT T2.age, T2.gender FROM phone_brand_device_model2 AS T1 INNER JOIN gender_age AS T2 ON T2.device_id = T1.device_id WHERE T1.phone_brand = 'LG' AND T1.device_model = 'L70'
|
What date did they each become customers?
|
SELECT date_became_customer FROM customers where customer_name in ( SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id )
|
What is the Player that has a Place of t2, and a Score of 74-70-68=212?
|
SELECT player FROM table_name_64 WHERE place = "t2" AND score = 74 - 70 - 68 = 212
|
Tell me the start date and start station id for id 900504?
|
select start_date, start_station_name from trip where id = 900504
|
List down all the person IDs who taught course ID of 18.
|
SELECT p_id FROM taughtBy WHERE course_id = 18
|
What is the second that has jordan moulton as the lead?
|
SELECT second FROM table_name_97 WHERE lead = "jordan moulton"
|
Which customer has the most addresses?
|
SELECT T1.first_name, T1.last_name FROM customer AS T1 INNER JOIN customer_address AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.first_name, T1.last_name ORDER BY COUNT(T2.customer_id) DESC LIMIT 1
|
What school is he the catcher for?
|
SELECT school FROM table_11677100_11 WHERE position = "Catcher"
|
Show the height of the mountain climbed by the climber with the maximum points.
|
SELECT T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID ORDER BY T1.Points DESC LIMIT 1
|
How many tourists did not make any visit?
|
SELECT count(*) FROM Visitors WHERE Tourist_ID NOT IN ( SELECT Tourist_ID FROM Visits )
|
Which staff have contacted which engineers? List the staff name and the engineer first name and last name.
|
SELECT T1.staff_name , T3.first_name , T3.last_name FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id JOIN Maintenance_Engineers AS T3 ON T2.engineer_id = T3.engineer_id
|
Which name has a percentage of 0.59%?
|
SELECT name FROM table_name_28 WHERE percentage = "0.59%"
|
how many colors are in list in the description?
|
SELECT count ( * ) FROM Ref_colors
|
How many institutes are private and not-for profit?
|
SELECT COUNT(*) FROM institution_details WHERE control = 'Private not-for-profit'
|
Which Snatch has a Clean & Jerk of 180, and a Bodyweight smaller than 69.83?
|
SELECT MIN(snatch) FROM table_name_25 WHERE clean_ & _jerk = 180 AND bodyweight < 69.83
|
What was the score on the October 28 game?
|
SELECT final_score FROM table_23601267_2 WHERE date = "October 28"
|
in how many of the arkansas colomel the county was pope
|
SELECT COUNT(colonel) FROM table_29458735_5 WHERE county = "Pope"
|
Can you add to the table the dates of those transactions?
|
SELECT date_of_transaction,share_count, amount_of_transaction FROM TRANSACTIONS where share_count > = 100 or amount_of_transaction > = 100
|
What is the To par of the Player with a Score of 73-70-71-72=286?
|
SELECT to_par FROM table_name_35 WHERE score = 73 - 70 - 71 - 72 = 286
|
What is Candidate Name, when Target/Approach is "vaccine to amyloid-beta"?
|
SELECT candidate_name FROM table_name_58 WHERE target_approach = "vaccine to amyloid-beta"
|
What is his lowest number of wins?
|
SELECT MIN(wins) FROM table_2216245_2
|
what's the result for district ohio 2
|
SELECT result FROM table_1342013_34 WHERE district = "Ohio 2"
|
What is the release Date of Catalog RR 8655-2?
|
SELECT date FROM table_name_39 WHERE catalog = "rr 8655-2"
|
What's the Serie A when the coppa italia was 5?
|
SELECT AVG(serie_a) FROM table_name_79 WHERE coppa_italia = 5
|
What are the notes for a Type of 0-6-0t?
|
SELECT notes FROM table_name_37 WHERE type = "0-6-0t"
|
What is the Height of Junior Meghan Austin?
|
SELECT height FROM table_name_59 WHERE year = "junior" AND name = "meghan austin"
|
How many events did not have any participants?
|
SELECT count(*) FROM EVENTS WHERE event_id NOT IN (SELECT event_id FROM Participants_in_Events)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.