sentence
stringlengths
3
347
sql
stringlengths
18
804
Give the airport code and airport name corresonding to the city Anthony.
SELECT AirportCode , AirportName FROM AIRPORTS WHERE city = "Anthony"
What's season 3's premiere date?
SELECT premiere_air_dates FROM table_1949994_7 WHERE no = 3
Who is the friend of Zach with longest year relationship?
SELECT friend FROM PersonFriend WHERE name = 'Zach' AND YEAR = (SELECT max(YEAR) FROM PersonFriend WHERE name = 'Zach')
What are the country names, area and population which has both roller coasters with speed higher
SELECT T1.name , T1.area , T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID WHERE T2.speed > 60 INTERSECT SELECT T1.name , T1.area , T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID WHERE T2.speed < 55
What is the average number of gold medals with more than 1 bronze medal?
SELECT AVG(gold) FROM table_name_6 WHERE bronze > 1
How many type classifications are given to the measure with the description, calling convention to revise state constitution?
SELECT COUNT(type) FROM table_256286_5 WHERE description = "Calling Convention to revise State Constitution"
What is the total number of faculty members?
SELECT count(*) FROM Faculty
Which competition has a Year of 2008, a Surface of carpet, and a Date of 31 jan?
SELECT competition FROM table_name_65 WHERE year = 2008 AND surface = "carpet" AND date = "31 jan"
What was the vacator for georgia 2nd?
SELECT vacator FROM table_2417340_4 WHERE district = "Georgia 2nd"
What is the address of the restaurant Subway?
SELECT Address FROM Restaurant WHERE ResName = "Subway";
What is the largest start for a player with 14 conv, 10 tries and more than 22 pens?
SELECT MAX(start) FROM table_name_29 WHERE conv = 14 AND tries = 10 AND pens > 22
What is the license award date for North East England?
SELECT licence_award_date FROM table_10712301_5 WHERE region = "North East England"
Give the title and credits for the course that is taught in the classroom with the greatest capacity.
SELECT T3.title , T3.credits FROM classroom AS T1 JOIN SECTION AS T2 ON T1.building = T2.building AND T1.room_number = T2.room_number JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T1.capacity = (SELECT max(capacity) FROM classroom)
Name the game for june 7
SELECT game FROM table_18894744_5 WHERE date = "June 7"
What is the largest goal number when the transfer fee was £0.8m?
SELECT MAX(goals) FROM table_name_50 WHERE transfer_fee = "£0.8m"
What is the average number of votes of representatives from party "Republican"?
SELECT AVG(T1.Votes) FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE T2.Party = "Republican"
What is the sum of points when Bruce Arena has 21 wins?
SELECT SUM(pts) FROM table_name_96 WHERE wins = 21 AND coach = "bruce arena"
What are the names of the dogs for which the owner has not spend more than 1000 for treatment ?
select name from dogs where dog_id not in ( select dog_id from treatments group by dog_id having sum(cost_of_treatment) > 1000 )
Can you list the customer names and ids who have credit cards?
SELECT T1.customer_id, T2.customer_first_name, T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.card_type_code = "Credit"
What is the Winning score when the To par was −21?
SELECT winning_score FROM table_name_21 WHERE to_par = "−21"
In what year did the #14 FitzBradshaw Racing compete?
SELECT year FROM table_1909647_2 WHERE team_s_ = "#14 FitzBradshaw Racing"
Which Courtside reporter has a Channel of fsn new england in 2006-07?
SELECT courtside_reporter FROM table_name_43 WHERE channel = "fsn new england" AND year = "2006-07"
Who are the players that have names containing the letter a?
SELECT DISTINCT pName FROM Player WHERE pName LIKE '%a%'
What is the away team score with geelong home team?
SELECT away_team AS score FROM table_name_68 WHERE home_team = "geelong"
How many losses are there in the CD Sabadell club with a goal difference less than -2, and more than 38 played?
SELECT SUM(losses) FROM table_name_26 WHERE goal_difference < -2 AND club = "cd sabadell" AND played > 38
How many entries are listed under "current status" for the WJW-TV ++ Station?
SELECT COUNT(current_status) FROM table_1353096_2 WHERE station = "WJW-TV ++"
When the total score is 740, what is tromso?
SELECT MIN(tromsø) FROM table_19439864_2 WHERE total = 740
What is the average number of Byes when there were less than 0 losses and were against 1247?
SELECT AVG(byes) FROM table_name_75 WHERE against = 1247 AND draws < 0
And what about electronics?
SELECT sum ( product_price ) FROM products AS t1 JOIN regular_order_products AS t2 ON t1.product_id = t2.product_id Where t1.product_name = 'electronics'
What is the average number played that has fewer than 11 wins, more than 42 goals, more than 22 points, and 11 losses?
SELECT AVG(played) FROM table_name_91 WHERE wins < 11 AND goals_for > 42 AND points > 22 AND losses = 11
What are the names of the directors who made exactly one movie?
SELECT director FROM Movie GROUP BY director HAVING COUNT(*) = 1
How many tweets have been posted on Wednesday?
SELECT COUNT(TweetID) FROM twitter WHERE Weekday = 'Wednesday'
What was the name in English that had a Stat of 7th cut?
SELECT english_name FROM table_name_43 WHERE stat = "7th cut"
Give the state corresponding to the line number building "6862 Kaitlyn Knolls".
SELECT state_province_county FROM addresses WHERE line_1_number_building LIKE "%6862 Kaitlyn Knolls%"
Please list the names of the teams that had a tie in 1909.
SELECT T2.name, T3.name FROM TeamVsTeam AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year INNER JOIN Teams AS T3 ON T1.year = T3.year AND T1.oppID = T3.tmID WHERE T1.year = 1909 AND T1.T = 1
How many wins does the team have whose goaltender have the most number of successfully stopping the other team from scoring during the entire game?
SELECT SUM(W) FROM Goalies GROUP BY tmID ORDER BY SUM(SHO) DESC LIMIT 1
Find all information about student addresses, and sort by monthly rental in descending order.
SELECT * FROM Student_Addresses ORDER BY monthly_rental DESC
What about the min?
SELECT min ( HS ) FROM Player
What country had an opponent of Sampdoria?
SELECT country FROM table_name_44 WHERE opponent = "sampdoria"
What are the different ids and names of the battles that lost any 'Brig' type shipes?
SELECT DISTINCT T1.id , T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.ship_type = 'Brig'
What was the score when Spennymoor United as the away team?
SELECT score FROM table_name_67 WHERE away_team = "spennymoor united"
What is the least amount of games for Luis scola with a rank greater than 1?
SELECT MIN(games) FROM table_name_88 WHERE rank > 1 AND name = "luis scola"
what is the lowest laps when the grid is smaller than 5 and the driver is juan manuel fangio?
SELECT MIN(laps) FROM table_name_45 WHERE grid < 5 AND driver = "juan manuel fangio"
How many colleges has more than 15000 students?
SELECT count(*) FROM College WHERE enr > 15000
How many values for number of clubs have Shandong as the runner-up?
SELECT COUNT(number_of_clubs) FROM table_17632217_1 WHERE runners_up = "Shandong"
How many time does the platelet count occur when prothrombin time and bleeding time are prolonged?
SELECT COUNT(platelet_count) FROM table_221653_1 WHERE prothrombin_time = "Prolonged" AND bleeding_time = "Prolonged"
how many match points rotherham lose
SELECT match_points FROM table_27987767_2 WHERE losers = "Rotherham"
What are the titles and categories of all the podcasts with a review that has "Absolutely fantastic" in it?
SELECT T2.title, T1.category FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id INNER JOIN reviews AS T3 ON T3.podcast_id = T2.podcast_id WHERE T3.content LIKE '%Absolutely fantastic%'
Which of the movies directed by Ron Clements has the highest total gross?
SELECT T2.movie_title FROM director AS T1 INNER JOIN movies_total_gross AS T2 ON T1.name = T2.movie_title WHERE T1.director = 'Ron Clements' ORDER BY CAST(REPLACE(trim(T2.total_gross, '$'), ',', '') AS REAL) DESC LIMIT 1
What are the number of days did the ulster unionist Party have the constituate fermanagh and south tyrone?
SELECT days FROM table_name_79 WHERE party = "ulster unionist" AND constituency = "fermanagh and south tyrone"
Of all the claims, what was the earliest date when any claim was made?
SELECT Date_Claim_Made FROM Claims ORDER BY Date_Claim_Made LIMIT 1
WHAT IS THE BROWSER ID OF OPERA
SELECT T1.id FROM browser AS T1 JOIN accelerator_compatible_browser AS T2 ON T1.id = T2.browser_id JOIN web_client_accelerator AS T3 ON T2.accelerator_id = T3.id WHERE T1.name = "Opera"
List email address and birthday of customer whose first name as Carole.
SELECT email_address , date_of_birth FROM Customers WHERE first_name = "Carole"
who authored the paper Binders Unbound? | What information do you want about the author of the paper Binders Unbound? | i want their names
SELECT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = "Binders Unbound"
How many teams are listed for February 18?
SELECT COUNT(team) FROM table_15869204_7 WHERE date = "February 18"
Which party won in the election in voting district Kentucky 5?
SELECT party FROM table_1342218_17 WHERE district = "Kentucky 5"
what is 2010 when 2009 is w and 2007 is qf?
SELECT 2010 FROM table_name_8 WHERE 2009 = "w" AND 2007 = "qf"
Which vocal type is the most frequently appearring type?
SELECT TYPE FROM vocals GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1
How many episodes have the keyword "2d animation"?
SELECT COUNT(episode_id) FROM Keyword WHERE keyword = '2d animation';
What is the average distance and price for all flights from LA?
SELECT avg(distance) , avg(price) FROM Flight WHERE origin = "Los Angeles"
List the voice actors from the movie "Meet the Robinsons".
SELECT 'voice-actor' FROM `voice-actors` WHERE movie = 'Meet the Robinsons'
Show me the dates of those exhibitions
SELECT T1.date FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 500
What is the average number of goals for entries with more than 12 losses, more than 10 wins, more than 3 draws, and fewer than 29 points?
SELECT AVG(goals_for) FROM table_name_99 WHERE losses > 12 AND wins > 10 AND points < 29 AND draws > 3
For the order with the total price of 218195.43, which supplier handled the returned item? Give the supplier id.
SELECT T2.l_suppkey FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_totalprice = 218195.43 AND T2.l_returnflag = 'R'
Overall of 208 occurred in what round?
SELECT round FROM table_name_67 WHERE overall = 208
During which round was the first defensive end with an overall rank larger than 186 drafted?
SELECT MIN(round) FROM table_name_65 WHERE overall > 186 AND position = "defensive end"
Which region has Stanford University as host?
SELECT region FROM table_name_12 WHERE host = "stanford university"
Name the package/option for number being 543
SELECT package_option FROM table_15887683_8 WHERE n° = 543
How many books by William Shakespeare were published by Penguin Classics?
SELECT COUNT(*) FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id INNER JOIN publisher AS T4 ON T4.publisher_id = T1.publisher_id WHERE T3.author_name = 'William Shakespeare' AND T4.publisher_name = 'Penguin Classics'
Name a music director, belonging to a year after 2003?
SELECT music_director FROM table_name_86 WHERE year > 2003
Show the locations that have both performances with more than 2000 attendees and performances with less than 1000 attendees.
SELECT LOCATION FROM performance WHERE Attendance > 2000 INTERSECT SELECT LOCATION FROM performance WHERE Attendance < 1000
When was the game in which Deron Williams (13) did the high assists played?
SELECT date FROM table_23286223_5 WHERE high_assists = "Deron Williams (13)"
Which Player has a Team from of south shore kings?
SELECT player FROM table_name_11 WHERE team_from = "south shore kings"
What are the swimsuits for south africa?
SELECT swimsuit FROM table_11674683_2 WHERE delegate = "South Africa"
Did the legislation pass that had 42.87% yes votes?
SELECT passed FROM table_256286_63 WHERE _percentage_yes = "42.87%"
What fleet numbers have a diagram less than 99 and built in 1960?
SELECT fleet_numbers FROM table_name_68 WHERE diagram < 99 AND built = "1960"
What is the method of opponent georges st-pierre?
SELECT method FROM table_name_22 WHERE opponent = "georges st-pierre"
How many times was the sabres record 2-5-1?
SELECT COUNT(location_attendance) FROM table_27537870_3 WHERE record = "2-5-1"
What Constructor did Michael Schumacher have with a Grid smaller than 5?
SELECT constructor FROM table_name_62 WHERE grid < 5 AND driver = "michael schumacher"
Please indicate the names of the customers whose order with a total price over $300000.
SELECT T2.c_name FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_totalprice > 300000
Who had to take Clopidogrel 75 MG Oral Tablet for over 10 years?
SELECT T1.first, T1.last FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Clopidogrel 75 MG Oral Tablet' AND strftime('%Y', T2.STOP) - strftime('%Y', T2.START) > 10
Which format is released on May 27, 2009?
SELECT format FROM table_name_31 WHERE date = "may 27, 2009"
What is the depth of the quake that occurred at 19:48?
SELECT depth FROM table_name_35 WHERE time__utc_ = "19:48"
what is the rank for the rating 4.4?
SELECT rank__night_ FROM table_15681686_4 WHERE rating = "4.4"
Which week did the Baltimore Ravens play at home ?
SELECT week FROM table_name_79 WHERE host_team = "baltimore ravens"
show all the customers name
SELECT customer_name FROM Customers
What is the total account balance for customers with a credit score of above 100 for the different states?
SELECT sum(acc_bal) , state FROM customer WHERE credit_score > 100 GROUP BY state
How many starts had an avg start of less than 37 and won $1,636,827?
SELECT SUM(starts) FROM table_name_66 WHERE winnings = "$1,636,827" AND avg_start < 37
Find the number of distinct students enrolled in courses.
SELECT count(DISTINCT student_id) FROM Student_Course_Enrolment
List the names of all journalists from England.
SELECT name FROM journalist WHERE Nationality = "England"
List the names of customers whose accounts are in debt.
SELECT c_name FROM customer WHERE c_acctbal < 0
What is the fleet number with a 4-6-0 wheel arrangement made in 1890?
SELECT fleet_number_s_ FROM table_name_94 WHERE wheel_arrangement = "4-6-0" AND year_made = "1890"
Show all document type codes, document type names, document type descriptions.
SELECT document_type_code , document_type_name , document_type_description FROM Ref_document_types
What is the total work number of Gowrie with a 0-6-4t type after 1908?
SELECT COUNT(works_number) FROM table_name_51 WHERE type = "0-6-4t" AND name = "gowrie" AND date > 1908
What is the age of female customers within the number of inhabitants below 30?
SELECT age FROM Customers WHERE GEOID IN ( SELECT GEOID FROM Demog WHERE INHABITANTS_K < 30 ) AND SEX = 'Female'
For directors who had more than one movie, return the titles and produced years of all movies directed by them.
SELECT T1.title , T1.year FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title != T2.title
Which club had 2 wins and 1 draw?
SELECT club FROM table_17941032_2 WHERE drawn = "1" AND won = "2"
what is the total viewers (m) when the rating is 6.4 and the share is more than 11?
SELECT COUNT(viewers__m_) FROM table_name_12 WHERE rating = 6.4 AND share > 11
What campus had more than 400 total enrollment but more than 200 full time enrollment in year 1956?
SELECT T1.campus FROM campuses AS t1 JOIN enrollments AS t2 ON t1.id = t2.campus WHERE t2.year = 1956 AND totalenrollment_ay > 400 AND FTE_AY > 200
Which papers have "Stephanie Weirich" as an author?
SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = "Stephanie" AND t1.lname = "Weirich"