sentence
stringlengths
3
347
sql
stringlengths
18
804
WHAT POSITION IS 273?
SELECT position FROM table_name_26 WHERE overall = 273
What is the Rank of the Nation with 0 Silver and more than 1 Bronze?
SELECT MAX(rank) FROM table_name_24 WHERE silver < 1 AND bronze > 1
Find the common login name of course authors and students.
SELECT login_name FROM Course_Authors_and_Tutors INTERSECT SELECT login_name FROM Students
What is the ratio of active and inactive app users of the event ID "58"?
SELECT SUM(IIF(is_active = 1, 1, 0)) / SUM(IIF(is_active = 0, 1, 0)) AS per FROM app_events WHERE event_id = 58
When was a game played at 7:00 pm?
SELECT date FROM table_name_65 WHERE time = "7:00 pm"
Awesome! Can you filter this list to show only the customer IDs and customer names associated with either a deputy policy or an uninformed policy?
SELECT t2.customer_id, t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = "Deputy" OR t1.policy_type_code = "Uniform"
What is the category for the year when Brioude started and the stage is less than 7?
SELECT COUNT(category) FROM table_name_10 WHERE start = "brioude" AND stage < 7
How many calories is 1 watt hour?
SELECT calorie FROM table_name_64 WHERE watt_hour = "1"
What are the attribute data types with more than 3 attribute definitions?
SELECT attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING count(*) > 3
What are the first names of all students who are taking classes from the Computer Info. Systems department?
SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Computer Info. Systems'
What is the high lap total for françois cevert?
SELECT MAX(laps) FROM table_name_71 WHERE driver = "françois cevert"
Which Team/Chassis has less than 65 points?
SELECT team_chassis FROM table_name_66 WHERE pts < 65
What is the highest rank that has 5 silvers, less than 5 golds, and less than 7 total medals?
SELECT MAX(rank) FROM table_name_83 WHERE silver = 5 AND gold < 5 AND total < 7
What is the Tie No with a Score of 2–2?
SELECT tie_no FROM table_name_26 WHERE score = "2–2"
How many students are unemployed and have payment due?
SELECT COUNT(T1.name) FROM unemployed AS T1 INNER JOIN no_payment_due AS T2 ON T1.`name` = T2.`name`
What is the highest rank team akasvayu girona had with less than 311 rebounds?
SELECT MAX(rank) FROM table_name_52 WHERE team = "akasvayu girona" AND rebounds < 311
How many unique languages are spoken in the world?
SELECT COUNT(DISTINCT LANGUAGE) FROM countrylanguage
Rank for viewers larger than 1.244?
SELECT nightly_rank FROM table_name_21 WHERE viewers__millions_ > 1.244
Find the name of the customer that has been involved in the most policies.
SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id GROUP BY t2.customer_details ORDER BY count(*) DESC LIMIT 1
What are the details of all products?
SELECT DISTINCT product_details FROM products
Give the religion of the legislator with RSS url of http://www.corker.senate.gov/public/index.cfm/rss/feed.
SELECT T1.religion_bio FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.rss_url = 'http://www.corker.senate.gov/public/index.cfm/rss/feed' GROUP BY T1.religion_bio
Among the NBA winning coaches, which are from STL team? Please list their coach id.
SELECT DISTINCT T2.coachID FROM coaches AS T1 INNER JOIN awards_coaches AS T2 ON T1.coachID = T2.coachID WHERE T1.tmID = 'STL' AND T1.lgID = 'NBA'
What is the power for the Spirit R (Type B)?
SELECT power FROM table_250230_2 WHERE model = "Spirit R (Type B)"
Who was the GTO winning team in round 5 when the GTU winning team was #59 Brumos Porsche - Audi?
SELECT gto_winning_team FROM table_13642023_2 WHERE rnd = 5 AND gtu_winning_team = "#59 Brumos Porsche - Audi"
What is the total number of points when the grade was A?
SELECT SUM(points) FROM table_name_31 WHERE grade = "a"
Who is the 2005 World AIDS Day Benefit "Dream" Cast when the Original Australian performer is Susan-Ann Walker?
SELECT 2005 AS _world_aids_day_benefit_dream_cast FROM table_1901751_1 WHERE original_australian_performer = "Susan-Ann Walker"
What is the episode name that aired on July 23, 2009 with more than 3.31 viewers?
SELECT episode FROM table_name_45 WHERE air_date = "july 23, 2009" AND viewers > 3.31
What are the names of teams that do no have match season record?
SELECT Name FROM team WHERE Team_id NOT IN (SELECT Team FROM match_season)
Where did Carlton play as the home team?
SELECT venue FROM table_name_14 WHERE home_team = "carlton"
Which three cities have the largest regional population?
SELECT city FROM city ORDER BY regional_population DESC LIMIT 3
Show the number of transactions with transaction type code "SALE" for different investors if it is larger than 0.
SELECT investor_id , COUNT(*) FROM TRANSACTIONS WHERE transaction_type_code = "SALE" GROUP BY investor_id
How many artists have released albums?
SELECT count ( * ) from artists where id in ( select artist_id from albums )
Who has a Team classification of la vie claire, a stage of 20, a General classification of greg lemond?
SELECT winner FROM table_name_80 WHERE team_classification = "la vie claire" AND general_classification = "greg lemond" AND stage = "20"
In which competition was the score 3-0?
SELECT competition FROM table_name_79 WHERE score = "3-0"
How many rounds was the fight against carter williams?
SELECT round FROM table_name_2 WHERE opponent = "carter williams"
How many active airlines are on the list?
SELECT count ( * ) from airlines where active = 'Y'
In 2005, which series codes use the International Monetary Fund, Balance of Payments Statistics Yearbook and data files source?
SELECT T1.Seriescode, T2.Source FROM Footnotes AS T1 INNER JOIN Series AS T2 ON T1.Seriescode = T2.SeriesCode WHERE T1.Year LIKE '%2005%' AND T2.Source LIKE 'International Monetary Fund%'
Can you list the names associated with those patient ID 100000004 and 100000002?
SELECT DISTINCT ( T1.name ) FROM patient AS T1 JOIN appointment AS T2 ON T1.ssn = T2.patient WHERE T2.patient = 100000004 OR T2.patient = 100000002
And the login name for Adolf Keira Rohan?
SELECT login_name from Course_Authors_and_Tutors where personal_name like "%Adolf%" and middle_name like "%Keira%" and family_name like "%Rohan%"
How many peak positions were there on the weekly charts?
SELECT COUNT(peak_position) FROM table_23180638_1 WHERE oricon_albums_chart = "Weekly Charts"
How many of the items are instructed to be delivered in person?
SELECT COUNT(l_linenumber) FROM lineitem WHERE l_shipinstruct = 'DELIVER IN PERSON'
Which party was the incumbent from when the cadidates were henry e. barbour (r) 52.1% henry hawson (d) 47.9%? Answer: Democratic
SELECT COUNT(party) FROM table_1346118_5 WHERE candidates = "Henry E. Barbour (R) 52.1% Henry Hawson (D) 47.9%"
Provide the alias of the city with the highest population in year 2020.
SELECT T1.alias FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.population_2020 = ( SELECT MAX(population_2020) FROM zip_data )
How many were in attendance when the league position was 16th and the score was F–A of 0–3?
SELECT COUNT(attendance) FROM table_name_43 WHERE league_position = "16th" AND score_f_a = "0–3"
Find the highest rank of all reviews.
SELECT min(rank) FROM review
report the total number of degrees granted between 1998 and 2002 in each campus.
SELECT T1.campus , sum(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T2.year >= 1998 AND T2.year <= 2002 GROUP BY T1.campus
where is the Headquarter of Sony?
SELECT Headquarter FROM manufacturers WHERE Name = "Sony"
What is the highest game with a 24-23 record?
SELECT MAX(game) FROM table_name_62 WHERE record = "24-23"
What is the number of distinct continents where Chinese is spoken?
SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "Chinese"
What is the Netflix where Segment C is car washes?
SELECT netflix FROM table_15187735_12 WHERE segment_c = "Car Washes"
Which start has 32 as the finish and laps more than 6?
SELECT start FROM table_name_11 WHERE finish = "32" AND laps > 6
What are the name and population of each county?
SELECT County_name , Population FROM county
What are the keywords of the episodes which have the air date in 2008?
SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE SUBSTR(T1.air_date, 1, 4) = '2008';
WHAT IS THE CARRIER WITH 5.0.0.742 VERSION?
SELECT carrier FROM table_name_37 WHERE package_version = "5.0.0.742"
Among the states that start with letter A and attained a national sector average of 16.5, give the number of degree-seeking students in the cohort of those students in 2012 .
SELECT SUM(T2.grad_cohort) FROM state_sector_details AS T1 INNER JOIN state_sector_grads AS T2 ON T2.stateid = T1.stateid WHERE T2.state LIKE 'A%' AND T1.awards_per_natl_value = 16.5 AND T2.year = 2012
What is the total (kg when the bodyweight is more than 57.8, and the clean & jerk is less than 103?
SELECT SUM(total__kg_) FROM table_name_94 WHERE bodyweight > 57.8 AND clean_ & _jerk < 103
WHAT HINDI HAS Kannada of shukravara?
SELECT hindi FROM table_name_54 WHERE kannada = "shukravara"
What year is the season with the 10.73 million views?
SELECT tv_season FROM table_10120207_8 WHERE viewers__millions_ = "10.73"
What is the Winning Team, when Losing Team is South Sydney Rabbitohs?
SELECT winning_team FROM table_name_50 WHERE losing_team = "south sydney rabbitohs"
What is the average number of wins for the Terang Club, when there are less than 0 draws?
SELECT AVG(wins) FROM table_name_43 WHERE club = "terang" AND draws < 0
Write down the conference full name of "ICWE" and it's homepage address.
SELECT FullName, Homepage FROM Conference WHERE ShortName = 'ICWE'
What selection was the springfield olympics (nejhl)?
SELECT MAX(pick__number) FROM table_2850912_12 WHERE college_junior_club_team = "Springfield Olympics (NEJHL)"
During Game 2, which position did Andrew Farrar play?
SELECT position FROM table_name_20 WHERE game_2 = "andrew farrar"
Indicate the opening hours of businesses are with category in fashion.
SELECT T4.opening_time FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id INNER JOIN Business_Hours AS T4 ON T3.business_id = T4.business_id WHERE T1.category_name LIKE 'Fashion'
Which Score has a Home team of aston villa?
SELECT score FROM table_name_20 WHERE home_team = "aston villa"
Hmm, I want to know the famous titles of the artists associated with volumes with more than 2 weeks on top.
SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2
Name the length for all class and date of march 18
SELECT length FROM table_name_63 WHERE class = "all" AND date = "march 18"
Can you show me all first and last names from the list table that have a classroom id of 108?
SELECT firstname, lastname from teachers where classroom = 108
What are all the source airports?
SELECT T2.src_apid,T2.src_ap,T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name
What is the least amount of league of communists where municipality is mojkovac
SELECT MIN(league_of_communists) FROM table_15306124_1 WHERE municipality = "Mojkovac"
Which city does the school that project "iMath" donated to in?
SELECT T1.school_city FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T2.title LIKE 'iMath'
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;
How many actors are there?
SELECT count(*) FROM actor
What is the weight when 20 is the number?
SELECT MAX(weight) FROM table_22496344_1 WHERE _number = 20
When was there a result of 8-1 and a score of 8-1?
SELECT date FROM table_name_92 WHERE result = "8-1" AND score = "8-1"
Return the date of birth for all the guests with gender code "Male".
SELECT date_of_birth FROM Guests WHERE gender_code = "Male"
Which Gothic Letter has Proto-Germanic origin of /ɸ/; /b/?
SELECT gothic_letter FROM table_name_4 WHERE proto_germanic_origin = "/ɸ/; /b/"
How many employees serve at least 10 customers?
SELECT count ( * ) FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT ( * ) > = 10
How many movies has the highest networth actor acted in?
SELECT COUNT(*) FROM characters AS T1 INNER JOIN actor AS T2 ON T1.ActorID = T2.ActorID WHERE CAST(REPLACE(REPLACE(T2.NetWorth, ',', ''), '$', '') AS REAL) = ( SELECT MAX(CAST(REPLACE(REPLACE(NetWorth, ',', ''), '$', '') AS REAL)) FROM actor)
Find the percentage of discontinued products in Northwind's portfolio of products.
SELECT CAST(COUNT(CASE WHEN Discontinued = 1 THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(ProductID) FROM Products
Round of 1r, and an away result of 7–1 is what season?
SELECT season FROM table_name_65 WHERE round = "1r" AND away_result = "7–1"
What are all the distinct details of the customers?
SELECT DISTINCT customer_details FROM Customers
What is the highest duration of songs that have mp3 format and resolution below 800?
SELECT max ( T1.duration ) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = "mp3" AND T2.resolution < 800
Name the teams along with the coaches that went to 'Quarter Final' round in 1946.
SELECT DISTINCT T1.coachID, T3.name FROM coaches AS T1 JOIN series_post AS T2 ON T1.tmID = T2.tmIDWinner JOIN teams AS T3 ON T3.tmID = T1.tmID WHERE T2.round = 'QF' AND T2.year = 1946
What is the result for Melbourne when Gold Coast, Perth, Auckland, and Sydney are no?
SELECT melbourne FROM table_name_1 WHERE gold_coast = "no" AND perth = "no" AND auckland = "no" AND sydney = "no"
How many countries has more than 2 car makers ?
select count(*) from countries as t1 join car_makers as t2 on t1.countryid = t2.country group by t1.countryid having count(*) > 2
What is the number of days that had an average humity above 50 and an average visibility above 8?
SELECT COUNT(*) FROM weather WHERE mean_humidity > 50 AND mean_visibility_miles > 8
Name the venue for 15 august 2006
SELECT venue FROM table_name_89 WHERE date = "15 august 2006"
List down the cities with unknown country.
SELECT city FROM geographic WHERE county = 'unknown'
When Bob Dole had 26%, and George H.W. Bush had 47%, what did Pat Robertson have?
SELECT pat_robertson FROM table_name_12 WHERE bob_dole = "26%" AND george_hw_bush = "47%"
What are the name and location of the cinema with the largest capacity?
SELECT name , LOCATION FROM cinema ORDER BY capacity DESC LIMIT 1
How many Asians live in the borough with 8109 Chinese population?
SELECT MIN(total_asian_population) FROM table_19149550_9 WHERE chinese_population = 8109
List down the student names who did not file for bankruptcy.
SELECT name FROM person WHERE name NOT IN ( SELECT name FROM filed_for_bankrupcy )
On what date was Richmond playing as an away team?
SELECT date FROM table_name_32 WHERE away_team = "richmond"
For the all donations to the project 'Bringing Drama to Life', what is the percentage of the donation is paid by credit card?
SELECT CAST(SUM(CASE WHEN T2.payment_method LIKE 'creditcard' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(donationid) FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'Bringing Drama to Life'
What are the names of ships that are commanded by both captains with the rank of Midshipman and captains with the rank of Lieutenant?
SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Midshipman' INTERSECT SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Lieutenant'
District commander Robert A. Rubio was responsible for how many incidents in January, 2018?
SELECT SUM(CASE WHEN SUBSTR(T2.date, 5, 4) = '2018' THEN 1 ELSE 0 END) FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no WHERE T1.commander = 'Robert A. Rubio' AND SUBSTR(T2.date, 1, 1) = '1'
Who were the runner(s)-up when Tiger won by 11 strokes?
SELECT runner_s__up FROM table_11570261_2 WHERE margin_of_victory = "11 strokes"
What place had a To par of –10?
SELECT place FROM table_name_28 WHERE to_par = "–10"
What is the highest Version, when Release Date is "2011-04-01"?
SELECT MAX(version) FROM table_name_38 WHERE release_date = "2011-04-01"