sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
How many counties are there in Virginia State? | SELECT COUNT(T2.county) FROM state AS T1 INNER JOIN country AS T2 ON T1.abbreviation = T2.state WHERE T1.name = 'Virginia' |
Which Round has a Player of todd fedoruk? | SELECT SUM(round) FROM table_name_28 WHERE player = "todd fedoruk" |
What is the average react of bryan barnett, who has a lane less than 2? | SELECT AVG(react) FROM table_name_59 WHERE name = "bryan barnett" AND lane < 2 |
How many of those are not in San Jose City? | select count ( * ) from ( SELECT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING avg ( bikes_available ) > 10 EXCEPT SELECT name FROM station WHERE city = "San Jose" ) |
Also, what is the color code? | SELECT t1.color_code , t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = "chervil" |
Can you show me the student names with ids? | SELECT StuID, LName, Fname FROM Student |
Wins smaller than 0 had what sum of year? | SELECT SUM(year) FROM table_name_16 WHERE wins < 0 |
Find average unit price? | SELECT avg ( unit_price ) from tracks |
What is the set 1 score when the total is 85–101? | SELECT set_1 FROM table_name_92 WHERE total = "85–101" |
Name the Weight of ádám steinmetz category:articles with hcards? | SELECT weight FROM table_name_96 WHERE name = "ádám steinmetz category:articles with hcards" |
Find all the forenames of distinct drivers who was in position 1 as standing and won? | SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1 |
Which FA Cup apps has league goals of 1 with total goals less than 1? | SELECT AVG(fa_cup_apps) FROM table_name_47 WHERE league_goals = 1 AND total_goals < 1 |
What is the total for guests with a ship name of rv indochina, and a crew smaller than 28? | SELECT COUNT(guests) FROM table_name_89 WHERE ship_name = "rv indochina" AND crew < 28 |
List out the nation of players who played for the 1997-1998 season . | SELECT DISTINCT T2.nation FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '1997-1998' |
What are the titles of the top 5 Catalan language Wikipedia page with the least number of different words? Indicate each title's word id that has appeared the most in the said pages. | SELECT T1.title FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid ORDER BY T1.words LIMIT 5 |
Name the runner-up for janice yan (閻奕格) | SELECT runner_up FROM table_name_35 WHERE winner = "janice yan (閻奕格)" |
what is the Open Date of Pure Church of Christ? | Did you mean the open date of the church named Pure Church of Christ? | yes | SELECT open_date FROM church where name = "Pure Church of Christ" |
Which Home team has a Year of 2002/03, and a Venue of tahnoun bin mohamed stadium? | SELECT home_team FROM table_name_35 WHERE year = "2002/03" AND venue = "tahnoun bin mohamed stadium" |
What character did actor Damien Richardson play? | SELECT character FROM table_name_50 WHERE actor_actress = "damien richardson" |
Among the players with a height of over 6'2" inches, how many of them were born in Sweden? | SELECT COUNT(T1.ELITEID) FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id WHERE T2.height_in_inch > '6''2"' AND T1.nation = 'Sweden' |
Okay, and what about the average followers for those who do have tweets? | SELECT avg ( followers ) FROM user_profiles WHERE UID IN ( SELECT UID FROM tweets ) |
What is the average grid with brm and under 63 laps? | SELECT AVG(grid) FROM table_name_33 WHERE constructor = "brm" AND laps < 63 |
Hi, could you please show me the list of all appellations those produce wine after 2008? | SELECT Appelation FROM WINE WHERE YEAR > 2008 |
What is the total rank for New Zealand, when less than 1 bronze medals were won? | SELECT SUM(rank) FROM table_name_56 WHERE nation = "new zealand" AND bronze < 1 |
What are the types of competition that have most 5 competitions for that type? | SELECT Competition_type FROM competition GROUP BY Competition_type HAVING COUNT(*) <= 5 |
Show the status shared by cities with population bigger than 1500 and smaller than 500. | SELECT Status FROM city WHERE Population > 1500 INTERSECT SELECT Status FROM city WHERE Population < 500 |
Whats the highest Promotions that has a Team of Pallacanestro Messina, along with Relegations larger than 0? | SELECT MAX(promotions) FROM table_name_43 WHERE team = "pallacanestro messina" AND relegations > 0 |
What was the losing score on September 1? | SELECT loss FROM table_name_48 WHERE date = "september 1" |
How old is the doctor named Zach? | SELECT age FROM Person WHERE job = 'doctor' AND name = 'Zach' |
What is the name of the document which has been accessed the most times, as well as the number of times it has been accessed? | SELECT document_name , access_count FROM documents ORDER BY access_count DESC LIMIT 1 |
How many picks have a Player of pong escobal? | SELECT SUM(pick) FROM table_name_80 WHERE player = "pong escobal" |
What was the population fo the township with a Latitude of 48.853051, and a Water (sqmi) smaller than 0.9590000000000001? | SELECT MAX(pop__2010_) FROM table_name_85 WHERE latitude = 48.853051 AND water__sqmi_ < 0.9590000000000001 |
When are the birthdays of customer who are classified as 'Good Customer' status? | SELECT date_of_birth FROM Customers WHERE customer_status_code = 'Good Customer' |
What season did the player who came from Cebu play in? | SELECT season FROM table_name_64 WHERE school_club_team = "cebu" |
What is the area of xin county? | SELECT area FROM table_2847477_2 WHERE english_name = "Xin County" |
What are their item IDs? | SELECT i_id FROM item WHERE i_id NOT IN ( SELECT i_id FROM review ) |
What is Fastest Lap, when Date is Leeds, Alabama, and when Circuit is April 19? | SELECT fastest_lap FROM table_name_18 WHERE date = "leeds, alabama" AND circuit = "april 19" |
What was the delivery date when s2 (lst) type, s2 (frigate) type, c1-m type was delivered? | SELECT 1 AS st_ship_delivery_date FROM table_11552751_2 WHERE ship_types_delivered = "S2 (LST) type, S2 (frigate) type, C1-M type" |
How many teams did Farhad Kazemi leave? | SELECT COUNT(team) FROM table_22297198_3 WHERE outgoing_manager = "Farhad Kazemi" |
What was the score when they had a 25-41-9 record? | SELECT score FROM table_name_84 WHERE record = "25-41-9" |
What was the topic of the article "A Formal Approach to Service Component Architecture" and when was it published? | SELECT Keyword, Year FROM Paper WHERE Title = 'A Formal Approach to Service Component Architecture' |
Show name of all students who have some friends and also are liked by someone else. | SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id |
Tell me the lowest week for attendance of 60,894 | SELECT MIN(week) FROM table_name_37 WHERE attendance = "60,894" |
List down the company names which supplied products for the order on 14th August, 1996. | SELECT T1.CompanyName FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.SupplierID = T2.SupplierID INNER JOIN `Order Details` AS T3 ON T2.ProductID = T3.ProductID INNER JOIN Orders AS T4 ON T3.OrderID = T4.OrderID WHERE date(T4.OrderDate) = '1996-08-14' |
Show the colleges that have both authors with submission score larger than 90 and authors with submission score smaller than 80. | SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80 |
Which game has a result of 113-106? | SELECT game FROM table_name_29 WHERE result = "113-106" |
How many partys have a candidate first elected in 1923? | SELECT COUNT(party) FROM table_1342256_33 WHERE first_elected = 1923 |
What is the border length between 'USA' and 'MEX' | SELECT Length FROM borders WHERE Country1 = 'MEX' AND Country2 = 'USA' |
On what dates were employees without the letter M in their first names hired? | SELECT hire_date FROM employees WHERE first_name NOT LIKE '%M%' |
Cool! Can you show me a list of all of the different product names? | select distinct product_name from products |
Find the net profit of the floral products which were delivered in 2021. | SELECT SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.DeliveryDate LIKE '%/%/21' AND T2.`Product Name` = 'Floral' |
Show the average amount of transactions for different lots, ordered by average amount of transactions. | SELECT T2.lot_id, AVG(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id ORDER BY AVG(amount_of_transaction) |
What is the most common nationality of the 3 nationalities? | SELECT Nationality FROM pilot GROUP BY Nationality ORDER BY COUNT ( * ) DESC LIMIT 1 |
What is the author of the submission with the highest score? | SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1 |
And what about the avocado's rank? | SELECT rank FROM review WHERE i_id = ( select i_id from item where title = "avocado" ) |
Which Opened is the highest one that has a Themed Area of aerial park, and a Manufacturer of zamperla? | SELECT MAX(opened) FROM table_name_76 WHERE themed_area = "aerial park" AND manufacturer = "zamperla" |
Name the south american rank for venezuela | SELECT MIN(south_american_rank) FROM table_2249087_1 WHERE nation = "Venezuela" |
Which Round is the highest one that has a Pick smaller than 10, and a Name of tory nixon? | SELECT MAX(round) FROM table_name_7 WHERE pick < 10 AND name = "tory nixon" |
Who is responsible for most of the inspections? Give the full name. | SELECT T.first_name, T.last_name FROM ( SELECT T2.employee_id, T2.first_name, T2.last_name, COUNT(T1.inspection_id) FROM inspection AS T1 INNER JOIN employee AS T2 ON T1.employee_id = T2.employee_id GROUP BY T2.employee_id, T2.first_name, T2.last_name ORDER BY COUNT(T1.inspection_id) DESC LIMIT 1 ) AS T |
What are the allergies and their types? | SELECT allergy , allergytype FROM Allergy_type |
Which number belonged to the school team from Arizona? | SELECT no FROM table_15621965_17 WHERE school_club_team = "Arizona" |
What were the least points with a Coloni FC88 chassis? | SELECT MIN(points) FROM table_name_43 WHERE chassis = "coloni fc88" |
How many papers were published by the "Virtual Reality, IEEE Annual International Symposium" conference in 2012? | SELECT COUNT(T2.Id) FROM Conference AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.ConferenceId WHERE T1.FullName = 'Virtual Reality, IEEE Annual International Symposium' AND T2.Year = 2012 |
What are all the location codes and location names? | SELECT location_code , location_name FROM Ref_locations |
What region is the toshiba emi label with a cd format? | SELECT region FROM table_name_51 WHERE format_s_ = "cd" AND label = "toshiba emi" |
Between the Ivy League Schools, which school's state have the lowest sate appropriations to higher education in fiscal year 2011 per resident? | SELECT T1.state FROM institution_details AS T1 INNER JOIN state_sector_details AS T2 ON T2.state = T1.state WHERE T1.chronname IN ( 'Brown University', 'Columbia University', 'Cornell University', 'Dartmouth College', 'Harvard University', 'Princeton University', 'University of Pennsylvania', 'Yale University' ) GROUP BY T1.state ORDER BY SUM(T2.state_appr_value) ASC LIMIT 1 |
What is the personal name of student ID 15? | SELECT personal_name FROM Students where student_id = 15 |
Who was the girl of the week 2 weeks before terri lynn farrow in the same month? | SELECT week_2 FROM table_name_47 WHERE week_4 = "terri lynn farrow" |
Show the product type codes which have at least two products. | SELECT product_type_code FROM products GROUP BY product_type_code HAVING count(*) >= 2 |
Return the names of musicals who have the nominee Bob Fosse. | SELECT Name FROM musical WHERE Nominee = "Bob Fosse" |
can you show me campuses years? | SELECT Year FROM Campuses |
What are the age groups for the Big League World Series? | SELECT age_groups FROM table_name_26 WHERE competition_name = "big league world series" |
What is the Song with an Issue Date(s) that is 19 june? | SELECT song FROM table_name_70 WHERE issue_date_s_ = "19 june" |
List the locations that are shared by more than two wrestlers. | SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*) > 2 |
what was the drawn when the tries for was 46? | SELECT drawn FROM table_12792876_3 WHERE tries_for = "46" |
hi! how many employees are there that get a commission percentage? | SELECT COUNT ( DISTINCT EMPLOYEE_ID ) FROM employees WHERE COMMISSION_PCT > 0 |
When 9 is the rank who are the couple? | SELECT couple FROM table_19744915_18 WHERE rank = 9 |
Name the mountain peak of 49 rank | SELECT mountain_peak FROM table_name_67 WHERE rank = 49 |
List the 3 highest salaries of the players in 2001? | SELECT salary FROM salary WHERE YEAR = 2001 ORDER BY salary DESC LIMIT 3 |
Name what was published in july 1934 with a setting of mars | SELECT published_in FROM table_name_22 WHERE setting = "mars" AND publication_date = "july 1934" |
Show the statement detail and the corresponding document name for the statement with detail 'Private Project' ? | SELECT T1.statement_details , T2.document_name FROM Statements AS T1 JOIN Documents AS T2 ON T1.statement_id = T2.document_id WHERE T1.statement_details = 'Private Project' |
Name the visiting team for stadium of ralph wilson stadium | SELECT visiting_team FROM table_name_67 WHERE stadium = "ralph wilson stadium" |
Which Losses have a South West DFL of branxholme-wallacedale, and less than 2 Byes? | SELECT AVG(losses) FROM table_name_21 WHERE south_west_dfl = "branxholme-wallacedale" AND byes < 2 |
Which is the email of the party that has used the services the most number of times? | SELECT t1.party_email FROM parties AS t1 JOIN party_services AS t2 ON t1.party_id = t2.customer_id GROUP BY t1.party_email ORDER BY COUNT(*) DESC LIMIT 1 |
Show me the start dates and end dates of apartment bookings by these IDs please. | SELECT T1.booking_start_date , T1.booking_end_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = "Female" |
Which venue has a Result of draw? | SELECT venue FROM table_name_92 WHERE result = "draw" |
What outcome has September 23, 2013 as the date? | SELECT outcome FROM table_name_68 WHERE date = "september 23, 2013" |
How many different popular vote counts were there for the candidate Rick Perry? | SELECT COUNT(popular_vote) FROM table_20246201_9 WHERE candidate = "Rick Perry" |
Tell the capacity, length, height and width for the catalog entry name cola ? | SELECT capacity, length, height, width FROM catalog_contents WHERE catalog_entry_name = "Cola" |
What cities have more than 3 airports in the United States? | SELECT city FROM airports WHERE country = 'United States' GROUP BY city HAVING count ( * ) > 3 |
What is the total amount of money requested for three persons? | Sorry, which three persons do you want? | The three persons are Francesco Postiglione, Leonardo Binchi and Fabrizio Buonocore | SELECT sum ( T1.Money_Requested ) FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Name = "Francesco Postiglione" or T2.Name = "Leonardo Binchi" or T2.Name = "Fabrizio Buonocore" |
k. Who is the composer for For Those About To Rock (We Salute You) ? | SELECT distinct T2.Composer FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId where t1.title = 'For Those About To Rock We Salute You' |
How many different dates are there for founded teams for the venue of champion window field? | SELECT COUNT(founded) FROM table_name_77 WHERE venue = "champion window field" |
What is the venue of the game that was played on 23 October 1966? | SELECT venue FROM table_name_41 WHERE date = "23 october 1966" |
Which room has lowest price value? tell me the price, the name and Room ID | SELECT baseprice, roomName, roomid FROM Rooms WHERE basePrice = ( select min ( baseprice ) from rooms ) |
Can you tell me the Position that has the Entrant of j ampt? | SELECT position FROM table_name_67 WHERE entrant = "j ampt" |
Show all the activity names and the number of faculty involved in each activity. | SELECT T1.activity_name, COUNT(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID |
What is the Placement when the Votes are fewer than 208, and when the Candidate is Jordan Turner? | SELECT placement FROM table_name_58 WHERE votes < 208 AND candidate = "jordan turner" |
Who are the opponents in the February 19, 1996 final? | SELECT opponents_in_the_final FROM table_name_30 WHERE date = "february 19, 1996" |
Where did Footscray play as the away team? | SELECT venue FROM table_name_76 WHERE away_team = "footscray" |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.