sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
When did Meg Whitman get 60%? | SELECT date_s__administered FROM table_name_38 WHERE meg_whitman = "60%" |
List the name of the pilots who have flied for both a company that mainly provide 'Cargo' services and a company that runs 'Catering services' activities. | SELECT T2.pilot FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id WHERE T1.principal_activities = 'Cargo' INTERSECT SELECT T2.pilot FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id WHERE T1.principal_activities = 'Catering services' |
List all the information about course authors and tutors in alphabetical order of the personal name. | SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name |
How many publishers are in the USA? | SELECT COUNT(pub_id) FROM publishers WHERE country = 'USA' |
Which origin has least number of flights? | SELECT origin FROM Flight group by origin order by count ( * ) asc limit 1 |
Indicate the full name of the patients who have 3 different allergies. | SELECT T1.first, T1.last FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT GROUP BY T1.patient ORDER BY COUNT(DISTINCT T2.DESCRIPTION) > 3 |
Who Eliminated Kane? | SELECT eliminated_by FROM table_name_63 WHERE wrestler = "kane" |
Show the role code with the least employees. | SELECT role_code FROM Employees GROUP BY role_code ORDER BY count(*) ASC LIMIT 1 |
Which date has a Surface of carpet (i)? | SELECT date FROM table_name_44 WHERE surface = "carpet (i)" |
In what round did Mike Newton Thomas Erdos Ben Collins won the LMP2? | SELECT rnd FROM table_24865763_2 WHERE lmp2_winning_team = "Mike Newton Thomas Erdos Ben Collins" |
What is the zip code that has the lowest average mean sea level pressure? | SELECT zip_code FROM weather GROUP BY zip_code ORDER BY avg(mean_sea_level_pressure_inches) LIMIT 1 |
Tell me the total number of grid for rider of james toseland | SELECT COUNT(grid) FROM table_name_14 WHERE rider = "james toseland" |
Compute the average score of submissions. | SELECT avg(Scores) FROM submission |
What date did Hawthorn play as the away team? | SELECT date FROM table_name_87 WHERE away_team = "hawthorn" |
What place is Jay Hebert? | SELECT place FROM table_name_60 WHERE player = "jay hebert" |
Name the number opponent for loss result | SELECT COUNT(opponent) FROM table_20928661_1 WHERE result = "Loss" |
What is the lowest value for Sydney, when WEEKLY RANK is less than 8, and when Brisbane is greater than 252,000? | SELECT MIN(sydney) FROM table_name_16 WHERE weekly_rank < 8 AND brisbane > 252 OFFSET 000 |
Name the least touchdowns for joe rogers | SELECT MIN(touchdowns) FROM table_25646820_2 WHERE player = "Joe Rogers" |
What is the highest number of top-25s for events with 0 wins? | SELECT MAX(top_25) FROM table_name_15 WHERE wins < 0 |
What is the other for 2012? | SELECT other FROM table_name_54 WHERE year = "2012" |
What index was created by the United Nations (UNDP) and reached 2nd place in the LA Ranking? | SELECT index__year_ FROM table_19948664_1 WHERE author___editor___source = "United Nations (UNDP)" AND ranking_la__2_ = "2nd" |
What is the smallest preliminary when swimsuit is less than 8.822, interview is more than 8.744 and gown is more than 9.333? | SELECT MIN(preliminary) FROM table_name_50 WHERE swimsuit < 8.822 AND interview > 8.744 AND evening_gown > 9.333 |
Show me all branch names with the number of members in each branch registered after 2015 | SELECT T2.name , count ( * ) FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T1.register_year > 2015 GROUP BY T2.branch_id |
What is the hometown of number 40? | SELECT hometown FROM table_name_44 WHERE number = 40 |
How many games did they play on february 5? | SELECT opponent FROM table_23308178_8 WHERE date = "February 5" |
What is the title and journal homepage of the latest published paper? | SELECT T1.Title, T2.HomePage FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id ORDER BY T1.Year DESC LIMIT 1 |
How many tourists were there total? | SELECT count ( * ) FROM Visitors |
What language is spoken after 2007 for the role of urvashi mathur? | SELECT language FROM table_name_56 WHERE year > 2007 AND role = "urvashi mathur" |
What are the maximum fastest lap speed in races held after 2004 grouped by race name and ordered by year? | SELECT max(T2.fastestlapspeed) , T1.name , T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year |
How many gas companies are there? | SELECT COUNT(*) FROM company |
Find the number of left handed winners who participated in the WTA Championships. | SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L' |
What are all the production codes of episodes written by Michael G. Moye? | SELECT production_code FROM table_2226817_8 WHERE written_by = "Michael G. Moye" |
In the year 2000, what is the campus fee for San Francisco State University? | SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = "San Francisco State University" AND t1.year = 2000 |
Find the name of the source user with the highest average trust score. | SELECT T1.name FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.source_u_id GROUP BY T2.source_u_id ORDER BY avg(trust) DESC LIMIT 1 |
Show station names without any trains. | SELECT name FROM station WHERE station_id NOT IN (SELECT station_id FROM train_station) |
What is the version number and template type code for the template with version number later than 5? | SELECT version_number , template_type_code FROM Templates WHERE version_number > 5 |
What is the year that had the most concerts? | SELECT YEAR FROM concert GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1 |
Show different citizenships and the maximum net worth of singers of each citizenship. | SELECT Citizenship , max(Net_Worth_Millions) FROM singer GROUP BY Citizenship |
What is the discipline for the summer Olympics in 2008? | SELECT discipline FROM table_name_68 WHERE tournament = "summer olympics" AND year = 2008 |
Which episode 4 has a Star of anna powierza? | SELECT episode_4 FROM table_name_87 WHERE star = "anna powierza" |
What are the maximum and average height of the mountains? | SELECT max(height) , avg(height) FROM mountain |
What is the average inflation rate of the biggest continent? | SELECT AVG(T4.Inflation) FROM continent AS T1 INNER JOIN encompasses AS T2 ON T1.Name = T2.Continent INNER JOIN country AS T3 ON T3.Code = T2.Country INNER JOIN economy AS T4 ON T4.Country = T3.Code WHERE T1.Name = ( SELECT Name FROM continent ORDER BY Area DESC LIMIT 1 ) |
What are the death and injury situations caused by the ship with tonnage 't'? | SELECT T1.killed , T1.injured FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id WHERE T2.tonnage = 't' |
Did the Bulls win or lose at Valley Parade? | SELECT result FROM table_name_84 WHERE venue = "valley parade" |
Which Game has a Score of 3–4? | SELECT MIN(game) FROM table_name_76 WHERE score = "3–4" |
Which complaint is more urgent, complaint ID CR2400594 or ID CR2405641? | SELECT CASE WHEN SUM(CASE WHEN `Complaint ID` = 'CR2400594' THEN priority END) > SUM(CASE WHEN `Complaint ID` = 'CR2405641' THEN priority END) THEN 'CR2400594' ELSE 'CR2405641' END FROM callcenterlogs |
What is the model year of the truck used in shipment id 1003? | SELECT T1.model_year FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id WHERE T2.ship_id = '1003' |
What are the average enrollment size of the universities that are founded before 1850? | SELECT avg(enrollment) FROM university WHERE founded < 1850 |
What payment method was used for Needed Resource Materials For My Students? | SELECT T3.payment_method FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN donations AS T3 ON T2.projectid = T3.projectid WHERE T1.title = 'Needed Resource Materials For My Students' |
What is the average weight of all players? | SELECT avg ( weight ) FROM player |
What are the highest number of games played that had game starts of 10, receptions of 6 and fumbles smaller than 3? | SELECT MAX(games_played) FROM table_name_9 WHERE receptions = 6 AND games_started = 10 AND fumbles < 3 |
If the lees team is Clare Balding and Miranda Hart, what was the score? | SELECT scores FROM table_23575917_7 WHERE lees_team = "Clare Balding and Miranda Hart" |
What transfer fee has both winter as the transfer window, and Madureira as the moving to? | SELECT transfer_fee FROM table_name_68 WHERE transfer_window = "winter" AND moving_to = "madureira" |
In papers with journal IDs from 200 to 300 and with its short name starts with A, what is the percentage of papers with conference ID of 0? | SELECT CAST(SUM(CASE WHEN T1.ConferenceId = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.ConferenceId) FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.JournalId BETWEEN 200 AND 300 AND T2.ShortName LIKE 'A%' |
Which country does Airline "JetBlue Airways" belong to? | SELECT Country FROM AIRLINES WHERE Airline = "JetBlue Airways" |
Which city has most number of departing flights? | SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.SourceAirport GROUP BY T1.City ORDER BY COUNT(*) DESC LIMIT 1 |
How many orders made by Rochester Ltd? | SELECT SUM(CASE WHEN T1.`Customer Names` = 'Rochester Ltd' THEN 1 ELSE 0 END) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID |
What was the amount of Births (000s) that had a death rate larger than 7.6, and a Year of 1990-2009? | SELECT SUM(births__000s_) FROM table_name_59 WHERE deaths > 7.6 AND year = "1990-2009" |
Which Played has a Club of atlético ceuta, and less than 11 Losses? | SELECT MAX(played) FROM table_name_40 WHERE club = "atlético ceuta" AND losses < 11 |
How many entrants was yves giraud-cabantous? | SELECT COUNT(entrant) FROM table_21977627_1 WHERE driver = "Yves Giraud-Cabantous" |
What is the Week, when the Finalist is Carlos Moyá (5)? | SELECT week FROM table_name_66 WHERE finalist = "carlos moyá (5)" |
How many teachers in Twin Falls have Math & Science as their primary focus area? | SELECT COUNT(teacher_acctid) FROM projects WHERE school_county = 'Twin Falls' AND primary_focus_area = 'Math & Science' |
What is the average total donations received by Fresno County colleges? | SELECT SUM(T2.donation_optional_support + T2.donation_to_project) / COUNT(donationid) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.school_county = 'Fresno' |
What's the highest Played with a Scored of 15, and Draws that's less than 1? | SELECT MAX(played) FROM table_name_80 WHERE scored = 15 AND draws < 1 |
Which driver had a Part 1 time of 1:13.306? | SELECT driver FROM table_name_56 WHERE part_1 = "1:13.306" |
What was the score for place 4? | SELECT score FROM table_name_21 WHERE place = "4" |
From which cities are the customers who gave 5 stars in their reviews in November 2012? | SELECT DISTINCT T1.City FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.StarRating = 5 AND T2.ReviewDate BETWEEN '2012-11-01' AND '2012-11-30' |
find the name and age of the pilot who has won the most number of times among the pilots who are younger than 30. | SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY count(*) DESC LIMIT 1 |
Finally, what is the average budget, the maximum budget, and the minimum budget for all movies before 2000? | SELECT avg ( budget_million ) , max ( budget_million ) , min ( budget_million ) FROM movie WHERE YEAR < 2000 |
List the stars of episodes aired in November 2008. | SELECT T2.stars FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE SUBSTR(T1.air_date, 1, 7) = '2008-11'; |
Who is the director of Last Window: The Secret of Cape West 3? | SELECT director FROM table_name_93 WHERE title = "last window: the secret of cape west 3" |
Which address has the most memberships? | SELECT Address_road FROM branch ORDER BY membership_amount DESC LIMIT 1 |
Name the deceased spouse for length of marriage being 24 years | SELECT deceased_spouse FROM table_24143253_1 WHERE length_of_marriage = "24 years" |
Can you show me how many rooms are there in total? | select count ( * ) from room |
Among all the players that are right-shooted, how many of them weigh over 90 kg? | SELECT COUNT(T1.ELITEID) FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T2.weight_in_kg > 90 AND T1.shoots = 'R' |
When the Away team is fitzroy on the Date of 15 july 1967, what was the Home team playing? | SELECT home_team FROM table_name_89 WHERE date = "15 july 1967" AND away_team = "fitzroy" |
which one is located in New York. | Do you mean York? | sorry, yes. | SELECT ObjectNumber FROM railway WHERE Railway_ID NOT IN ( SELECT Railway_ID FROM train ) AND LOCATION = "York" |
Who are the contenders In the New York 19 polling area race? | SELECT candidates FROM table_1342256_32 WHERE district = "New York 19" |
When the county is Carroll what is the lowest population? | SELECT MIN(population) FROM table_name_50 WHERE county = "carroll" |
What was the score that led to an 11-16 record? | SELECT score FROM table_name_77 WHERE record = "11-16" |
What is the actual departure time of JetBlue Airways with the plane's tail number N903JB to Fort Lauderdale-Hollywood International Airport on the 20th of August 2018? | SELECT T1.DEP_TIME FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code INNER JOIN Airports AS T3 ON T1.DEST = T3.Code WHERE T1.FL_DATE = '2018/8/20' AND T1.TAIL_NUM = 'N903JB' AND T2.Description LIKE '%JetBlue Airways%' AND T3.Description LIKE '%Fort Lauderdale-Hollywood%' |
If the position in table is 10th, and the manner of departure was resigned, what was the date of vacancy? | SELECT date_of_vacancy FROM table_27133147_3 WHERE manner_of_departure = "Resigned" AND position_in_table = "10th" |
List the types and results of the inspections done on Riverwalk café. | SELECT T2.inspection_type, T2.results FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T1.facility_type = 'RIVERWALK CAFE' |
What is Points, when Played is "20", and when Club is "Caldicot RFC"? | SELECT points FROM table_name_64 WHERE played = "20" AND club = "caldicot rfc" |
Which countries have more than two members? | SELECT Country FROM member GROUP BY Country HAVING COUNT(*) > 2 |
What is the age of the oldest of those students? | SELECT MAX ( Age ) FROM Student where Major = 600 |
Tell me the Ryuji Hijikata for Block A of Ryuji Hijikata | SELECT ryuji_hijikata FROM table_name_72 WHERE block_a = "ryuji hijikata" |
What are the major record formats of orchestras, sorted by their frequency? | SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*) ASC |
How many trains are there per station? | SELECT t2.station_id, count ( * ) FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id GROUP BY t2.station_id |
What was the overall score when the score of set 3 was 29–27? | SELECT score FROM table_name_63 WHERE set_3 = "29–27" |
Return the names of all counties sorted by population in ascending order. | SELECT County_name FROM county ORDER BY Population ASC |
Tell me the finalists for week # less than 2 | SELECT finalists FROM table_name_40 WHERE week__number < 2 |
How many budgets are above 3000 in year 2001 or before? | SELECT COUNT(*) FROM budget WHERE budgeted > 3000 AND YEAR <= 2001 |
What are the name and payment method of customers who have both mailshots in 'Order' outcome and mailshots in 'No Response' outcome. | SELECT T2.customer_name , T2.payment_method FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.outcome_code = 'Order' INTERSECT SELECT T2.customer_name , T2.payment_method FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.outcome_code = 'No Response' |
How many players did not get more than 10 steals between the years 2000 and 2005? | SELECT COUNT(DISTINCT playerID) FROM player_allstar WHERE season_id BETWEEN 2000 AND 2005 AND steals <= 10 |
Which Series has a Site of ames on september 10, 2005? | SELECT series FROM table_name_90 WHERE site = "ames" AND date = "september 10, 2005" |
Which occurence has the matrix sim marked as 0.925? | SELECT occurrence FROM table_26708105_2 WHERE matrix_sim = "0.925" |
Between 1/1/2010 to 12/31/2020, how many users, who were a trialist when they created the list, gave the movie "The Secret Life of Words" a rating score of 3? | SELECT COUNT(T1.user_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'The Secret Life of Words' AND T1.rating_score = 3 AND T1.user_trialist = 0 AND T1.rating_timestamp_utc BETWEEN '2010%' AND '2020%' |
On October 31 what team played at home? | SELECT home FROM table_name_56 WHERE date = "october 31" |
What is the total kills of the perpetrators with height more than 1.84. | SELECT sum(T2.Killed) FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 1.84; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.