sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Who was the opponent with a 32-25 record? | SELECT opponent FROM table_name_50 WHERE record = "32-25" |
Show me all storm ids affecting a region id of 12. | SELECT T3.storm_id FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.region_name = 'Denmark' |
List all the cagetories for all the podcasts with "jessica" in the title. | SELECT category FROM categories WHERE podcast_id IN ( SELECT podcast_id FROM podcasts WHERE title LIKE '%jessica%' ) |
Which Score has a Visitor of ny rangers, and a Record of 19–28–15? | SELECT score FROM table_name_19 WHERE visitor = "ny rangers" AND record = "19–28–15" |
What position for chris moreno? | SELECT position FROM table_name_18 WHERE player = "chris moreno" |
What is the p max (bar) in the pistol where the chambering is .45 ACP? | SELECT MAX(p_max___bar__) FROM table_26967904_1 WHERE chambering = ".45 ACP" |
And the min training hours of those players? | SELECT min ( HS ) FROM Player |
What is the lowest FA Cup when the league cup is 1, and the total is more than 23? | SELECT MIN(fa_cup) FROM table_name_16 WHERE league_cup = 1 AND total > 23 |
What is the smallest ROM size of any phone made by company Nokia? | SELECT T1.ROM_MiB FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T2.Company_name = "Nokia Corporation" order by T1.ROM_MiB limit 1 |
Find the contact channel code that was used by the customer named "Tillman Ernser". | SELECT DISTINCT channel_code FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = "Tillman Ernser" |
give me the train number | SELECT train_number FROM train WHERE name = 'Ananthapuri Express' |
List down the customer company names, addresses, phones and faxes which are located in London. | SELECT CompanyName, Address, Phone, Fax FROM Customers WHERE City = 'London' |
To which region does the sales team that has used the WARE-MKL1006 warehouse the most times for its shipments belong? | SELECT T2.Region FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T1.WarehouseCode = 'WARE-MKL1006' GROUP BY T2.Region ORDER BY COUNT(T1.OrderNumber) DESC LIMIT 1 |
What is the month sequence for the month name of av? | SELECT MIN(month_sequence) FROM table_28985631_1 WHERE month_name = "Av" |
List total amount of invoice from Chicago, IL. | SELECT sum(total) FROM invoices WHERE billing_city = "Chicago" AND billing_state = "IL"; |
Which Championship total is over 13? | SELECT AVG(total) FROM table_name_99 WHERE championship > 13 |
What Attack has a 30,00% GERB? | SELECT attack FROM table_name_74 WHERE gerb = "30,00%" |
Find the number of members of club "Pen and Paper Gaming". | SELECT count(*) 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 t1.clubname = "Pen and Paper Gaming" |
Which Frequency MHz has a ERP W of 250? | SELECT MAX(frequency_mhz) FROM table_name_36 WHERE erp_w = 250 |
How many king beds are there? | SELECT SUM(beds) FROM Rooms WHERE bedtype = 'King' |
Which wine has a score of 91? | SELECT * FROM WINE where score = 91 |
State the name of the object class that has in most images. | SELECT OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID GROUP BY T2.OBJ_CLASS ORDER BY COUNT(T1.OBJ_CLASS_ID) DESC LIMIT 1 |
Which Opponent is on april 28? | SELECT opponent FROM table_name_19 WHERE date = "april 28" |
what is the attendance on the date of october 16 and the game is more than 5? | SELECT SUM(attendance) FROM table_name_59 WHERE date = "october 16" AND game > 5 |
Name the other for chironius multiventris septentrionalis | SELECT other FROM table_1850282_7 WHERE species = "Chironius multiventris septentrionalis" |
what is distance for the 7th position? | SELECT COUNT(distance) FROM table_25429986_1 WHERE position = "7th" |
How many bike stations are installed after August, 2013 in San Jose? | SELECT COUNT(installation_date) FROM station WHERE city = 'San Jose' AND (SUBSTR(CAST(installation_date AS TEXT), 1, INSTR(installation_date, '/') - 1) IN ('8', '9', '10', '11', '12') AND SUBSTR(CAST(installation_date AS TEXT), -4) = '2013') OR SUBSTR(CAST(installation_date AS TEXT), -4) > '2013' |
Among the" Mumbai Indians" team that played in 2009, how many percent of the matches did they win? | SELECT CAST(SUM(CASE WHEN T1.Match_Winner = T2.Team_Id THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Match_Id) FROM `Match` AS T1 INNER JOIN Team AS T2 ON T1.Team_1 = T2.Team_Id OR T1.Team_2 = T2.Team_Id WHERE T2.Team_Name = 'Mumbai Indians' AND T1.Match_Date LIKE '2009%' |
What is the attribute ID for attributes whose data type is bool? | SELECT attribute_id FROM Attribute_Definitions WHERE attribute_data_type = "Bool" |
What is heaton chapel's capacity? | SELECT MAX(capacity) FROM table_name_54 WHERE locality = "heaton chapel" |
What are the ids, names and genders of the architects who built two bridges or one mill? | SELECT T1.id , T1.name , T1.gender FROM architect AS T1 JOIN bridge AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING count(*) = 2 UNION SELECT T1.id , T1.name , T1.gender FROM architect AS T1 JOIN mill AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING count(*) = 1 |
What are the different budget type codes, and how many documents are there for each? | SELECT budget_type_code , count(*) FROM Documents_with_expenses GROUP BY budget_type_code |
What are the numbers of constructors for different nationalities? | SELECT COUNT(*), nationality FROM constructors GROUP BY nationality |
What's the title of the film directed by Friz Freleng with an MM Series, production number greater than 6209 and a release date of 1934-11-03? | SELECT title FROM table_name_77 WHERE production_num > 6209 AND series = "mm" AND director = "friz freleng" AND release_date = "1934-11-03" |
What is 1993, when 1992 is "SF", and when Tournament is "Paris"? | SELECT 1993 FROM table_name_7 WHERE 1992 = "sf" AND tournament = "paris" |
For each project id, how many tasks are there? | SELECT count(*) , T1.project_details FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id |
show the date of registration for the student id 1 | select date_of_registration from students where student_id = '1' |
What date was the visiting team of Los Angeles Rams, earlier than 1958? | SELECT date FROM table_name_58 WHERE visiting_team = "los angeles rams" AND year < 1958 |
who is the player when the place is t10 and the score is 67-72-72=211? | SELECT player FROM table_name_37 WHERE place = "t10" AND score = 67 - 72 - 72 = 211 |
How many games has each stadium held? | SELECT T1.id, COUNT(*) FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id GROUP BY T1.id |
Find the name and salary of instructors whose salary is below the average salary of the instructors in the Physics department. | SELECT name , salary FROM instructor WHERE salary < (SELECT avg(salary) FROM instructor WHERE dept_name = 'Physics') |
How many immunizations did the patient with the most prevalent condition that started recently get? | SELECT COUNT(T2.patient) FROM all_prevalences AS T1 INNER JOIN conditions AS T2 ON lower(T1.ITEM) = lower(T2.DESCRIPTION) INNER JOIN immunizations AS T3 ON T2.PATIENT = T3.PATIENT GROUP BY T2.PATIENT ORDER BY T2.START DESC, T1."PREVALENCE RATE" DESC LIMIT 1 |
How many students does LORIA ONDERSMA teaches? | SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "LORIA" AND T2.lastname = "ONDERSMA" |
What is the population where the rank is higher than 51 and the Median House-hold income is $25,250? | SELECT SUM(population) FROM table_name_50 WHERE rank > 51 AND median_house__hold_income = "$25,250" |
Who is the second performer in episode 5? | SELECT performer_2 FROM table_14934885_1 WHERE episode = 5 |
When collingwood played as the away team what did they score? | SELECT away_team AS score FROM table_name_3 WHERE away_team = "collingwood" |
What is the percentage of male characters in the movie "Bride Wars"? | SELECT CAST(COUNT(CASE WHEN T3.gender = 'Male' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T3.gender) FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN gender AS T3 ON T2.gender_id = T3.gender_id WHERE T1.title = 'Bride Wars' |
For the game against the Washington Bullets, what was the final score? | SELECT score FROM table_name_97 WHERE opponent = "washington bullets" |
Please list different customer names with the payment amount of over 50,000. | SELECT DISTINCT T2.customerName FROM payments AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.customerNumber WHERE T1.amount > 50000 |
How much is the processed time of downloading the most popular repository? | SELECT ProcessedTime FROM Repo WHERE Watchers = ( SELECT MAX(Watchers) FROM Repo ) |
What numbered game did they play chicago? | SELECT game FROM table_27755603_11 WHERE team = "Chicago" |
What is the total ATMs with off-site ATMs greater than 3672, and less than 1685 as the number of branches? | SELECT COUNT(total_atms) FROM table_name_32 WHERE off_site_atms > 3672 AND number_of_branches < 1685 |
When was the location 15km NW of Pol-E Khomri, the circumstaances IED and the casualties of 1 WIA? | SELECT date FROM table_name_66 WHERE casualties = "1 wia" AND circumstances = "ied" AND location = "15km nw of pol-e khomri" |
Name the maximum enrollment for st. andrews university | SELECT MAX(enrollment) FROM table_16168849_1 WHERE institution = "St. Andrews University" |
What are the name and results of the battles when the bulgarian commander is not 'Boril' | SELECT name , RESULT FROM battle WHERE bulgarian_commander != 'Boril' |
What is the average gpa of the students enrolled in the course with code ACCT-211? | SELECT avg(T2.stu_gpa) FROM enroll AS T1 JOIN student AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T1.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211' |
Who is the Player born in 1981? | SELECT player FROM table_name_40 WHERE year_born = 1981 |
What was Andorra's total with less than 10 silver and more than 5 bronze? | SELECT SUM(total) FROM table_name_97 WHERE silver < 10 AND nation = "andorra" AND bronze > 5 |
What is the score in the final in the year 1994? | SELECT score_in_the_final FROM table_22834834_2 WHERE year = 1994 |
Name the away team score for home team of university | SELECT away_team AS score FROM table_name_36 WHERE home_team = "university" |
List the film with the highest budget in each genre. | SELECT T3.genre_name, MAX(T1.budget) FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id GROUP BY T3.genre_name |
Can you list the location addresses? | SELECT T1.address FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T2.how_to_get_there = "bus" |
Name the goalies with the most seasons played. State the average time he played for each season. | SELECT T1.firstName, T1.lastName, T2.year, AVG(T2.Min) FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T1.playerID = ( SELECT playerID FROM Goalies GROUP BY playerID ORDER BY COUNT(playerID) DESC LIMIT 1 ) GROUP BY T1.firstName, T1.lastName, T2.year |
And which campus had a fee of 2258 in 1996? | SELECT T1.Campus FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t2.year = 1996 AND T2.CampusFee = 2258 |
Name the type for headquarters principal activites. | SELECT type FROM table_name_53 WHERE principal_activities = "headquarters" |
How many seats had a 41.2% share of votes? | SELECT seats FROM table_name_96 WHERE share_of_votes = "41.2%" |
What was the score of the January 8 game? | SELECT score FROM table_27712702_9 WHERE date = "January 8" |
what about general medicine? | SELECT head FROM department where name = "General Medicine" |
Hello! Can you list the dorm names of the various different dorms? | SELECT dorm_name FROM dorm |
Name the voice actor of the character Calliope in the movie Hercules. | SELECT `voice-actor` FROM `voice-actors` WHERE movie = 'Hercules' AND character = 'Calliope' |
List max of each grade for all letter grades? | SELECT max ( gradepoint ) FROM GRADECONVERSION |
How many races did Cale Yarborough win at an average speed of 88.924 mph? | SELECT COUNT(race_time) FROM table_22648285_1 WHERE driver = "Cale Yarborough" AND average_speed__mph_ = "88.924" |
For the solution of the most 'sw' methods, what is its path? | SELECT DISTINCT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Lang = 'sw' |
What is the total share for an episode with an air date of November 19, 2007? | SELECT SUM(share) FROM table_name_2 WHERE air_date = "november 19, 2007" |
WHAT IS THE 2010 WITH 2012 OF 2R AT MIAMI MASTERS? | SELECT 2010 FROM table_name_93 WHERE 2012 = "2r" AND tournament = "miami masters" |
What was the date of game 4? | SELECT date FROM table_name_92 WHERE game = 4 |
What is the student staff ratio of the university with the highest student staff ratio of all time? | SELECT MAX(student_staff_ratio) FROM university_year WHERE student_staff_ratio = ( SELECT MAX(student_staff_ratio) FROM university_year ) |
Which Home has a Competition of european cup, and a Round of qf? | SELECT home FROM table_name_70 WHERE competition = "european cup" AND round = "qf" |
What are the top 3 artists with the largest number of songs in the language Bangla? | SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = "bangla" GROUP BY T2.artist_name ORDER BY count(*) DESC LIMIT 3 |
How many courses are offered? | select count ( course_id ) from course |
List the software platform shared by the greatest number of devices. | SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1 |
Give the student's ID of students with 2.5 GPA and enrolled in C for Programmers. | SELECT T2.student_id FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.name = 'C for Programmers' AND T1.gpa = 2.5 |
Where did Test Mission: War Heads and Missile Payload launch when there was a partial failure? | SELECT launch_site FROM table_11869952_3 WHERE mission = "Test mission: war heads and Missile payload" AND results = "Partial Failure" |
One player, okay was the season 1997? | SELECT season FROM match_season where College = 'UNLV' |
Among all publications containing keywords 'Turbulent Fluids', what percentage of them was published in the journal named 'Physics of Fluids'? | SELECT CAST(SUM(CASE WHEN T1.Keyword = 'Turbulent Fluids' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.FullName = 'Physics of Fluids' THEN 1 ELSE 0 END) FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id |
Which Goals have Apps smaller than 1? | SELECT AVG(goals) FROM table_name_41 WHERE apps < 1 |
list out the customers name | select customer_name from customers |
Give the different locations of tracks. | SELECT DISTINCT LOCATION FROM track |
What is the lowest rank for a nation with 29 total medals, over 5 silvers, and under 16 bronze? | SELECT MIN(rank) FROM table_name_71 WHERE silver > 5 AND total = 29 AND bronze < 16 |
What is the winning score of standard register ping tournament, which has Kelly Robbins as the runner-up? | SELECT winning_score FROM table_name_46 WHERE tournament = "standard register ping" AND runner_s__up = "kelly robbins" |
Accumulate the budget of the movie titles with the keyword of "video game". | SELECT SUM(T1.budget) FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id INNER JOIN keyword AS T3 ON T2.keyword_id = T3.keyword_id WHERE T3.keyword_name = 'video game' |
Have many engineers that were contacted by each manager? | SELECT count ( T3.first_name ) FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id JOIN Maintenance_Engineers AS T3 ON T2.engineer_id = T3.engineer_id |
What is Local Mission, when Mission is "Mauritius"? | SELECT Local AS mission FROM table_name_8 WHERE mission = "mauritius" |
List all the non-sales employees in ascending order of its business entitty ID. | SELECT FirstName, LastName FROM Person WHERE PersonType = 'EM' ORDER BY BusinessEntityID |
List the venues of debates in ascending order of the number of audience. | SELECT Venue FROM debate ORDER BY Num_of_Audience ASC |
How many of the customer addresses are inactive? | SELECT COUNT(*) FROM customer_address AS T1 INNER JOIN address_status AS T2 ON T1.status_id = T2.status_id WHERE T2.address_status = 'Inactive' |
how many points are there for a Chassis of porsche 718, and a Year smaller than 1964? | SELECT COUNT(points) FROM table_name_34 WHERE chassis = "porsche 718" AND year < 1964 |
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' |
Which party has a first elected number bigger than 1939.0? | SELECT party FROM table_1342233_5 WHERE first_elected > 1939.0 |
List all the cities in Sonoma County. | SELECT city FROM geographic WHERE county = 'sonoma county' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.