sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
show me the name and ids of these stations | SELECT T1.name , T1.id FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING avg ( T2.bikes_available ) > 14 UNION SELECT name , id FROM station WHERE installation_date LIKE "12/%" |
Show how many department stores does the store chain South have? | SELECT count ( * ) FROM department_stores AS T1 JOIN department_store_chain AS T2 ON T1.dept_store_chain_id = T2.dept_store_chain_id WHERE T2.dept_store_chain_name = "South" |
what is the population of Abbotsford | SELECT Population FROM county_public_safety WHERE Name = "Abbotsford" |
can you how me a list of artists? | SELECT artist_name FROM artist |
How many grids does Ducati have with Casey Stoner as a rider with fewer than 27 laps? | SELECT COUNT(grid) FROM table_name_11 WHERE manufacturer = "ducati" AND rider = "casey stoner" AND laps < 27 |
How many locations have the callsign DXGH? | SELECT COUNT(location) FROM table_28794440_1 WHERE callsign = "DXGH" |
Indicate the name of the congressman represent in Guanica. | SELECT T3.first_name, T3.last_name FROM zip_data AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T2.district = T3.cognress_rep_id WHERE T1.city = 'Guanica' |
In 1992, what class has higher wins than 0? | SELECT class FROM table_name_58 WHERE wins > 0 AND year = 1992 |
what is 2012 when the tournament is cincinnati masters? | SELECT 2012 FROM table_name_66 WHERE tournament = "cincinnati masters" |
Which drives drove a lexus, made all rounds, had a tyre of B and was on the team of petronas toyota team tom's? | SELECT drivers FROM table_name_2 WHERE rounds = "all" AND make = "lexus" AND tyre = "b" AND team = "petronas toyota team tom's" |
How much does the most expensive charge type costs? | SELECT MAX(charge_amount) FROM Charges |
What other years did the Cherry Awards occur during? | SELECT YEAR FROM festival_detail WHERE Festival_Name = "Cherry Awards" |
What is the largest number for karianne gulliksen? | SELECT MAX(karianne_gulliksen) FROM table_28677723_5 |
When did user 39115684 rate the movie "A Way of Life"? | SELECT T1.rating_score FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'A Way of Life' AND T1.user_id = 39115684 |
Count the number of students who have advisors. | SELECT count(DISTINCT s_id) FROM advisor |
Among the race of all students, what is the control of institution and level of institution with highest number of students? | SELECT DISTINCT T1.control, T1.level FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T2.race = 'X' AND T1.student_count = ( SELECT MAX(T1.student_count) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T2.race = 'X' ) |
Show the names of journalists and the number of events they reported. | SELECT T3.Name , COUNT(*) FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name |
What are the room name and base price of the room with the lowest base price? | SELECT roomName , basePrice FROM Rooms ORDER BY basePrice ASC LIMIT 1; |
What country is the player, with an undisclosed transfer fee and moving to Nacional, from? | SELECT country FROM table_name_96 WHERE transfer_fee = "undisclosed" AND moving_to = "nacional" |
How many Picks have a Round larger than 2, and a Name of lawrence sidbury, and an Overall smaller than 125? | SELECT COUNT(pick__number) FROM table_name_69 WHERE round > 2 AND name = "lawrence sidbury" AND overall < 125 |
Please show me the names and years of the movies that has the top 3 highest rating stars | SELECT T2.title , T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID ORDER BY T1.stars DESC LIMIT 3 |
How many total customer are there? | SELECT COUNT ( * ) FROM Customers |
What is the height for Nikola Franković? | SELECT height FROM table_name_45 WHERE name = "nikola franković" |
How many total wins are associated with events with 1 top-10? | SELECT SUM(wins) FROM table_name_63 WHERE top_10 = 1 |
What is the average ratio between female and male actors in a movie? | SELECT CAST(COUNT(CASE WHEN T2.gender = 'Female' THEN T1.person_id ELSE NULL END) AS REAL) / COUNT(CASE WHEN T2.gender = 'Male' THEN T1.person_id ELSE NULL END) FROM movie_cast AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.gender_id |
What year was John m. Belk Arena built? | SELECT year_built FROM table_name_74 WHERE venue = "john m. belk arena" |
Name the number of color for furcifer pardalis | SELECT COUNT(color) FROM table_175442_1 WHERE scientific_name = "Furcifer pardalis" |
What team was the away team when the tie no is 40? | SELECT away_team FROM table_name_67 WHERE tie_no = "40" |
What is the highest number of poles? | SELECT MAX(poles) FROM table_26794530_1 |
What time or retired does Scott Dixon have? | SELECT time_retired FROM table_name_7 WHERE driver = "scott dixon" |
How about the year before that? | Did you mean which college conferred the most number of degrees in 2003? | Yes | SELECT t1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t3.year = 2003 ORDER BY t3.degrees DESC LIMIT 1 |
How many overs bowled for muttiah muralitharan? | SELECT COUNT(overs_bowled) FROM table_15700367_6 WHERE name = "Muttiah Muralitharan" |
What is the maximum renewable energy (gw×h) for the state of Delaware? | SELECT MAX(renewable_electricity__gw) AS •h_ FROM table_25244412_1 WHERE state = "Delaware" |
How many route/via's are there for the ernad express? | SELECT COUNT(route_via) FROM table_29770377_1 WHERE train_name = "Ernad Express" |
What is the total average for the England team when the wickets are less than 18, the best bowling is 4/138, and there are less than 3 matches? | SELECT COUNT(average) FROM table_name_57 WHERE team = "england" AND wickets < 18 AND best_bowling = "4/138" AND matches < 3 |
Which Car # has a Make of toyota, and a Pos of 7? | SELECT AVG(car__number) FROM table_name_93 WHERE make = "toyota" AND pos = 7 |
Name the common name for furcifer pardalis | SELECT common_name FROM table_175442_1 WHERE scientific_name = "Furcifer pardalis" |
how many times is the name matt targett and the lane higher than 7? | SELECT COUNT(time) FROM table_name_44 WHERE name = "matt targett" AND lane > 7 |
What are the first and last names of all students who are not living in the city HKG and order the results by age? | SELECT fname , lname FROM student WHERE city_code != 'HKG' ORDER BY age |
List all the methods with a solution with a "636449700980488000" processed time. | SELECT DISTINCT T2.Name FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.ProcessedTime = 636449700980488000 |
What is the github address of the solution path "joeyrobert_bloomfilter\DataTypes.BloomFilter.sln"? | SELECT T1.Url FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Path = 'joeyrobert_bloomfilterDataTypes.BloomFilter.sln' |
Which country has the 5th highest infant mortality rate? | SELECT T2.Name FROM population AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code ORDER BY T1.Infant_Mortality DESC LIMIT 4, 1 |
What is To par, when Margin of Victory is "2 Strokes", and when Tournament is "Women's British Open"? | SELECT to_par FROM table_name_98 WHERE margin_of_victory = "2 strokes" AND tournament = "women's british open" |
Who was the director of Chaser on the Rocks? | SELECT director FROM table_name_74 WHERE title = "chaser on the rocks" |
List the countries and their official languages in Antarctica. | SELECT T1.Name, T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = 'Antarctica' AND T2.IsOfficial = 'T' |
How many draws did švyturys Klaipėda have? | SELECT MIN(draws) FROM table_16034882_4 WHERE club = "Švyturys Klaipėda" |
Show the names and grades of each high schooler. | SELECT name , grade FROM Highschooler |
What are the results of the elections in which Ted Strickland is seeking re-election? | SELECT results FROM table_1805191_36 WHERE incumbent = "Ted Strickland" |
Show ids for all aircrafts with more than 1000 distance. | SELECT aid FROM Aircraft WHERE distance > 1000 |
Which city has a venue of the Arco Arena? | SELECT city FROM table_name_42 WHERE venue = "arco arena" |
What is the earliest year with less than 45 points for Yamaha team in 21st rank? | SELECT MIN(year) FROM table_name_49 WHERE points < 45 AND team = "yamaha" AND rank = "21st" |
Show the name, time, and service for all trains. | SELECT name , TIME , service FROM train |
What is the difficulty of the athens circuit? | SELECT difficulty FROM table_24463470_1 WHERE circuit = "Athens" |
What is the pick # for player david grannis? | SELECT MAX(pick__number) FROM table_21721351_18 WHERE player = "David Grannis" |
Show the member name and hometown who registered a branch in 2016. | SELECT T2.name , T2.hometown FROM membership_register_branch AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T1.register_year = 2016 |
please tell me alice friend name | SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Alice' |
When did Shelia Lawrence join the series? | SELECT MIN(series__number) FROM table_11404452_1 WHERE writer_s_ = "Shelia Lawrence" |
List the tournament that kent state won? | SELECT conference AS Tournament FROM table_24348134_3 WHERE tournament_winner = "Kent State" |
Among the active employees, how many of them have a courtesy title of "Mr"? | SELECT COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.CurrentFlag = 1 AND T2.Title = 'Mr.' |
Tell me the number range for 1965-66 | SELECT no_range FROM table_name_58 WHERE year_built__converted * _ = "1965-66" |
Which constitutional monarchy nations saw the greatest growth in the number of organizations after 1907? | SELECT T1.Name FROM country AS T1 INNER JOIN organization AS T2 ON T1.Code = T2.Country INNER JOIN politics AS T3 ON T3.Country = T2.Country WHERE STRFTIME('%Y', T2.Established) > '1907' AND T3.Government = 'constitutional monarchy' GROUP BY T1.Name ORDER BY COUNT(DISTINCT T2.Name) DESC LIMIT 1 |
What are all the document type codes and document type names? | SELECT document_type_code , document_type_name FROM Ref_document_types |
How many millions of US viewers watched the episode written by Jack Sanderson? | SELECT us_viewers__millions_ FROM table_27462177_1 WHERE written_by = "Jack Sanderson" |
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; |
Give the country id and corresponding count of cities in each country. | SELECT country_id , COUNT(*) FROM locations GROUP BY country_id |
What was the total purse in the years after 1996 with a score of 272 (-16) when frank nobilo won? | SELECT SUM(purse___) AS $__ FROM table_name_27 WHERE score = "272 (-16)" AND winner = "frank nobilo" AND year > 1996 |
How many teams had a #1 draft pick that won the Rookie of the Year Award? | SELECT COUNT(team) FROM table_1004033_1 WHERE draft_pick__number = "1" |
Which opponents conference has the result L, 62-10? | SELECT opponents_conference FROM table_26240481_1 WHERE result = "L, 62-10" |
What is the highest total for bronze with a gold larger than 0, a silver smaller than 5, and a total of 15? | SELECT MAX(bronze) FROM table_name_84 WHERE gold > 0 AND total = 15 AND silver < 5 |
What about the most common country? | SELECT Country FROM member GROUP BY Country ORDER BY COUNT ( * ) DESC LIMIT 1 |
Which home team played the away team of collingwood? | SELECT home_team FROM table_name_14 WHERE away_team = "collingwood" |
Where is the orchestra when the year of recording is 1934? | SELECT orchestra FROM table_222198_1 WHERE year_of_recording = 1934 |
What district is incumbent frank chelf from? | SELECT district FROM table_1341884_19 WHERE incumbent = "Frank Chelf" |
ok i see the transactions of the sales. and then what are the ones that were purchases? | select transaction_id from Transactions where transaction_type_code = 'PUR' |
What are the job ids and dates of hire for employees hired after November 5th, 2007 and before July 5th, 2009? | SELECT job_id , hire_date FROM employees WHERE hire_date BETWEEN '2007-11-05' AND '2009-07-05' |
How many customers have an address that is located in the city of Villeneuve-la-Garenne? | SELECT COUNT(address_id) FROM address WHERE city = 'Villeneuve-la-Garenne' |
Who was the winner of the season before 2010 with Lietuvos Rytas as a finalist? | SELECT winner FROM table_name_39 WHERE finalist = "lietuvos rytas" AND season < 2010 |
Find the number of distinct products Rodrick Heaney has bought so far. | SELECT count(DISTINCT product_id) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = "Rodrick Heaney" |
Who called the race in 1978? | SELECT race_caller FROM table_22583466_5 WHERE year = 1978 |
Find the max, average, and minimum gpa of all students in each department. | SELECT max(stu_gpa) , avg(stu_gpa) , min(stu_gpa) , dept_code FROM student GROUP BY dept_code |
What country scored 71-66-66-71=274? | SELECT country FROM table_name_32 WHERE score = 71 - 66 - 66 - 71 = 274 |
What is the average savings account balance? | SELECT avg ( balance ) FROM savings |
How many people attended the game on June 18? | SELECT COUNT(attendance) FROM table_name_85 WHERE date = "june 18" |
What are the ids of all students for courses and what are the names of those courses? | SELECT T1.student_id, T2.course_name FROM student_course_registrations AS T1 JOIN courses AS T2 ON T1.course_id = T2.course_id |
And what are their status? | SELECT Roller_Coaster_ID , status FROM roller_coaster WHERE LENGTH > 3300 and Height > 100 |
When the number is 2 what is the lowest amount of al-wedhat wins? | SELECT MIN(al_wehdat_wins) FROM table_2985714_2 WHERE _number = 2 |
What week was the tournament at Cincinnati? | SELECT week FROM table_name_57 WHERE tournament = "cincinnati" |
Show me the title of album id 1? | SELECT T1.Title FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistID where T1.AlbumId = 1 |
Find the name and level of catalog structure with level between 5 and 10. | SELECT catalog_level_name , catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 10 |
Which team has a car # before 99, a Toyota, and is driven by Mike Skinner? | SELECT team FROM table_name_1 WHERE car__number < 99 AND make = "toyota" AND driver = "mike skinner" |
What was the result of the game that had 56,500 in attendance? | SELECT result FROM table_name_15 WHERE attendance = "56,500" |
What was the final score when the Temple Owls beat Virginia Tech? | SELECT score FROM table_25461946_5 WHERE team = "Virginia Tech" |
what is the company name of XPERIA T, XPERIA J | SELECT Company_name from phone WHERE Hardware_Model_name = "XPERIA T, XPERIA J" |
What is the lowest against that has bacchus marsh as a ballarat fl, with wins less than 1? | SELECT MIN(against) FROM table_name_75 WHERE ballarat_fl = "bacchus marsh" AND wins < 1 |
find the college name for the player id 10001 | SELECT T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.Pid = '10001' |
What was the lowest squad with 0 goals? | SELECT MIN(squad_no) FROM table_name_81 WHERE goals < 0 |
what is the average of prices* | SELECT AVG ( Price ) FROM schedule |
What are the names and genders of all artists who released songs in the month of March? | SELECT T1.artist_name , T1.gender FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.releasedate LIKE "%Mar%" |
What First runner-up has a Miss Maja Pilipinas of nanette prodigalidad? | SELECT first_runner_up FROM table_name_40 WHERE miss_maja_pilipinas = "nanette prodigalidad" |
How many Februarys have montreal canadiens as the opponent, and 18-25-10 as the record, with a game greater than 53? | SELECT COUNT(february) FROM table_name_32 WHERE opponent = "montreal canadiens" AND record = "18-25-10" AND game > 53 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.