sentence
stringlengths
3
347
sql
stringlengths
18
804
How many appearances does the word ID No. 2823 have in the Wikipedia page "Astre"?
SELECT SUM(T2.occurrences) FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T1.title = 'Astre' AND T2.wid = 2823
Which athlete from Brazil has 2.20 O and 2.25 of XXX?
SELECT athlete FROM table_name_81 WHERE 220 = "o" AND 225 = "xxx" AND nationality = "brazil"
What round was Nick Gillis?
SELECT round FROM table_name_32 WHERE player = "nick gillis"
Which province has the contestant elixandra tobias carasco?
SELECT province, _community FROM table_name_81 WHERE contestant = "elixandra tobias carasco"
What is the average total of the census after 1971 with 10,412 (32.88%) Serbs?
SELECT AVG(total) FROM table_name_90 WHERE year_of_census > 1971 AND serbs = "10,412 (32.88%)"
What are the department name and room for the course INTRODUCTION TO COMPUTER SCIENCE?
SELECT T2.Dname , T2.Room FROM COURSE AS T1 JOIN DEPARTMENT AS T2 ON T1.DNO = T2.DNO WHERE T1.CName = "INTRODUCTION TO COMPUTER SCIENCE"
What is Mark Henry's brand?
SELECT brand FROM table_name_28 WHERE entrant = "mark henry"
Which Casualties have a hostile Nature of incident and Circumstances of mortar attack?
SELECT casualties FROM table_name_67 WHERE nature_of_incident = "hostile" AND circumstances = "mortar attack"
What is the 1980 value with a 1r in 1984 and a 1r in 1981?
SELECT 1980 FROM table_name_48 WHERE 1984 = "1r" AND 1981 = "1r"
If the passengers are 15,505,566, what is the iata code?
SELECT iata_code FROM table_18047346_4 WHERE passengers = "15,505,566"
In what season was the final placing NC† and the team SL Formula Racing?
SELECT season FROM table_25421463_1 WHERE final_placing = "NC†" AND team_name = "SL Formula Racing"
When was andrea gámiz the opponent?
SELECT date FROM table_name_97 WHERE opponent = "andrea gámiz"
What are the ids of the students who registered for course 301?
SELECT student_id FROM student_course_attendance WHERE course_id = 301
What is the maximum fc matches at the racecourse?
SELECT MAX(fc_matches) FROM table_1176371_1 WHERE name_of_ground = "The Racecourse"
What years did the magazine Vaillant and Pif run?
SELECT years FROM table_name_78 WHERE magazine = "vaillant and pif"
What Super G has a Career of 1980–1996?
SELECT super_g FROM table_name_25 WHERE career = "1980–1996"
Find the names of the candidates whose support percentage is lower than their oppose rate.
SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t2.support_rate < t2.oppose_rate
Which allergy affects student ID 1002
SELECT Allergy FROM Has_allergy where StuID = 1002
Show the number of audience in year 2008 or 2010.
SELECT Num_of_Audience FROM festival_detail WHERE YEAR = 2008 OR YEAR = 2010
avg passengers in 2012 for 2009 more than 104.5 and 2010 less than 162.6 and 2011 less than 141.8 is what?
SELECT AVG(2012) FROM table_name_22 WHERE 2009 > 104.5 AND 2010 < 162.6 AND 2011 < 141.8
What group info is available for the 56.5 kg weight?
SELECT group FROM table_1358608_2 WHERE weight__kg_ = "56.5"
What is the duration of that song?
SELECT duration FROM files ORDER BY duration DESC LIMIT 1
What industry does petrochina belong to?
SELECT industry FROM company where name = "PetroChina"
Which team opponent had a loss with their pitcher Dotson (8-6)?
SELECT opponent FROM table_name_93 WHERE loss = "dotson (8-6)"
Who published in Italian with a page size of 8 inches (20cm) x 5.4 inches (14cm)?
SELECT edition_publisher FROM table_name_5 WHERE language = "italian" AND page_size = "8 inches (20cm) x 5.4 inches (14cm)"
What is the name origin of Morrigan Linea?
SELECT name AS origin FROM table_16799784_9 WHERE name = "Morrigan Linea"
What are the dates of the outgoing manager colin hendry does appointments?
SELECT date_of_appointment FROM table_11207040_6 WHERE outgoing_manager = "Colin Hendry"
what is the age of Bob
SELECT age FROM Person where name = 'Bob'
2007 of 1r is involved in what 2001?
SELECT 2001 FROM table_name_31 WHERE 2007 = "1r"
Name the city with september of 83 °f / 28.3 °c
SELECT city FROM table_name_15 WHERE sep = "83 °f / 28.3 °c"
Tkkm o te ara rima has a decile less than 4 in what years?
SELECT years FROM table_name_36 WHERE decile < 4 AND name = "tkkm o te ara rima"
Which actively running Yelp business in "Gilbert" has got the most reviews? Give the business id.
SELECT DISTINCT T1.business_id FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.active = 'true' AND T1.city = 'Gilbert' AND T1.review_count = 'Uber'
How many pounds did Sue Newell transport during her first shipment?
SELECT T1.weight FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T2.first_name = 'Sue' AND T2.last_name = 'Newell' ORDER BY T1.ship_date ASC LIMIT 1
Show the minimum, maximum, and average age for all people.
SELECT min(age) , max(age) , avg(age) FROM people
Show the statement id and the statement detail for the statement with most number of accounts.
SELECT T1.statement_id , T2.statement_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id = T2.statement_id GROUP BY T1.statement_id ORDER BY count(*) DESC LIMIT 1
How many point categories are there for the 3 mile run?
SELECT COUNT(points) FROM table_19534874_2 WHERE mile_run = 3
How many customers use each payment method?
SELECT payment_method_code , count(*) FROM customers GROUP BY payment_method_code
What was the rank in 1955?
SELECT rank FROM table_name_89 WHERE year = "1955"
How many devices belong to model "A51"?
SELECT COUNT(device_id) FROM phone_brand_device_model2 WHERE device_model = 'A51'
Which Tournament has a Score of 4-6 6-2 6-1?
SELECT tournament FROM table_name_40 WHERE score = "4-6 6-2 6-1"
What are the first names, office locations of all lecturers who have taught some course?
SELECT T2.emp_fname , T4.prof_office , T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num
What is the name of a spice with buying price of 352447.2874677?
SELECT product_name from products where typical_buying_price = 352447.2874677
Hello. What is the name of the employee that has showed up the most in circulation history documents?
SELECT t1.employee_name FROM Employees as t1 JOIN Circulation_History as t2 ON t2.employee_id = t1.employee_id group by t1.employee_name order by count ( * ) desc limit 1
When was the first year he placed 2nd in Izmir, Turkey?
SELECT MIN(year) FROM table_name_3 WHERE result = "2nd" AND venue = "izmir, turkey"
What tournament had a winning score of –9 (69-71-67=207)?
SELECT tournament FROM table_name_72 WHERE winning_score = –9(69 - 71 - 67 = 207)
For all cities where Seine is located at, which city has the greatest population? Calculate the difference from the city with least population.
SELECT MAX(T1.Population) - MIN(T1.population) FROM city AS T1 INNER JOIN located AS T2 ON T1.Name = T2.City INNER JOIN river AS T3 ON T3.Name = T2.River WHERE T3.Name = 'Seine'
Could you please tell me the average amount paid in claim headers?
SELECT avg ( amount_piad ) FROM claim_headers
Which Minnesota North Stars' goalkeeper had the most Goal Againsts in his play time?
SELECT playerID FROM Goalies AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T2.name = 'Minnesota North Stars' GROUP BY T1.playerID ORDER BY SUM(T1.GA) DESC LIMIT 1
Find the name, checking balance and savings balance of all accounts in the bank sorted by their total checking and savings balance in descending order.
SELECT T2.balance , T3.balance , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance DESC
List the title of books published by AK Press.
SELECT T1.title FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T2.publisher_name = 'AK Press'
How many singles were released between 1979 and 1981 labeled as "soul"?
SELECT COUNT(T2.tag) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'soul' AND T1.groupYear BETWEEN 1979 AND 1981 AND T1.releaseType LIKE 'single'
How many apartments do not have any facility?
SELECT count(*) FROM Apartments WHERE apt_id NOT IN (SELECT apt_id FROM Apartment_Facilities)
Which airline has abbreviation 'UAL'?
SELECT Airline FROM AIRLINES WHERE Abbreviation = "UAL"
what is the credits of C Programming
SELECT credits FROM course WHERE title = "C Programming"
List all reviews created in May 2019. State the title of podcast and review rating.
SELECT DISTINCT T1.title, T2.rating FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.created_at LIKE '2019-05-%'
Who has 0 points in 1974?
SELECT entrant FROM table_name_3 WHERE points = 0 AND year = 1974
What is Weight, when Club is "Maadi"?
SELECT weight FROM table_name_86 WHERE club = "maadi"
Which country does Sasebo belong to?
SELECT T1.country FROM country AS T1 INNER JOIN city AS T2 ON T1.country_id = T2.country_id WHERE T2.city = 'Sasebo'
Which Opponent has an Event of king of the cage: shock and awe?
SELECT opponent FROM table_name_8 WHERE event = "king of the cage: shock and awe"
How many nicknames does the school in Newark, DE have
SELECT COUNT(nickname) FROM table_16432543_1 WHERE location = "Newark, DE"
What is Opponent, when Event is "ISCF - Southeast Championships"?
SELECT opponent FROM table_name_17 WHERE event = "iscf - southeast championships"
How many products with the id "989" were sold in August 2013?
SELECT SUM(Quantity) FROM TransactionHistory WHERE TransactionDate LIKE '2013-08%' AND TransactionType = 'S' AND ProductID = 989
What was the to par score of the golfer that had a score of 68-70=138?
SELECT to_par FROM table_name_91 WHERE score = 68 - 70 = 138
How many orders were shipped to Venezuela in 1996?
SELECT COUNT(OrderID) FROM Orders WHERE ShipCountry = 'Venezuela' AND STRFTIME('%Y', ShippedDate) = '1996'
List down the names of the cities belonging to Noble, Oklahoma.
SELECT T3.city FROM state AS T1 INNER JOIN country AS T2 ON T1.abbreviation = T2.state INNER JOIN zip_data AS T3 ON T2.zip_code = T3.zip_code WHERE T1.name = 'Oklahoma' AND T2.county = 'NOBLE'
What place is the team that completed 6 races?
SELECT position FROM table_10748727_1 WHERE races = 6
Show the most frequently used carrier of the phones.
SELECT Carrier FROM phone GROUP BY Carrier ORDER BY COUNT(*) DESC LIMIT 1
Hello. What universities are in San Francisco? | Would you like to know the names of all campuses located in San Francisco? | That would be great!
SELECT Campus FROM Campuses WHERE Location = 'San Francisco'
List the names of departments where some physicians are primarily affiliated with.
SELECT DISTINCT T2.name FROM affiliated_with AS T1 JOIN department AS T2 ON T1.department = T2.departmentid WHERE PrimaryAffiliation = 1
Which United States province is home to the greatest number of corporations' corporate headquarters?
SELECT T1.Province FROM country AS T1 INNER JOIN organization AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'United States' GROUP BY T1.Province ORDER BY COUNT(T1.Name) DESC LIMIT 1
How many debuts in Europe have less than 76 goals, more than 151 games, and a rank greater than 5?
SELECT COUNT(debut_in_europe) FROM table_name_77 WHERE goals < 76 AND games > 151 AND rank > 5
What is the highest Total Medals that has 0 Gold Medal and a Ensemble of east 80 indoor percussion?
SELECT MAX(total_medals) FROM table_name_27 WHERE gold_medals = 0 AND ensemble = "east 80 indoor percussion"
Who is the operator when willowbrook was the bodybuilder?
SELECT operator FROM table_28035004_1 WHERE bodybuilder = "Willowbrook"
What is the shape of the tail car on train no.1?
SELECT shape FROM cars WHERE train_id = 1 AND position = 4
The product ids of all products whose prices are above the average product price are listed.
select product_name from products where product_price> ( SELECT avg ( product_price ) from products )
What date was the U21 pennant laid down?
SELECT laid_down FROM table_name_26 WHERE pennant = "u21"
What about products with the characteristic name "slow"?
SELECT product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t3.characteristic_name = "slow"
in what playoffs the league was in the semifinals
SELECT league FROM table_1908049_1 WHERE playoffs = "Semifinals"
Which county has the lowest amount of police officers?
SELECT Name FROM county_public_safety ORDER BY Population LIMIT 1
How many Vista cards expired before the year 2007?
SELECT COUNT(CreditCardID) FROM CreditCard WHERE CardType = 'Vista' AND ExpYear < 2007
What years did Tymerlan Huseynov, whose average is larger than 0.361, play?
SELECT career FROM table_name_94 WHERE average > 0.361 AND player = "tymerlan huseynov"
List the district name of the city with the smallest population.
SELECT District FROM City ORDER BY Population LIMIT 1
What counties are they from?
select T1.County_name from county AS T1 JOIN election AS T2 where T1.County_Id = District and T2.Committee = 'Appropriations'
What L2 cache had a release date of august 26, 2007?
SELECT l2_cache FROM table_name_71 WHERE release_date = "august 26, 2007"
Hmm. Please return all the committees that have delegates from Liberal party.
SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = "Liberal"
What is the name of UMass Boston's softball stadium?
SELECT softball_stadium FROM table_1974545_3 WHERE school = "UMass Boston"
What is the lowest pick from Elitserien (Sweden)?
SELECT MIN(pick__number) FROM table_name_15 WHERE league_from = "elitserien (sweden)"
State the name of the city that held game id 3.
SELECT T2.city_name FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id WHERE T1.games_id = 3
Pete Conrad was on the Apollo 12 mission but also had what Lunar EVA dates?
SELECT lunar_eva_dates FROM table_name_27 WHERE mission = "apollo 12" AND name = "pete conrad"
Which 2003 has a 2012 of 1–4?
SELECT 2003 FROM table_name_24 WHERE 2012 = "1–4"
Which date has a format's album?
SELECT date FROM table_name_31 WHERE format_s_ = "album"
What is the smallest place number when the total is 16 and average is less than 16?
SELECT MIN(place) FROM table_name_52 WHERE total = 16 AND average < 16
Show the names of customers having an order with shipping method FedEx and order status Paid.
SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE shipping_method_code = 'FedEx' AND order_status_code = 'Paid'
What bike subcategories are there?
SELECT T1.Name FROM ProductSubcategory AS T1 INNER JOIN ProductCategory AS T2 ON T1.ProductCategoryID = T2.ProductCategoryID WHERE T2.name = 'Bikes'
What did South Africa place?
SELECT place FROM table_name_89 WHERE country = "south africa"
What is the neighborhood name in the community area of Lake View?
SELECT T2.neighborhood_name FROM Community_Area AS T1 INNER JOIN Neighborhood AS T2 ON T1.community_area_no = T2.community_area_no WHERE T1.community_area_name = 'Lake View'
Show me these names in descending order based on number of player votes.
SELECT T3.Player_name , T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID ORDER BY T3.Votes DESC
Which Wins has a Draws smaller than 3, and Points of 26?
SELECT AVG(wins) FROM table_name_79 WHERE draws < 3 AND points = 26
List down the address of patients who have billable period in 2010.
SELECT DISTINCT T1.address FROM patients AS T1 INNER JOIN claims AS T2 ON T1.patient = T2.PATIENT WHERE T2.BILLABLEPERIOD LIKE '2010%'
Write down the release date of the movies produced by Twentieth Century Fox Film Corporation.
SELECT T3.release_date FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id INNER JOIN movie AS T3 ON T2.movie_id = T3.movie_id WHERE T1.company_name = 'Twentieth Century Fox Film Corporation'