sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What are the job titles, and range of salaries for jobs with maximum salary between 12000 and 18000? | SELECT job_title , max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000 |
Which Player has a Score of 67-72-71-75=285? | SELECT player FROM table_name_22 WHERE score = 67 - 72 - 71 - 75 = 285 |
Which County has an IHSAA Class of aaa, and an Enrollment smaller than 799? | SELECT county FROM table_name_68 WHERE ihsaa_class = "aaa" AND enrollment < 799 |
When bush# is 3907, what is Kerry#? | SELECT kerry_number FROM table_1302886_1 WHERE bush_number = 3907 |
Who was the partner for the game on October 20, 2013? | SELECT partner FROM table_name_80 WHERE date = "october 20, 2013" |
Who is the co-presenter of the series Seven (2007)? | SELECT co_presenter FROM table_14345690_15 WHERE series = "Seven (2007)" |
What is the name of the team from Derbyshire county? | SELECT team FROM table_18461635_1 WHERE county = "Derbyshire" |
Calculate the percentage of paragraphs in all chapters of "All's Well That Ends Well". | SELECT CAST(SUM(IIF(T1.Title = 'All''s Well That Ends Well', 1, 0)) AS REAL) * 100 / COUNT(T3.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id |
WHAT IS THE CITY WITH THIRD AS LORI OLSON-JOHNS? | SELECT city FROM table_name_6 WHERE third = "lori olson-johns" |
What is the customer id of Devin Mills. | SELECT DISTINCT t1.customer_id FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = "Devin Mills" |
What was the title for the project which got the biggest donation? | SELECT T1.title FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.donation_total = ( SELECT MAX(donation_total) FROM donations ) |
What is the Game that came out before the year 2009 for the Playstation 3? | SELECT game FROM table_name_39 WHERE platform_s_ = "playstation 3" AND year < 2009 |
What are the students ids of students who have more than one allergy? | SELECT StuID FROM Has_allergy GROUP BY StuID HAVING count(*) >= 2 |
What is that person's first name? | SELECT first_name FROM employees where last_name like 'J%' |
What are the department ids for which more than 10 employees had a commission? | SELECT department_id FROM employees GROUP BY department_id HAVING COUNT(commission_pct) > 10 |
What is the 2012 population of Indonesia? | SELECT population_2012_ FROM table_28741_1 WHERE country = "Indonesia" |
What is the Result of the game on September 1, 1996? | SELECT result FROM table_name_56 WHERE date = "september 1, 1996" |
How many hours per week did David Shieber play? | Do you mean the total hours per week did David Shieber play? (He can play different sports) | Yes, total hours | SELECT sum ( hoursperweek ) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.Fname = "David" AND T2.Lname = "Shieber" |
What are the names and years released for the movies with the top 3 highest ratings? | SELECT T2.title , T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID ORDER BY T1.stars DESC LIMIT 3 |
Which claim incurred the most number of settlements? List the claim id, the date the claim was made, and the number. | SELECT T1.claim_id , T1.date_claim_made , count(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id ORDER BY count(*) DESC LIMIT 1 |
Among the elite users of 10 consecutive year from 2005 to 2014, list down the user ID and their number of compliment on photos. | SELECT T2.user_id, T2.number_of_compliments FROM Compliments AS T1 INNER JOIN Users_Compliments AS T2 ON T1.compliment_id = T2.compliment_id INNER JOIN Elite AS T3 ON T2.user_id = T3.user_id WHERE T3.year_id BETWEEN 2005 AND 2014 AND T1.compliment_type = 'photos' |
João Barbosa was the winner of which event? | SELECT event FROM table_name_93 WHERE winner = "joão barbosa" |
How many Starts that have Cuts made of 2, Top 25 larger than 0, and Earnings ($) smaller than 338,067? | SELECT COUNT(starts) FROM table_name_66 WHERE cuts_made = 2 AND top_25 > 0 AND earnings__$_ < 338 OFFSET 067 |
What displacement has a model of 2000? | SELECT displacement FROM table_name_78 WHERE model = "2000" |
How many total show when silver is 0, bronze is 1, and the rank is less than 3? | SELECT COUNT(total) FROM table_name_73 WHERE silver = 0 AND bronze = 1 AND rank < 3 |
What is the average GPA of all students enrolled in the course that has the 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' |
List the weight of the body builders who have snatch score higher than 140 or have the height greater than 200. | SELECT T2.weight FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T1.snatch > 140 OR T2.height > 200; |
what is the minimum points with goals for/against being 8-5 | SELECT MIN(points) FROM table_14181578_1 WHERE goals_for_against = "8-5" |
Please give the description of the movie starring JENNIFER DAVIS. | SELECT T3.description FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T3.film_id = T2.film_id WHERE T1.first_name = 'JOHNNY' AND T1.last_name = 'DAVIS' |
What's the first elected year of the district whose incumbent is Jim Greenwood? | SELECT MAX(first_elected) FROM table_1341423_38 WHERE incumbent = "Jim Greenwood" |
Give the names of people who did not participate in the candidate election. | SELECT name FROM people WHERE people_id NOT IN (SELECT people_id FROM candidate) |
How tall is Maksim Botin? | SELECT height FROM table_14038363_1 WHERE player = "Maksim Botin" |
What's Emma H Harris's Business Entity ID number? | SELECT BusinessEntityID FROM Person WHERE FirstName = 'Emma' AND LastName = 'Harris' |
What kind of decor has the least number of reservations? | SELECT T2.decor FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T2.decor ORDER BY count(T2.decor) ASC LIMIT 1; |
What are the details for statements with the details 'Private Project', and what are the names of the corresponding documents? | SELECT T1.statement_details , T2.document_name FROM Statements AS T1 JOIN Documents AS T2 ON T1.statement_id = T2.document_id WHERE T1.statement_details = 'Private Project' |
What are the full names of the 3 instructors who teach the most courses? | SELECT T2.Fname , T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID GROUP BY T1.Instructor ORDER BY count(*) DESC LIMIT 3 |
Give the number of students living in either HKG or CHI. | SELECT count(*) FROM Student WHERE city_code = "HKG" OR city_code = "CHI" |
Who were the co-drivers for the Racing Organisation Course team in years before 2011, who had a position of DNF? | SELECT co_drivers FROM table_name_92 WHERE pos = "dnf" AND year < 2011 AND team = "racing organisation course" |
How many papers were published in International Workshop on Inductive Logic Programming from 2001 to 2009? | SELECT COUNT(T1.Id) FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.FullName = 'International Workshop on Inductive Logic Programming' AND T1.Year BETWEEN 2001 AND 2009 |
What district did George Miller belong to? | SELECT district FROM table_19753079_8 WHERE incumbent = "George Miller" |
Name the less for opponent of @cle and record of 67-29 | SELECT loss FROM table_name_44 WHERE opponent = "@cle" AND record = "67-29" |
What are the full names of faculty members who are a part of department 520? | SELECT T1.Fname , T1.Lname FROM FACULTY AS T1 JOIN MEMBER_OF AS T2 ON T1.FacID = T2.FacID WHERE T2.DNO = 520 |
What is the total amount of grants given by each organisations? Also list the organisation id. | SELECT sum(grant_amount) , organisation_id FROM Grants GROUP BY organisation_id |
Provide all rivers name and length in USA. | SELECT DISTINCT T3.Name, T3.Length FROM city AS T1 INNER JOIN located AS T2 ON T1.Name = T2.City INNER JOIN river AS T3 ON T3.Name = T2.River WHERE T2.Country = 'USA' |
Please list the assumed name of all the facilities inspected by Joshua Rosa. | SELECT DISTINCT T3.dba_name FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id INNER JOIN establishment AS T3 ON T2.license_no = T3.license_no WHERE T1.first_name = 'Joshua' AND T1.last_name = 'Rosa' |
Can you add in their customer IDs to the table please? | SELECT T1.name , T2.custid FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T2.balance DESC LIMIT 3 |
What is the land area of Switzerland with a population density fewer than 188 km²? | SELECT AVG(land_area__km²_) FROM table_name_98 WHERE country = "switzerland" AND population_density__pop_per_km²_ < 188 |
What Opponent has a Results¹ of 1:3? | SELECT opponent FROM table_name_28 WHERE results¹ = "1:3" |
Show the flight number of flights with three lowest distances. | SELECT flno FROM Flight ORDER BY distance ASC LIMIT 3 |
Who is the Winning Driver that has a Winning team of Engstler Motorsport Engstler Motorsport and also the Date 22 July? | SELECT winning_driver FROM table_name_55 WHERE winning_team = "engstler motorsport engstler motorsport" AND date = "22 july" |
Who was the visiting team in the game sometime after number 29 that had 18,584 atttendees? | SELECT visitor FROM table_name_28 WHERE game > 29 AND attendance > 18 OFFSET 584 |
for the tournament of world amateur championship what was the result in 2010? | SELECT result FROM table_name_81 WHERE year = 2010 AND tournament = "world amateur championship" |
What is the high school of the player number 5? | SELECT high_school FROM table_24055352_1 WHERE number = 5 |
What are all the Riders whose best-conditioned horse is Basia? | SELECT rider_names FROM table_27833186_1 WHERE best_conditioned_horse = "Basia" |
What are the locations where the year of election is 1980? | SELECT district FROM table_1341568_24 WHERE elected = 1980 |
What was the original title of the film directed by Lene Grønlykke and Sven Grønlykke? | SELECT original_title FROM table_name_72 WHERE director = "lene grønlykke and sven grønlykke" |
What are the task details, task id and project id for the projects which are detailed as 'omnis' or have more than 2 outcomes? | SELECT T1.task_details, T1.task_id, T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'omnis' UNION SELECT T1.task_details, T1.task_id, T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.project_id HAVING COUNT(*) > 2 |
How many players have won at least 5 man of the match awards? | SELECT COUNT(Match_Id) FROM `Match` GROUP BY Man_of_the_Match HAVING COUNT(Match_Id) >= 5 |
For a Lost of 10 and a Try Bonus of 4, what are the points against them? | SELECT points_against FROM table_name_54 WHERE try_bonus = "4" AND lost = "10" |
Return the weights of entrepreneurs, ordered descending by amount of money requested. | SELECT T2.Weight FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested DESC |
Please list all release titles whose tag is jazz in 2005. | SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupYear = 2005 AND T2.tag LIKE 'jazz' |
Name the most pick for evgeny korolev | SELECT MAX(pick) FROM table_2840500_8 WHERE player = "Evgeny Korolev" |
How many inspections with critical food safety problems are under inspection point id 3? | SELECT COUNT(inspection_id) FROM violation WHERE point_id = 3 AND fine = 500 |
What college or club team did Steve Jones play for? | SELECT college_junior_club_team__league_ FROM table_name_48 WHERE player = "steve jones" |
Which are made before 1980? | SELECT title FROM Movie WHERE YEAR < 1980 |
List the order id, customer id for orders in Cancelled status, ordered by their order dates. | SELECT order_id, customer_id FROM customer_orders WHERE order_status_code = "Cancelled" ORDER BY order_date |
What party was Lane Evans? | SELECT party FROM table_1341568_14 WHERE incumbent = "Lane Evans" |
What is the attendance for the date of 11/11/01? | SELECT attendance FROM table_name_19 WHERE date = "11/11/01" |
Can you please list the 'building id', 'apartment type code' and 'apartment number' for all apartment IDs with more than 4 bedrooms? | select building_id,apt_type_code,apt_number from Apartments where bedroom_count > 4 |
Name the least attendance for 52-37 record | SELECT MIN(attendance) FROM table_name_53 WHERE record = "52-37" |
Provide the customers' names who ordered the Fantasmas. | SELECT T4.first_name, T4.last_name FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id INNER JOIN cust_order AS T3 ON T3.order_id = T2.order_id INNER JOIN customer AS T4 ON T4.customer_id = T3.customer_id WHERE T1.title = 'Fantasmas' |
How many house mascots are associated with yellow house colours? | SELECT COUNT(house_mascot) FROM table_1942683_1 WHERE house_colour = "Yellow" |
Find the name of persons who are friends with Alice for the shortest years. | SELECT name FROM PersonFriend WHERE friend = 'Alice' AND YEAR = (SELECT MIN(YEAR) FROM PersonFriend WHERE friend = 'Alice') |
Which paper published by the "TUBERCLE LUNG DIS" journal is the oldest? | SELECT T2.Title FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.ShortName = 'TUBERCLE LUNG DIS' ORDER BY T2.Year ASC LIMIT 1 |
How many married male employees were born before the year 1960? | SELECT COUNT(BusinessEntityID) FROM Employee WHERE MaritalStatus = 'M' AND STRFTIME('%Y', BirthDate) < '1960' AND Gender = 'M' |
What is the code for Saint-Damien in Matawinie with a type p? | SELECT AVG(code) FROM table_name_35 WHERE regional_county_municipality = "matawinie" AND type = "p" AND name = "saint-damien" |
What FC Match was played in Darlington? | SELECT fc_matches FROM table_name_52 WHERE location = "darlington" |
What is the location of the match against Martinis Knyzelis? | SELECT location FROM table_name_75 WHERE opponent = "martinis knyzelis" |
What is the methyl red reading for the species that tests positive for indole? | SELECT methyl_red FROM table_name_98 WHERE indole = "positive" |
Hi. How many different clubs are there in total? | select count ( * ) from club |
How many opponents fought on 1982-12-03? | SELECT COUNT(opponent) FROM table_12206918_2 WHERE date = "1982-12-03" |
What is the lowest and highest rating star? | SELECT max(stars) , min(stars) FROM Rating |
Show the nicknames of schools that are not in division 1. | SELECT Nickname FROM school_details WHERE Division != "Division 1"; |
What were the locations of the events on 8th May, 2016? | SELECT longitude, latitude FROM `events` WHERE SUBSTR(`timestamp`, 1, 10) = '2016-05-08' |
What was the score of the game that took place on october 22, 1976? | SELECT score FROM table_name_53 WHERE date = "october 22, 1976" |
What is the weight of the player with the longest time on ice in the player’s first 7 years of NHL career in kilograms? | SELECT T2.weight_in_kg FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T1.sum_7yr_TOI = ( SELECT MAX(t.sum_7yr_TOI) FROM PlayerInfo t ) |
What is the nationality when Claude Periard is the player? | SELECT nationality FROM table_name_33 WHERE player = "claude periard" |
What is the smallest rank for an industry of banking, a company of bank of america, and profits (billion $) larger than 16.47? | SELECT MIN(rank) FROM table_name_36 WHERE industry = "banking" AND company = "bank of america" AND profits__billion_$_ > 16.47 |
For team who has more home won than home lost more than 80%, list the team name and the offense points. | SELECT name, o_pts FROM teams WHERE CAST((homeWon - homeLost) AS REAL) * 100 / games > 80 |
Find the average age and experience working length of journalists working on different role type. | SELECT avg(t1.age) , avg(Years_working) , t2.work_type FROM journalist AS t1 JOIN news_report AS t2 ON t1.journalist_id = t2.journalist_id GROUP BY t2.work_type |
Show all flight number from Los Angeles. | SELECT flno FROM Flight WHERE origin = "Los Angeles" |
list all the amounts claimed | SELECT Amount_Claimed FROM Claims |
Which Byes have an Against larger than 1235, and Losses smaller than 10, and Wins larger than 7? | SELECT MAX(byes) FROM table_name_87 WHERE against > 1235 AND losses < 10 AND wins > 7 |
How many total tours were there for each ranking date? | SELECT sum(tours) , ranking_date FROM rankings GROUP BY ranking_date |
What are the names of all students who successfully tried out for the position of striker? | SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker' |
what is the song name of bangladesh | SELECT song_name from song where country = 'Bangladesh' |
Name the indianapolis concerts for les minski | SELECT indianapolis_concerts FROM table_17085724_1 WHERE sarasota = "Les Minski" |
Which competition took place in Bangkok? | SELECT competition FROM table_name_94 WHERE venue = "bangkok" |
What To par has a Score of 68-66=134? | SELECT to_par FROM table_name_15 WHERE score = 68 - 66 = 134 |
How many students are age 18? | SELECT COUNT(*) FROM Student WHERE age = 18 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.