sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Give the Finish for a Stage that is larger than 15 | SELECT finish FROM table_name_44 WHERE stage > 15 |
What is the language most often used in songs with resolution below 500? | SELECT languages FROM song WHERE resolution < 500 GROUP BY languages ORDER BY count ( * ) DESC LIMIT 1 |
What was the record at week 7 | SELECT record FROM table_11391448_2 WHERE week = 7 |
What is the total number of hours per week and number of games played by students under 20? | SELECT sum(hoursperweek) , sum(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.age < 20 |
WHICH Date has a Venue of lancaster park , christchurch? | SELECT date FROM table_name_14 WHERE venue = "lancaster park , christchurch" |
What is Home Team, when Away Team is "Brentford"? | SELECT home_team FROM table_name_67 WHERE away_team = "brentford" |
What is the alphabetically ordered list of all the distinct names of nurses? | SELECT DISTINCT name FROM nurse ORDER BY name |
What is the country that has the most perpetrators? | SELECT Country, COUNT(*) FROM perpetrator GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1 |
How many ships are there? | SELECT count(*) FROM ship |
Could you please show me all the student IDs with the number of sports? | SELECT StuID , count ( * ) FROM Sportsinfo GROUP BY StuID |
How many people watched season 1? | SELECT viewers__in_millions_ FROM table_name_69 WHERE season = "1" |
How about her a id | SELECT T2.a_id FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id where T1.name = 'Helen' |
What is the average bronze with a total of 15 and less than 2 gold? | SELECT AVG(bronze) FROM table_name_69 WHERE total = 15 AND gold < 2 |
How many paragraphs are there in the scene whose description is "A Sea-port in Cyprus. An open place near the quay."? | SELECT SUM(T2.ParagraphNum) FROM chapters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.chapter_id WHERE T1.Description = 'A Sea-port in Cyprus. An open place near the quay.' |
What is the total swimsuit number with gowns larger than 9.48 with interviews larger than 8.94 in florida? | SELECT COUNT(swimsuit) FROM table_name_35 WHERE evening_gown > 9.48 AND country = "florida" AND interview > 8.94 |
How many of those 3 are currently teaching courses? | SELECT count ( DISTINCT t3.emp_num ) FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T3.dept_code = 'ACCT' |
Find all the songs performed by artist with last name "Heilo" | SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.Lastname = "Heilo" |
How many picks did the College of USC wind up getting? | SELECT COUNT(pick__number) FROM table_name_67 WHERE college = "usc" |
Show the names of high school students and their corresponding number of friends. | SELECT T2.name , count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id |
What is the gender and name of the artist who sang the song with the smallest resolution? | SELECT T1.gender , T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.resolution LIMIT 1 |
What's the name of the athlete with a Snatch larger than 140, Bodyweight smaller than 84.55, and Clean and Jerk of 192.5? | SELECT name FROM table_name_62 WHERE snatch > 140 AND bodyweight < 84.55 AND clean_ & _jerk = "192.5" |
Which 2 countries' border span across the longest length? Provide the country's full name. | SELECT T1.Name, T3.Name FROM country AS T1 INNER JOIN borders AS T2 ON T1.Code = T2.Country1 INNER JOIN country AS T3 ON T3.Code = T2.Country2 ORDER BY T2.Length DESC LIMIT 1 |
List the occupation and income of male customers with an level of education of 4 to 6. | SELECT T1.OCCUPATION, T2.INCOME_K FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.EDUCATIONNUM >= 4 AND T1.EDUCATIONNUM <= 6 AND T1.SEX = 'Male' |
Which team had the attendance of 16,468 and lost? | SELECT loss FROM table_name_61 WHERE attendance = "16,468" |
Which record has a Team of manchester yankees? | SELECT record FROM table_name_43 WHERE team = "manchester yankees" |
What capital's county had a population of 730129 as of 2009? | SELECT capital FROM table_16278894_1 WHERE population_census_2009 = 730129 |
What is Mike Souchak's to par? | SELECT to_par FROM table_name_89 WHERE player = "mike souchak" |
What are the names of players from the dr congo? | SELECT name FROM table_29743928_3 WHERE country = "DR Congo" |
Name the episode with maritza reveron | SELECT episode FROM table_2140071_10 WHERE coach = "Maritza Reveron" |
If fitzroy is the Away team, what Date did they play? | SELECT date FROM table_name_97 WHERE away_team = "fitzroy" |
What is the mean longitude for all stations that have never had more than 10 bikes available? | SELECT avg(long) FROM station WHERE id NOT IN (SELECT station_id FROM status GROUP BY station_id HAVING max(bikes_available) > 10) |
Show different types of ships and the average tonnage of ships of each type. | SELECT TYPE , avg(Tonnage) FROM ship GROUP BY TYPE |
How many of the shipments bound for New York City were shipped to Harry's Hot Rod Auto and Truck Accessories? | SELECT COUNT(*) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id INNER JOIN city AS T3 ON T3.city_id = T2.city_id WHERE T3.city_name = 'New York' AND T1.cust_name = 'Harry''s Hot Rod Auto & Truck Accessories' |
How much was the transfer fee when n is 2? | SELECT transfer_fee FROM table_22810095_8 WHERE n = 2 |
What Pastoral Region has 3 Cemeteries? | SELECT pastoral_region FROM table_name_57 WHERE cemeteries = 3 |
List the person IDs and course levels of the affiliated professors in faculty. | SELECT T1.p_id, T3.courseLevel FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id INNER JOIN course AS T3 ON T3.course_id = T2.course_id WHERE T1.hasPosition = 'Faculty_aff' |
What is the care plan description of the prevalent disease with the highest prevalence percentage? | SELECT T4.DESCRIPTION FROM all_prevalences AS T1 INNER JOIN conditions AS T2 ON T2.DESCRIPTION = T1.ITEM INNER JOIN encounters AS T3 ON T2.ENCOUNTER = T3.ID INNER JOIN careplans AS T4 ON T4.ENCOUNTER = T3.ID ORDER BY T1."PREVALENCE PERCENTAGE" DESC LIMIT 1 |
List the clubs that have at least a member with advisor "1121". | SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.advisor = 1121 |
Name the record for may 3 | SELECT record FROM table_name_92 WHERE date = "may 3" |
What is the original airdate for episode 7-17 (195) from writer Sidney Slon? | SELECT original_airdate FROM table_name_5 WHERE writer_s_ = "sidney slon" AND episode = "7-17 (195)" |
Find the price of all wines that have prices higher than some wines from John Anthony winery. | SELECT Price FROM WINE WHERE Price > ( SELECT min ( Price ) FROM wine WHERE Winery = "John Anthony" ) |
Which race number in the Indy F3 Challenge circuit had John Martin in pole position? | SELECT race FROM table_15530244_2 WHERE circuit = "Indy F3 Challenge" AND pole_position = "John Martin" |
What is the school of the player from Dallas, TX? | SELECT school FROM table_name_47 WHERE hometown = "dallas, tx" |
Calculate the win rate of the team "Chennai Super Kings". | SELECT CAST(SUM(CASE WHEN T1.Match_Winner = 3 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Match_Id) FROM Match AS T1 INNER JOIN Team AS T2 ON T2.Team_Id = T1.Team_1 INNER JOIN Team AS T3 ON T3.Team_Id = T1.Team_2 WHERE T2.Team_Name = 'Chennai Super Kings' OR T3.Team_Name = 'Chennai Super Kings' |
Name the least indian tamil for population density being 240 | SELECT MIN(indian_tamil) FROM table_24574438_1 WHERE population_density___km_2__ = 240 |
What are the shortest duration and lowest rating of songs grouped by genre and ordered by genre? | SELECT min(T1.duration) , min(T2.rating) , T2.genre_is FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.genre_is ORDER BY T2.genre_is |
The Olympic competitor John Aalberg is from which region? | SELECT T1.region_name FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.full_name = 'John Aalberg' |
What is the genitive for the ergative shen? | SELECT genitive FROM table_name_1 WHERE ergative = "shen" |
Where is the University of North Carolina at Greensboro located? | SELECT location FROM table_255188_3 WHERE institution = "University of North Carolina at Greensboro" |
How many customers are located in London? | SELECT COUNT(CustomerID) FROM Customers WHERE City = 'London' |
What was the Partner on February 23, 1997? | SELECT partner FROM table_name_91 WHERE date = "february 23, 1997" |
Find all the instruments ever used by the musician with last name "Heilo"? | SELECT instrument FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = "Heilo" |
How many users, between the age 27 to 35, were surveyed in 2018? | SELECT T1.UserID FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T1.SurveyID = 2018 AND T2.questionid = 1 AND T1.AnswerText BETWEEN '27' AND '35' |
Show the locations of parties with hosts older than 50. | SELECT T3.Location FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T2.Age > 50 |
Name the venue when the away team was richmond | SELECT venue FROM table_name_6 WHERE away_team = "richmond" |
How many samples of food object are there in image no.6? | SELECT COUNT(T2.OBJ_SAMPLE_ID) FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.IMG_ID = 6 AND T1.OBJ_CLASS = 'food' |
How many orders does Luca Mancini have in his invoices? | SELECT count(*) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = "Lucas" AND T1.last_name = "Mancini"; |
What is the title of the employee with the highest number of territories in charge? | SELECT T1.Title FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID GROUP BY T1.Title ORDER BY COUNT(T2.TerritoryID) DESC LIMIT 1 |
Give the NOC code and region name of the heaviest competitor. | SELECT T1.noc, T1.region_name FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id ORDER BY T3.weight DESC LIMIT 1 |
Show all artist names who didn't have an exhibition in 2004. | SELECT name FROM artist EXCEPT SELECT T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.year = 2004 |
How many assets can each part be used in? | Here is the result table of the part names and the number of assets that each of them can use. For example, the middle part can use 5 assets. | what is the part ID's for these? | SELECT T1.part_id FROM Parts AS T1 JOIN Asset_Parts AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_name |
What is the smallest number of fastest laps listed? | SELECT MIN(fastest_laps) FROM table_19312274_3 |
Tell me the venue for record of 2-7 | SELECT venue FROM table_name_39 WHERE record = "2-7" |
Show the names of companies in the banking or retailing industry? | SELECT Name FROM company WHERE Industry = "Banking" OR Industry = "Retailing" |
List out student names that enrolled in two schools and two organizations? | SELECT T.name FROM ( SELECT T1.name, COUNT(T1.organ) AS num FROM enlist AS T1 INNER JOIN enrolled AS T2 ON T1.name = T2.name GROUP BY T1.name ) T WHERE T.num = 2 |
How many different source system code for the cmi cross references are there? | SELECT count(DISTINCT source_system_code) FROM CMI_cross_references |
Hello. What is the name of the youngest editor? | SELECT Name FROM editor ORDER BY Age ASC LIMIT 1 |
For all the deceased players who are good at both left and right hand, list the player's name and the age when he died. | SELECT firstName, lastName, deathYear - birthYear FROM Master WHERE shootCatch IS NULL AND deathYear IS NOT NULL |
Tell me about the information of the French publisher. | SELECT T1.pr_info FROM pub_info AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T2.country = 'France' |
What type has the most games? | SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) DESC LIMIT 1 |
What are the names of all pilots listed by descending age? | SELECT Name FROM pilot ORDER BY Age DESC |
How many film titles are there? | SELECT count ( distinct title ) from film |
And what's the name for that musical with ID 6? | SELECT DISTINCT ( T2.Name ) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID WHERE T2.musical_ID = 6 |
What are the details of the shops that can be accessed by walk? | SELECT T1.Shop_Details FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = "walk" |
What is the average pick of school/club team kutztown state with a round 4? | SELECT AVG(pick) FROM table_name_3 WHERE round = 4 AND school_club_team = "kutztown state" |
How many dorms are in the database? | SELECT count(*) FROM dorm |
Name the 2013 club which has a Name of ana grbac category:articles with hcards? | SELECT 2013 AS _club FROM table_name_62 WHERE name = "ana grbac category:articles with hcards" |
what is the highest rank in dresden with a time faster than 10.88? | SELECT MAX(rank) FROM table_name_97 WHERE location = "dresden" AND fastest_time__s_ < 10.88 |
What are the official languages used in Belgium? | SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Belgium' AND T2.IsOfficial = 'T' |
In what venue did FK Crvena Stijena play at home? | SELECT venue FROM table_name_24 WHERE home = "fk crvena stijena" |
Who beat the Marlins with a score of 4-0? | SELECT winning_team FROM table_name_68 WHERE losing_team = "marlins" AND score = "4-0" |
Please list the occupations of the customers over 40 and have sent a true response to the incentive mailing sent by the marketing department. | SELECT DISTINCT T1.OCCUPATION FROM Customers AS T1 INNER JOIN Mailings1_2 AS T2 ON T1.ID = T2.REFID WHERE T1.age > 40 AND T2.RESPONSE = 'true' |
How many ingredients are needed to prepare Idaho Potato Supreme? | SELECT COUNT(*) FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.title = 'Idaho Potato Supreme' |
What is the email and followers of Iron Man? | SELECT email,followers FROM user_profiles where name = "Iron Man" |
Please give the title of the work of Shakespeare that has the most characters. | SELECT T.Title FROM ( SELECT T1.Title, COUNT(T3.character_id) AS num FROM works T1 INNER JOIN chapters T2 ON T1.id = T2.work_id INNER JOIN paragraphs T3 ON T2.id = T3.chapter_id INNER JOIN characters T4 ON T3.character_id = T4.id GROUP BY T3.character_id, T1.Title ) T ORDER BY T.num DESC LIMIT 1 |
What are the names of actors who are not 20 years old? | SELECT Name FROM actor WHERE Age != 20 |
How much is the GDP for an area of 61,395? | SELECT gdp__ppp__$m_usd FROM table_name_86 WHERE area__km²_ = "61,395" |
Find the name and category of the most expensive product. | SELECT product_name , product_category_code FROM products ORDER BY product_price DESC LIMIT 1 |
Which customer's name contains "Alex"? Find the full name. | SELECT customer_name FROM customers WHERE customer_name LIKE "%Alex%" |
Show the names of products that are in at least two events in ascending alphabetical order of product name. | SELECT T1.Product_Name FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name HAVING COUNT(*) >= 2 ORDER BY T1.Product_Name |
What is the name of the artist who produced the shortest song? | SELECT T1.artist_name FROM song AS T1 JOIN files AS T2 ON T1.f_id = T2.f_id ORDER BY T2.duration LIMIT 1 |
What was the score of the game 57 after February 23? | SELECT score FROM table_name_19 WHERE february > 23 AND game = 57 |
Name the most number for 74 runs margins | SELECT MAX(s_no) FROM table_1594772_2 WHERE margin = "74 runs" |
Awesome! Finally, can you show me the number of loans and credit score for Owen? | SELECT T1.credit_score,count ( * ) FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id where T1.cust_name = "Owen" |
What is the title of the episode that was watched by 8.92 million viewers? | SELECT episode_title FROM table_12146637_1 WHERE us_viewers__millions_ = "8.92" |
How many books are in English? | SELECT COUNT(*) FROM book AS T1 INNER JOIN book_language AS T2 ON T1.language_id = T2.language_id WHERE T2.language_name = 'English' |
Which Country has a Winter Olympics of 1948? | SELECT country FROM table_name_28 WHERE winter_olympics = "1948" |
What is Tournament, when Week is November 23? | SELECT tournament FROM table_name_64 WHERE week = "november 23" |
Which book has the most number of pages? | SELECT title FROM book ORDER BY num_pages DESC LIMIT 1 |
how many courses are there? | SELECT count ( * ) FROM course |
Subsets and Splits