sentence
stringlengths
3
347
sql
stringlengths
18
804
What is the total number of civil liberties 2011 values having 2010 political rights values under 3 and 2011 political rights values under 1?
SELECT COUNT(civil_liberties_2011) FROM table_name_70 WHERE political_rights_2010 < 3 AND political_rights_2011 < 1
How many times is the number of active apps in the event that happened at 7:50:28 on 2016/5/2 than in the event that happened at 7:41:03 on 2016/5/2?
SELECT SUM(IIF(timestamp = '2016-05-02 7:50:28', 1, 0)) / SUM(IIF(timestamp = '2016-05-02 7:41:03', 1, 0)) AS num FROM events AS T1 INNER JOIN app_events AS T2 ON T1.event_id = T2.event_id WHERE T2.is_active = '1'
What are the response received dates for the documents described as 'Regular' or granted with more than 100?
SELECT T1.response_received_date FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code = T2.document_type_code JOIN Grants AS T3 ON T1.grant_id = T3.grant_id WHERE T2.document_description = 'Regular' OR T3.grant_amount > 100
What was the score of the Friendly competition where the result was 7-2?
SELECT score FROM table_name_54 WHERE competition = "friendly" AND result = "7-2"
What Gershausen has a Willingshain of 243 and Reckerode of 224?
SELECT gershausen FROM table_name_46 WHERE willingshain = "243" AND reckerode_ * * * * = "224"
What is the ICAO when the IATA shows mfm?
SELECT icao FROM table_name_2 WHERE iata = "mfm"
What is Manufacturer, when Quantity Made is 2, and when Year Made is 1884?
SELECT manufacturer FROM table_name_25 WHERE quantity_made = "2" AND year_made = "1884"
Mention the number of businesses that have no any attribute.
SELECT COUNT(business_id) FROM Business_Attributes WHERE attribute_value IN ('none', 'no', 'false')
What was the largest ethnic group in 2002 of the settlement with the cyrillic name of ватин?
SELECT largest_ethnic_group__2002_ FROM table_2562572_46 WHERE cyrillic_name_other_names = "Ватин"
What is the catalog number of Venus Demilo's A-side?
SELECT catalog_number FROM table_name_30 WHERE a_side = "venus demilo"
Which name has a Kanji of 朧?
SELECT name FROM table_name_77 WHERE kanji = "朧"
List the closing time and day of week of active businesses in Goodyear with stars greater than the 80% of average age of star rating.
SELECT DISTINCT T2.closing_time, T3.day_of_week FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T1.active = 'true' AND T1.city = 'Goodyear' AND T1.stars > ( SELECT AVG(stars) * 0.8 FROM Business WHERE active = 'true' AND city = 'Goodyear' )
What are the ids of the problems reported before the date of any problem reported by Lysanne Turcotte?
SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported < ( SELECT min(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = "Lysanne" AND T4.staff_last_name = "Turcotte" )
How many research assistants does Sauveur Skyme have?
SELECT COUNT(T1.student_id) FROM RA AS T1 INNER JOIN prof AS T2 ON T1.prof_id = T2.prof_id WHERE T2.first_name = 'Sauveur' AND T2.last_name = 'Skyme'
What county is the team with the mascot of the Tigers in?
SELECT county FROM table_name_2 WHERE mascot = "tigers"
Please list the IDs of the paragraphs in which the character "son to Tamora" appears.
SELECT T1.id FROM paragraphs AS T1 INNER JOIN characters AS T2 ON T1.character_id = T2.id WHERE T2.Description = 'son to Tamora'
What is the prize money for the final round?
SELECT prize_money FROM table_name_58 WHERE round = "final"
Among the orders with sales value of no less than 5,000 in west superstore, how many were bought by the customers in California?
SELECT COUNT(DISTINCT T1.`Order ID`) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` INNER JOIN people AS T3 ON T3.`Customer ID` = T1.`Customer ID` WHERE T1.Sales > 5000 AND T3.State = 'California' AND T2.Region = 'West'
Mention the titile of paper writen by Joe Lograsso.
SELECT T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Name = 'Joe Lograsso'
when did the club Citizen achieve its last top division title?
SELECT last_top_division_title FROM table_1908877_2 WHERE club = "Citizen"
Which model saves the most gasoline? That is to say, have the maximum miles per gallon.
SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.mpg DESC LIMIT 1
What is the name of the church that opened the latest?
SELECT name FROM church order BY open_date desc limit 1
Among the players who were born in July and August, how many of them got in the Hall of Fame?
SELECT COUNT(T1.playerID) FROM Master AS T1 INNER JOIN HOF AS T2 ON T1.hofID = T2.hofID WHERE T1.birthMon IN (7, 8)
What is the product ID for food?
select product_id from Products where product_name = 'food'
What school is in Richmond?
SELECT school FROM table_2076608_3 WHERE location_s_ = "Richmond"
What is the name of the father who was born in 1204 and married ottokar ii?
SELECT father FROM table_name_89 WHERE spouse = "ottokar ii" AND birth = "1204"
Show the names of authors from college "Florida" or "Temple"
SELECT Author FROM submission WHERE College = "Florida" OR College = "Temple"
how many students registered for just one course
SELECT COUNT ( * ) FROM ( SELECT student_id FROM student_course_registrations GROUP BY student_id having count ( * ) = 1 )
What episoe number in the season originally aired on February 11, 1988?
SELECT no_in_season FROM table_2818164_5 WHERE original_air_date = "February 11, 1988"
Name the number of players for louisiana state
SELECT COUNT(player) FROM table_15621965_14 WHERE school_club_team = "Louisiana State"
Show the id of each employee and the number of document destruction authorised by that employee.
SELECT Destruction_Authorised_by_Employee_ID , count(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID
Which brand of root beer has the lowest unit profit available to wholesalers? Indicate the ID of the customer that has the highest number of purchases of the said brand.
SELECT T3.BrandName, T2.CustomerID FROM rootbeer AS T1 INNER JOIN `transaction` AS T2 ON T1.RootBeerID = T2.RootBeerID INNER JOIN rootbeerbrand AS T3 ON T1.BrandID = T3.BrandID GROUP BY T3.BrandID ORDER BY T3.CurrentRetailPrice - T3.WholesaleCost, COUNT(T1.BrandID) DESC LIMIT 1
What is the difference in population between the two nations where the tallest peak is located?
SELECT * FROM mountain AS T1 INNER JOIN geo_mountain AS T2 ON T1.Name = T2.Mountain INNER JOIN province AS T3 ON T3.Country = T2.Country INNER JOIN country AS T4 ON T4.Code = T3.Country WHERE T1.Name = ( SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1 )
What different types are there with a CC License of by-nc-sa 2.5?
SELECT type FROM table_name_25 WHERE cc_license = "by-nc-sa 2.5"
What was the Orangemen record during game 3?
SELECT record FROM table_23346983_1 WHERE game = 3
What is the callsign of tuguegarao
SELECT callsign FROM table_12547903_2 WHERE location__transmitter_site_ = "Tuguegarao"
Please list the countries in Latin America & Caribbean with a note on the series code SM.POP.TOTL.
SELECT T1.SHORTNAME, T2.Description FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.Region = 'Latin America & Caribbean' AND T2.Seriescode = 'SM.POP.TOTL'
What is Balls, when Venue is "Bristol", and when Score is "104*"?
SELECT balls FROM table_name_3 WHERE venue = "bristol" AND score = "104*"
Who has a nationality of GRE and an App(L/C/E) of 49 (40/8/1)?
SELECT name FROM table_name_98 WHERE nat = "gre" AND app_l_c_e_ = "49 (40/8/1)"
What is curtis strange's to par?
SELECT to_par FROM table_name_26 WHERE player = "curtis strange"
What are the names of body builders whose total score is higher than 300?
SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total > 300
How many players bat with their left hands?
SELECT SUM(CASE WHEN T2.Batting_hand = 'Left-hand bat' THEN 1 ELSE 0 END) FROM Player AS T1 INNER JOIN Batting_Style AS T2 ON T1.Batting_hand = T2.Batting_Id
What's the percentage of the users who have rated "1" on the movie "When Will I Be Loved"?
SELECT CAST(SUM(CASE WHEN T1.rating_score = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'When Will I Be Loved'
When did the club UNAM played the first season in top division?
SELECT first_season_in_top_division FROM table_18143210_2 WHERE club = "UNAM"
Who had the highest assists of the game on March 5?
SELECT high_assists FROM table_name_50 WHERE date = "march 5"
Sort all the rooms according to the price. Just report the room names.
SELECT roomName FROM Rooms ORDER BY basePrice;
Can you tell me the Chassis that has the Year of 1977?
SELECT chassis FROM table_name_47 WHERE year = 1977
What is the name and checking balance of the account which has the lowest savings balance?
SELECT T2.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 T3.balance LIMIT 1
What game has a score of 44-20?
SELECT result FROM table_name_78 WHERE score = "44-20"
What are all the CFL teams where the pick number is 36?
SELECT cfl_team FROM table_15817998_5 WHERE pick__number = 36
What is the nationality of the 7th season Purple Cap winner?
SELECT T3.Country_Name FROM Season AS T1 INNER JOIN Player AS T2 ON T1.Man_of_the_Series = T2.Player_Id INNER JOIN Country AS T3 ON T2.Country_Name = T3.Country_Id WHERE T1.Season_Id = 7 AND T1.Purple_Cap IS NOT NULL
How many electronvolts is 3,600 joules?
SELECT electronvolt FROM table_name_44 WHERE joule = "3,600"
State the location of flower awards held?
select Location from festival_detail where Festival_Name = 'Flower Awards'
In "Twelfth Night, Or What You Will", what is the description of the chapter in 2nd scene, Act 2?
SELECT T2.Description FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.LongTitle = 'Twelfth Night, Or What You Will' AND T2.Scene = 2 AND T2.Act = 2
In 1975, what was the final round?
SELECT final_round FROM table_name_1 WHERE year = "1975"
Find the min grade point for all letter grade?
SELECT min ( gradepoint ) FROM GRADECONVERSION
What is the name of the storm active during season aggregates?
SELECT name FROM table_name_48 WHERE dates_active = "season aggregates"
When was Göteborg the opponent with a score of 3-1?
SELECT date FROM table_name_9 WHERE opponents = "göteborg" AND score = "3-1"
Count the number of different affected regions.
SELECT count(DISTINCT region_id) FROM affected_region
Please list the customer names whose order quantity was more than 5 on 6/1/2018.
SELECT T FROM ( SELECT DISTINCT CASE WHEN SUM(T1.`Order Quantity`) > 5 THEN T2.`Customer Names` END AS T FROM `Sales Orders` T1 INNER JOIN Customers T2 ON T2.CustomerID = T1._CustomerID WHERE T1.OrderDate = '6/1/18' GROUP BY T1._CustomerID ) WHERE T IS NOT NULL
What is the title of the animated films that have the shortest length?
SELECT T1.title FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id ORDER BY T1.length LIMIT 1
How many medicines have the FDA approval status 'No' ?
SELECT count(*) FROM medicine WHERE FDA_approved = 'No'
What was the Venue of the North Melbourne Away Team?
SELECT venue FROM table_name_33 WHERE away_team = "north melbourne"
Find the addresses of the course authors who teach the course with name "operating system" or "data structure".
SELECT T1.address_line_1 FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = "operating system" OR T2.course_name = "data structure"
How many police officers are there in that county?
SELECT Police_officers FROM county_public_safety ORDER BY Population DESC LIMIT 1
State average scores of participants from arizona
SELECT average FROM table_17088705_2 WHERE country = "Arizona"
What are the names of the airports which are not in the country 'Iceland'?
SELECT name FROM airport WHERE country != 'Iceland'
What number of Yards has 32 as an In 20?
SELECT COUNT(yards) FROM table_name_90 WHERE in_20 = 32
Find the name of the customer who made the order of the largest amount of goods.
SELECT t1.customer_name 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 t3.order_quantity = ( SELECT max(order_quantity) FROM order_items)
When did the Baltimore Ravens play at home ?
SELECT date FROM table_name_79 WHERE host_team = "baltimore ravens"
How many users have joined Yelp since the year 2012?
SELECT COUNT(user_id) FROM Users WHERE user_yelping_since_year = 2012
Who belong to the institution "University of Oxford"? Show the first names and last names.
SELECT DISTINCT t1.fname , t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = "University of Oxford"
What date sent has cygnus as a constellation, and hd 190360 as a designation HD?
SELECT date_sent FROM table_name_65 WHERE constellation = "cygnus" AND designation_hd = "hd 190360"
Which Nationality has a Rank larger than 3, and a Name of tom hilde?
SELECT nationality FROM table_name_71 WHERE rank > 3 AND name = "tom hilde"
list out the customers first name
SELECT customer_first_name FROM Customers
Name the Date which has a Oil Pattern of chameleon, and a Event of lake county indiana classic?
SELECT date FROM table_name_51 WHERE oil_pattern = "chameleon" AND event = "lake county indiana classic"
What is the score on April 12?
SELECT score FROM table_name_88 WHERE date = "april 12"
Which Number of electorates (2009) has 188 Constituents?
SELECT number_of_electorates__2009_ FROM table_name_93 WHERE constituency_number = "188"
Which Score has a Set 1 of 25–16?
SELECT score FROM table_name_97 WHERE set_1 = "25–16"
Wat is the tax source system code and master customer id of the taxes related to each parking fine id?
SELECT T1.source_system_code, T1.master_customer_id, T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Parking_Fines AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id
Which Season originally aired on September 17, 1955
SELECT season__number FROM table_15824796_4 WHERE original_air_date = "September 17, 1955"
What organization details of service id 11?
SELECT T2.organization_details FROM services AS T1 JOIN organizations AS T2 ON T1.organization_id = T2.organization_id WHERE t1.service_id = '11'
What are the average price and score of wines grouped by appelation?
SELECT avg(Price) , avg(Score) , Appelation FROM WINE GROUP BY Appelation
List the store located cities with regions in no water area of California state.
SELECT DISTINCT T2.`City Name` FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1.StateCode WHERE T2.State = 'California' AND T2.`Water Area` = '0'
what's the founder where moderate is ether
SELECT founder FROM table_11256021_1 WHERE moderate = "ether"
What is Laure Manaudou's highest rank?
SELECT MAX(rank) FROM table_name_32 WHERE name = "laure manaudou"
What is the Population of the nation that has a Member countries consisting of existing members (1973)?
SELECT population FROM table_name_68 WHERE member_countries = "existing members (1973)"
Describe the condition of patient Wilmer Koepp.
SELECT T2.DESCRIPTION FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Wilmer' AND T1.last = 'Koepp'
What year does robin buck go 44 laps?
SELECT year FROM table_name_78 WHERE distance_duration = "44 laps" AND driver = "robin buck"
What are all the dates with a score of 203 (-13)?
SELECT date FROM table_11622829_1 WHERE score = "203 (-13)"
where the land is 35.990 what is the number of the geo id
SELECT geo_id FROM table_18600760_19 WHERE land___sqmi__ = "35.990"
Show the journalists with more than 10 years of working.
SELECT * FROM journalist WHERE Years_working > 10
What is the average number of stars for businesses in the Obstetricians & Gynecologists category?
SELECT CAST(SUM(T1.stars) AS REAL) / COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id WHERE T3.category_name = 'Obstetricians & Gynecologists'
Which province got a swimsuit score of 8.43
SELECT province FROM table_15081939_4 WHERE swimsuit = "8.43"
What was the Billboard peak for the album released on February 2, 1976 by MCA?
SELECT billboard_peak FROM table_name_95 WHERE label = "mca" AND date_of_release = "february 2, 1976"
How many words has the appearance times greater than 10?
SELECT COUNT(w1st) AS countwords FROM biwords WHERE occurrences > 10
When the home attendance is 3.123, what's the highest away attendance?
SELECT highest_attendance_away FROM table_1816947_2 WHERE average_attendance_home = "3.123"
What are the total points for all gymnasts, ordered by total points descending?
SELECT Total_Points FROM gymnast ORDER BY Total_Points DESC
What airport is in Muscat?
SELECT airport FROM table_name_60 WHERE city = "muscat"
Please list the name and id of all artists that have at least 3 albums in alphabetical order.
SELECT T2.Name , T1.ArtistId FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistID GROUP BY T1.ArtistId HAVING COUNT(*) >= 3 ORDER BY T2.Name