text2SQL
stringlengths
192
7.27k
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the founder of the company whose name begins with the letter 'S'.### Response: SELECT founder FROM manufacturers WHERE name LIKE 'S%'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are the album titles for albums containing both 'Reggae' and 'Rock' genre tracks?### Response: SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Which university is in Los Angeles county and opened after 1950?### Response: SELECT campus FROM campuses WHERE county = "Los Angeles" AND YEAR > 1950.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are the names of races that were held after 2017 and the circuits were in the country of Spain?### Response: SELECT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuit...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the id of the department with the least number of staff?### Response: SELECT department_id FROM staff_department_assignments GROUP BY department_id ORDER BY count(*) LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are the famous title of the artists associated with volumes with more than 2 weeks on top?### Response: SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Art...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the names of editors that are on at least two journal committees.### Response: SELECT T1.Name FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.Nam...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Which countries have more than two members?### Response: SELECT Country FROM member GROUP BY Country HAVING COUNT(*) > 2.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are the monthly rentals of student addresses in Texas state?### Response: SELECT T2.monthly_rental FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id WHERE...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: display the employee number, name( first name and last name ), and salary for all employees who earn more than the average salary and who work in a department with any employee with a 'J' in the...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the customer ids and firstname without a credit card.### Response: SELECT customer_id , customer_first_name FROM Customers EXCEPT SELECT T1.customer_id , T2.customer_first_name FROM Custo...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the studios that have not produced films with director "Walter Hill".### Response: SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director = "Walter Hill".
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: List the names and decor of rooms that have a king bed. Sort the list by their price.### Response: SELECT roomName , decor FROM Rooms WHERE bedtype = 'King' ORDER BY basePrice;.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: List the name of the pilots who have flied for both a company that mainly provide 'Cargo' services and a company that runs 'Catering services' activities.### Response: SELECT T2.pilot FROM opera...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the ids of the students who don't participate in any activity.### Response: SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are the first names of customers who have not rented any films after '2005-08-23 02:06:01'?### Response: SELECT first_name FROM customer WHERE customer_id NOT IN( SELECT customer_id FROM re...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show institution types, along with the number of institutions and total enrollment for each type.### Response: SELECT TYPE , count(*) , sum(enrollment) FROM institution GROUP BY TYPE.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is average and maximum salary of all employees.### Response: SELECT avg(salary) , max(salary) FROM Employee.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the names of the artists who have produced English songs but have never received rating higher than 8.### Response: SELECT DISTINCT artist_name FROM song WHERE languages = "english" EXCEP...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: List the camera lens names containing substring "Digital".### Response: SELECT name FROM camera_lens WHERE name LIKE "%Digital%".
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the name of the person who has friends with age above 40 and under age 30?### Response: SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (S...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the location of the bridge named 'Kolob Arch' or 'Rainbow Bridge'?### Response: SELECT LOCATION FROM bridge WHERE name = 'Kolob Arch' OR name = 'Rainbow Bridge'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: How many faculty lines are there in the university that conferred the most number of degrees in year 2002?### Response: SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.c...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: How many films have the word 'Dummy' in their titles?### Response: SELECT count(*) FROM film WHERE title LIKE "%Dummy%".
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the student ID and personal name of the student with at least two enrollments.### Response: SELECT T1.student_id , T2.personal_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the first name and last name of the student who have most number of sports?### Response: SELECT T2.Fname , T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID GRO...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are the names and opening hours of the tourist attractions that can be accessed by bus or walk?### Response: SELECT Name , Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = ...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are the first and last names of the instructors who teach the top 3 number of courses?### Response: SELECT T2.Fname , T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2....
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Report all majors that have less than 3 students.### Response: SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the first names of professors who are not playing Canoeing or Kayaking.### Response: SELECT lname FROM faculty WHERE rank = 'Professor' EXCEPT SELECT DISTINCT T1.lname FROM Faculty AS T1 ...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the role description and the id of the project staff involved in most number of project outcomes?### Response: SELECT T1.role_description , T2.staff_id FROM Staff_Roles AS T1 JOIN Project_...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are the total scores of the body builders whose birthday contains the string "January" ?### Response: SELECT T1.total FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the minimum, maximum, and average age for all people.### Response: SELECT min(age) , max(age) , avg(age) FROM people.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the number of routes with destination airports in Italy.### Response: SELECT count(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid WHERE T2.country = 'Italy'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are first and last names of players participating in all star game in 1998?### Response: SELECT name_first , name_last FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_i...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the average duration in milliseconds of tracks that belong to Latin or Pop genre?### Response: SELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHE...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Who are the friends of Bob?### Response: SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Bob'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the name and salary of instructors whose salary is below the average salary of the instructors in the Physics department.### Response: SELECT name , salary FROM instructor WHERE salary < ...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the common login name of course authors and students.### Response: SELECT login_name FROM Course_Authors_and_Tutors INTERSECT SELECT login_name FROM Students.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Of all players with an overall rating greater than 80, how many are right-footed and left-footed?### Response: SELECT preferred_foot , count(*) FROM Player_Attributes WHERE overall_rating > 8...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the origins from which more than 1 train starts.### Response: SELECT origin FROM train GROUP BY origin HAVING count(*) > 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the name of physicians who are affiliated with Surgery or Psychiatry department.### Response: SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physicia...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Which countries has the most number of airlines whose active status is 'Y'?### Response: SELECT country FROM airlines WHERE active = 'Y' GROUP BY country ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Which delegates are from counties with population smaller than 100000?### Response: SELECT T2.Delegate FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population ...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are the ids of songs that are available in either mp4 format or have resolution above 720?### Response: SELECT f_id FROM files WHERE formats = "mp4" UNION SELECT f_id FROM song WHERE reso...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the cities which have exactly two airports.### Response: SELECT city FROM airports GROUP BY city HAVING count(*) = 2.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: How many home games did the team Boston Red Stockings play from 1990 to 2000 in total?### Response: SELECT sum(T1.games) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE ...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the year and semester when offers the largest number of courses.### Response: SELECT semester , YEAR FROM SECTION GROUP BY semester , YEAR ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the name of the ships that are steered by both a captain with Midshipman rank and a captain with Lieutenant rank.### Response: SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_i...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: How many colors are never used by any product?### Response: SELECT count(*) FROM Ref_colors WHERE color_code NOT IN ( SELECT color_code FROM products ).
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the membership card held by both members living in Hartford and ones living in Waterbury address?### Response: SELECT membership_card FROM member WHERE address = 'Hartford' INTERSECT S...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show all advisors who have at least two students.### Response: SELECT advisor FROM Student GROUP BY advisor HAVING count(*) >= 2.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the number of audience in year 2008 or 2010.### Response: SELECT Num_of_Audience FROM festival_detail WHERE YEAR = 2008 OR YEAR = 2010.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the age of the friend of Zach with longest year relationship?### Response: SELECT T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Zach' AND T2...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the name, enrollment of the colleges whose size is bigger than 10000 and location is in state LA.### Response: SELECT cName , enr FROM College WHERE enr > 10000 AND state = "LA".
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the product name and total order quantity for each product.### Response: SELECT T1.product_name , sum(T2.order_quantity) FROM products AS T1 JOIN order_items AS T2 ON T1.product_id = T2....
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the number of routes operated by American Airlines.### Response: SELECT count(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the name of the customer who has the most orders?### Response: SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the name of the building that has the most company offices.### Response: SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON ...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the duration of the oldest actor?### Response: SELECT Duration FROM actor ORDER BY Age DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the name of cities in the county that has the largest number of police officers.### Response: SELECT name FROM city WHERE county_ID = (SELECT county_ID FROM county_public_safety ORDER BY ...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the party that has the most people.### Response: SELECT Party FROM people GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the name of the player with the largest number of votes?### Response: SELECT Player_name FROM player ORDER BY Votes DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are the drivers' last names and id who had 11 pit stops and participated in more than 5 race results?### Response: SELECT T1.surname , T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: How many customers does Steve Johnson support?### Response: SELECT count(*) FROM employees AS T1 JOIN customers AS T2 ON T2.support_rep_id = T1.id WHERE T1.first_name = "Steve" AND T1.last_name ...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are the monthly rentals of student addresses in Texas state?### Response: SELECT T2.monthly_rental FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id WHERE...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the name of tracks which are in both Movies and music playlists.### Response: SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are the highest cost, lowest cost and average cost of procedures?### Response: SELECT MAX(cost) , MIN(cost) , AVG(cost) FROM procedures.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the last name of the latest contact individual of the organization "Labour Party".### Response: SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the average number of followers for the users who had some tweets.### Response: SELECT avg(followers) FROM user_profiles WHERE UID IN (SELECT UID FROM tweets).
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the name of airline which runs the most number of routes.### Response: SELECT T1.name FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.name ORDER BY count(*) DESC LI...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are the names and descriptions of the photos taken at the tourist attraction "film festival"?### Response: SELECT T1.Name , T1.Description FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are the ids and names of the web accelerators that are compatible with two or more browsers?### Response: SELECT T1.id , T1.Name FROM web_client_accelerator AS T1 JOIN accelerator_compatib...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Which catalog publisher has published the most catalogs?### Response: SELECT catalog_publisher FROM catalogs GROUP BY catalog_publisher ORDER BY count(*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the headquarters shared by more than two companies.### Response: SELECT Headquarters FROM Companies GROUP BY Headquarters HAVING COUNT(*) > 2.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the names of people and the number of times they have been on the affirmative side of debates.### Response: SELECT T2.Name , COUNT(*) FROM debate_people AS T1 JOIN people AS T2 ON T1.Affir...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Which organisation type hires most research staff?### Response: SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are the different pilot names who had piloted a flight in the country 'United States' or in the airport named 'Billund Airport'?### Response: SELECT DISTINCT T2.pilot FROM airport AS T1 JOI...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the id of the candidate who got the lowest oppose rate.### Response: SELECT Candidate_ID FROM candidate ORDER BY oppose_rate LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the name of the institution that "Matthias Blume" belongs to?### Response: SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON ...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the total amount claimed in the most recently created document.### Response: SELECT sum(t1.amount_claimed) FROM claim_headers AS t1 JOIN claims_documents AS t2 ON t1.claim_header_id = t2....
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the name of companies whose revenue is smaller than the revenue of all companies based in Austin.### Response: SELECT name FROM manufacturers WHERE revenue < (SELECT min(revenue) FROM man...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the nominees that have nominated musicals for both "Tony Award" and "Drama Desk Award".### Response: SELECT Nominee FROM musical WHERE Award = "Tony Award" INTERSECT SELECT Nominee FROM m...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: How many Professors are in building NEB?### Response: SELECT count(*) FROM Faculty WHERE Rank = "Professor" AND building = "NEB".
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Which film actors (actresses) played a role in more than 30 films? List his or her first name and last name.### Response: SELECT T2.first_name , T2.last_name FROM film_actor AS T1 JOIN actor AS...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the name of ships whose nationality is either United States or United Kingdom.### Response: SELECT Name FROM ship WHERE Nationality = "United States" OR Nationality = "United Kingdom".
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Which skill is used in fixing the most number of faults? List the skill id and description.### Response: SELECT T1.skill_id , T1.skill_description FROM Skills AS T1 JOIN Skills_Required_To_Fix ...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: List the locations of schools that do not have any player.### Response: SELECT LOCATION FROM school WHERE School_ID NOT IN (SELECT School_ID FROM Player).
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the name and id of the good with the highest average rank.### Response: SELECT T1.title , T1.i_id FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id ORDER BY avg(T2....
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the names of all instructors whose name includes the substring “dar”.### Response: SELECT name FROM instructor WHERE name LIKE '%dar%'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: find the highest support percentage, lowest consider rate and oppose rate of all candidates.### Response: SELECT max(support_rate) , min(consider_rate) , min(oppose_rate) FROM candidate.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the average age of students who are living in the dorm with the largest capacity.### Response: SELECT avg(T1.age) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm A...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the total salary paid by team Boston Red Stockings in 2010?### Response: SELECT sum(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston ...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: List the name, nationality and id of all male architects ordered by their names lexicographically.### Response: SELECT name , nationality , id FROM architect WHERE gender = 'male' ORDER BY n...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: display the full name (first and last), hire date, salary, and department number for those employees whose first name does not containing the letter M.### Response: SELECT first_name , last_nam...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are the ids and names of the web accelerators that are compatible with two or more browsers?### Response: SELECT T1.id , T1.Name FROM web_client_accelerator AS T1 JOIN accelerator_compatib...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the names of customers who have no policies associated.### Response: SELECT customer_details FROM customers EXCEPT SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1....
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: what is the GDP of the city with the largest population.### Response: SELECT gdp FROM city ORDER BY Regional_Population DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the names and genders of players with a coach starting after 2011.### Response: SELECT T3.Player_name , T3.gender FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JO...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the id of the department with the least number of staff?### Response: SELECT department_id FROM staff_department_assignments GROUP BY department_id ORDER BY count(*) LIMIT 1.