sentence
stringlengths
3
347
sql
stringlengths
18
804
Find the names of users who have more than one tweet.
SELECT T1.name FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING count(*) > 1
who had the fastest lap for round 1?
SELECT fastest_lap FROM table_29686983_1 WHERE round = 1
What team played South Melbourne at their home game?
SELECT away_team FROM table_name_22 WHERE home_team = "south melbourne"
List all the coatches of the Oklahoma City Thunder
SELECT DISTINCT coachID FROM coaches AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID WHERE name = 'Oklahoma City Thunder'
What are the IDs and resolutions of all the songs with resolutions higher than those?
SELECT f_id,resolution FROM song WHERE resolution > ( SELECT max ( resolution ) FROM song WHERE rating < 8 )
Who was the replacement for the Brussels team with a date of vacancy of 22 December 2007?
SELECT replaced_by FROM table_name_46 WHERE team = "brussels" AND date_of_vacancy = "22 december 2007"
How many parties received 29.9% of the vote in Manhattan?
SELECT COUNT(party) FROM table_1108394_47 WHERE manhattan = "29.9_percentage"
Count the total number of settlements made.
SELECT count(*) FROM Settlements
What is the lowest sentiment polarity score of the Basketball Stars app for people who dislikes the app pretty much and how many downloads does it have?
SELECT MIN(T2.Sentiment_Polarity), T1.Installs FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Basketball Stars'
Among the products under the type "promo brushed steel", how many of them are manufactured by Manufacturer#5?
SELECT COUNT(p_partkey) FROM part WHERE p_type = 'PROMO BRUSHED STEEL' AND p_mfgr = 'Manufacturer#5'
Show all ministers who do not belong to Progress Party.
SELECT minister FROM party WHERE party_name != 'Progress Party'
What is the name and job title of the staff who was assigned the latest?
SELECT T1.staff_name, T2.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY T2.date_assigned_to DESC LIMIT 1
What's the oil rig of the song with a draw number 9?
SELECT MIN(oil_rig) FROM table_20183474_1 WHERE draw = 9
What is the condition of the platelet counts in hemophilia?
SELECT platelet_count FROM table_1557752_1 WHERE condition = "Hemophilia"
What is the overall sum of the game with a pick less than 8 from the college of western michigan?
SELECT SUM(overall) FROM table_name_23 WHERE pick < 8 AND college = "western michigan"
How many incumbents come from alvin bush's district?
SELECT COUNT(candidates) FROM table_1341930_38 WHERE incumbent = "Alvin Bush"
I want to know the customer names and how many credit cards they have?
SELECT T2.customer_first_name, T2.customer_last_name, count ( * ) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.card_type_code = "Credit" group by T1.customer_id
What are the ids of documents that contain the paragraph text 'Brazil' and 'Ireland'?
SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland'
What country placed t3 with a score of 70-65=135?
SELECT country FROM table_name_52 WHERE place = "t3" AND score = 70 - 65 = 135
How many words have repetitions greater than 2000 and lower than 5000?
SELECT COUNT(wid) FROM langs_words WHERE occurrences BETWEEN '2000' AND '5000'
How many students have personal names that contain the word "son"?
SELECT COUNT(*) FROM Students WHERE personal_name LIKE "%son%"
Who corned the most points for the game that ended with a score of l 85–94 (ot)?
SELECT high_points FROM table_27734577_2 WHERE score = "L 85–94 (OT)"
What is the average attendance for the game before week 4 that was on october 16, 1955?
SELECT AVG(attendance) FROM table_name_97 WHERE date = "october 16, 1955" AND week < 4
Which Asian country gave its agricultural sector the largest share of its gross domestic product?
SELECT T2.Country FROM continent AS T1 INNER JOIN encompasses AS T2 ON T1.Name = T2.Continent INNER JOIN country AS T3 ON T2.Country = T3.Code INNER JOIN economy AS T4 ON T4.Country = T3.Code WHERE T1.Name = 'Asia' ORDER BY T4.Agriculture DESC LIMIT 1
Name the name of 36.0n
SELECT name FROM table_16799784_2 WHERE latitude = "36.0N"
How many albums in this table? | did you mean the number of all the albums shown in the table? | Yes.
SELECT count ( * ) FROM ALBUM
What is the id of the criteria "Citations Rank"?
SELECT id FROM ranking_criteria WHERE criteria_name = 'Citations Rank'
Find the name of the teacher who teaches the largest number of students.
SELECT T2.firstname , T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom GROUP BY T2.firstname , T2.lastname ORDER BY count(*) DESC LIMIT 1
How many active users were there in the event id 2?
SELECT COUNT(is_active) FROM app_events WHERE event_id = 2 AND is_active = 1
Which Location has a Game greater than 27 and a Record of 18-10?
SELECT location FROM table_name_58 WHERE game > 27 AND record = "18-10"
Which Grand Prix did David Coulthard win with Michael Schumacher in the pole position before round 9?
SELECT grand_prix FROM table_name_58 WHERE winning_driver = "david coulthard" AND pole_position = "michael schumacher" AND round < 9
What player received the injury? | You mean all the players having injuries? | What player received the Hamstring muscle strain in his left thigh?
SELECT player from injury_accident where injury = "Hamstring muscle strain in his left thigh"
In Barcelona, how many Olympic games were held?
SELECT COUNT(T1.games_id) FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id WHERE T2.city_name = 'Barcelona'
What is the membership card held by both members living in Hartford and ones living in Waterbury address?
SELECT membership_card FROM member WHERE address = 'Hartford' INTERSECT SELECT membership_card FROM member WHERE address = 'Waterbury'
Who is the incumbent of Florida 9?
SELECT incumbent FROM table_1341423_9 WHERE district = "Florida 9"
Name the total number of written by for 26 july 2010
SELECT COUNT(written_by) FROM table_27218002_1 WHERE originalairdate = "26 July 2010"
List all members and member type of the Islamic Development Bank.
SELECT T2.Country, T2.Type FROM organization AS T1 INNER JOIN isMember AS T2 ON T1.Abbreviation = T2.Organization INNER JOIN country AS T3 ON T2.Country = T3.Code WHERE T1.Name = 'Islamic Development Bank'
What is the first name of the student whose last name starts with the letter S and is taking ACCT-211?
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 WHERE T3.crs_code = 'ACCT-211' AND T1.stu_lname LIKE 'S%'
Give the number of solutions that the repository which has 3060 Stars contains.
SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Stars = 3060
How many opponents led to an exactly 7-0 record?
SELECT COUNT(opponent) FROM table_21034801_1 WHERE record = "7-0"
Where is David Frost from?
SELECT place FROM table_name_38 WHERE player = "david frost"
How many wins does that driver have?
SELECT count ( * ) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid where T1.surname = "Nakajima" and T2.rank = 1
What is the Gaelic name for an area less than 127 in Kintyre?
SELECT gaelic_name FROM table_name_63 WHERE area___ha__ < 127 AND location = "kintyre"
Which city in West North Central has the highest number of customers over the age of 60?
SELECT T2.city FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.division = 'West North Central' AND T1.age > 60 GROUP BY T2.city ORDER BY COUNT(T2.city) DESC LIMIT 1
Which Location has a Floors of 03.0 n/a?
SELECT location FROM table_name_18 WHERE floors = "03.0 n/a"
What is the customer id that spends the most
SELECT customer_id FROM Payments GROUP BY customer_id ORDER BY sum ( amount_paid ) DESC LIMIT 1
what is the season when the lead is john shuster and third is shawn rojeski?
SELECT season FROM table_name_54 WHERE lead = "john shuster" AND third = "shawn rojeski"
Hi, show me the instructors
SELECT name FROM instructor
What kind of IATA has an Airport of hamburg airport?
SELECT iata FROM table_name_5 WHERE airport = "hamburg airport"
Please list just Tillman Ernsers contact channel
SELECT DISTINCT channel_code FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id where customer_name = "Tillman Ernser"
What code has the most number of documents? | The type code that has the most number of documents is BK | How many documents are in BK?
SELECT count ( * ) FROM Documents where Document_Type_Code = "BK"
Show all product names without an order.
SELECT product_name FROM Products EXCEPT SELECT T1.product_name FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id
How many people attended the game of a.f.c. totton?
SELECT attendance FROM table_name_47 WHERE home_team = "a.f.c. totton"
What is the highest rank of a rider whose time was 1:19.02.8?
SELECT MAX(place) FROM table_name_70 WHERE time = "1:19.02.8"
How many different scores are there for the Verizon Classic?
SELECT COUNT(score) FROM table_11603006_1 WHERE tournament = "Verizon Classic"
What is the rank of the 150.163 qual?
SELECT rank FROM table_name_34 WHERE qual = "150.163"
What was awarded before 2013 to the Saber in the category of Best Action?
SELECT award FROM table_name_93 WHERE year < 2013 AND title_of_work = "saber" AND category = "best action"
What is the protein name when aa length is 202 aa?
SELECT protein_name FROM table_26708105_5 WHERE aa_length = "202 aa"
What nationality is the swimmer that is in the lane that is less than 2?
SELECT nationality FROM table_name_3 WHERE lane < 2
How many distinct movies in English stars a male actor who acts the best?
SELECT COUNT(DISTINCT T1.actorid) FROM actors AS T1 INNER JOIN movies2actors AS T2 ON T1.actorid = T2.actorid INNER JOIN movies AS T3 ON T2.movieid = T3.movieid WHERE T3.isEnglish = 'T' AND T1.a_gender = 'M' AND T1.a_quality = 5
What are the codes of countries with more than 50 players?
SELECT country_code FROM players GROUP BY country_code HAVING count(*) > 50
What is the position of the player from Tampa?
SELECT position FROM table_name_14 WHERE school_club_team = "tampa"
When against is more than 1244 with less than 8 losses, what is the average of wins?
SELECT AVG(wins) FROM table_name_82 WHERE against > 1244 AND losses < 8
Calculate the percentage of times that the same word appears in a pair.
SELECT CAST(COUNT(CASE WHEN w1st = w2nd THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(w1st) FROM biwords
Find the id of the customers who have order status both "On Road" and "Shipped".
SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "On Road" INTERSECT SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "Shipped"
List the number of invoices and the invoice total from California.
SELECT billing_state , COUNT(*) , SUM(total) FROM invoices WHERE billing_state = "CA";
Find the name of the room with the maximum occupancy.
SELECT roomName FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1
Who is the crime against criminal sexual abuse?
SELECT crime_against FROM FBI_Code WHERE title = 'Criminal Sexual Abuse'
What are the names of the products that were discountinued?
SELECT ProductName FROM Products WHERE Discontinued = 1
Which group does age 24 belong to?
SELECT `group` FROM gender_age WHERE age = '24'
If the establishment is 49319, what is the sales, receipts or shipments maximum amount?
SELECT MAX(sales), _receipts, _or_shipments__$1, 000 AS _ FROM table_23802822_1 WHERE establishments = 49319
What year was The Horn Blows at Midnight, directed by Raoul Walsh?
SELECT AVG(year) FROM table_name_96 WHERE director = "raoul walsh" AND title = "the horn blows at midnight"
What is the highest Game, when Record is "21-30-11"?
SELECT MAX(game) FROM table_name_92 WHERE record = "21-30-11"
For all the referees, who became a hall of famer in the 1970s? What's his hofID?
SELECT name, hofID FROM HOF WHERE category = 'Builder' AND year BETWEEN 1970 AND 1979
Who is the main contestant when the co-contestant (yaar vs. pyaar) is Shalini Chandran?
SELECT main_contestant FROM table_name_33 WHERE co_contestant__yaar_vs_pyaar_ = "shalini chandran"
what is the range of Mount Kenya (Batian) in country kenya
SELECT Range FROM mountain where country = 'Kenya' and name = 'Mount Kenya ( Batian ) '
How many different clerks have served the customer with the address uFTe2u518et8Q8UC?
SELECT COUNT(T1.o_clerk) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_address = 'uFTe2u518et8Q8UC'
What is Ring Name, when Stable is Kasugano, and when Birthplace is Z Mtskheta , Georgia?
SELECT ring_name FROM table_name_49 WHERE stable = "kasugano" AND birthplace = "z mtskheta , georgia"
what is the name of the person who weighs the least?
SELECT Name FROM people order by weight asc limit 1
What are the cities/towns located in the municipality of Moss?
SELECT city_town FROM table_157826_1 WHERE municipality = "Moss"
What was hayley ericksen's score?
SELECT score FROM table_name_97 WHERE partner = "hayley ericksen"
How many churches opened before 1850 are there?
SELECT count(*) FROM Church WHERE Open_Date < 1850
Find the IDs of customers whose name contains "Diana".
SELECT customer_id FROM customers WHERE customer_name LIKE "%Diana%"
What are the names of the coaches that started in 2010?
SELECT coach_name from coach as t1 join player_coach as t2 on t1.coach_id = t2.coach_id where starting_year = 2010
What is the 54 holes for The Open Championship (4)?
SELECT 54 AS _holes FROM table_name_7 WHERE championship = "the open championship (4)"
Find all phones that have word 'Full' in their accreditation types. List the Hardware Model name and Company name.
SELECT Hardware_Model_name , Company_name FROM phone WHERE Accreditation_type LIKE 'Full';
What is the agg when team 1 is Milan?
SELECT agg FROM table_name_70 WHERE team_1 = "milan"
Find the winning rate of award in 2010. Describe the winner name, award name, episode title and role of the winner in that episode.
SELECT T3.rate, T4.person, T4.award, T5.title, T4.role FROM ( SELECT CAST(SUM(CASE WHEN T1.result = 'Winner' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.result IN ('Winner', 'Nominee') THEN 1 ELSE 0 END) AS rate , T1.person, T1.award, T2.title, T1.role FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE SUBSTR(T1.year, 1, 4) = '2010' ) AS T3 INNER JOIN Award AS T4 INNER JOIN Episode AS T5 ON T4.episode_id = T5.episode_id WHERE T4.year = 2010 AND T4.result = 'Winner';
Tell me the stages for 1981
SELECT stages FROM table_name_42 WHERE year = 1981
How many goals occurred for Stein Huysegems when the caps value is more than 8?
SELECT goals FROM table_name_13 WHERE caps > 8 AND player = "stein huysegems"
What are the names of all the playlists?
SELECT name FROM playlists;
Who were the winner and nominees in 2001?
SELECT winner_nominee_s_ FROM table_name_27 WHERE year = 2001
What date did the episode that had 1.023 million u.s. viewers originally air?
SELECT original_air_date FROM table_24223834_3 WHERE us_viewers__in_millions_ = "1.023"
Find the branch name of the bank that has the most number of customers.
SELECT bname FROM bank ORDER BY no_of_customers DESC LIMIT 1
Find the most important and most difficult courses.
SELECT name FROM course WHERE credit = ( SELECT MAX(credit) FROM course ) AND diff = ( SELECT MAX(diff) FROM course )
What is the salaray and name of the employee with the most certificates to fly planes more than 5000?
SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.distance > 5000 GROUP BY T1.eid ORDER BY count(*) DESC LIMIT 1
Where was the 1984 Olympics hosted?
SELECT tournament FROM table_name_29 WHERE year = 1984
For games on December 20, how many points did the scoring leaders get?
SELECT high_points FROM table_10812293_4 WHERE date = "December 20"
What was the result for song of the year award in 1994?
SELECT result FROM table_name_69 WHERE year = 1994 AND award = "song of the year"
Please give the contact name for Tokyo Traders.
SELECT ContactName FROM Suppliers WHERE CompanyName = 'Tokyo Traders'