text2SQL
stringlengths
192
7.27k
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the distinct director of films with market estimation in the year of 1995.### Response: SELECT DISTINCT T1.Director FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Fi...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the customer last name, id and phone number with most number of orders?### Response: SELECT T2.customer_last_name , T1.customer_id , T2.phone_number FROM Orders AS T1 JOIN Customers AS...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the total home game attendance of team Boston Red Stockings from 2000 to 2010?### Response: SELECT sum(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: List the names and birthdays of the top five players in terms of potential.### Response: SELECT DISTINCT T1.player_name , T1.birthday FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the location with most number of train stations.### Response: SELECT LOCATION FROM station GROUP BY LOCATION 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 number of products with category "Spices" and typically sold above 1000.### Response: SELECT count(*) FROM products WHERE product_category_code = "Spices" AND typical_buying_price > ...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the name and email of the user whose name contains the word ‘Swift’.### Response: SELECT name , email FROM user_profiles WHERE name LIKE '%Swift%'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the name of buildings that do not have any institution.### Response: SELECT name FROM building WHERE building_id NOT IN (SELECT building_id FROM institution).
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000.### Response: SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count > 100 OR amo...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the names of users who did not leave any review.### Response: SELECT name FROM useracct WHERE u_id NOT IN (SELECT u_id FROM review).
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find all members of "Bootup Baltimore" whose major is "600". Show the first name and last name.### Response: SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid =...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the name of the body builder with the greatest body weight?### Response: SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the id and number of shops for the company that produces the most expensive furniture.### Response: SELECT t1.manufacturer_id , t1.num_of_shops FROM manufacturer AS t1 JOIN furniture_manuf...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the language that was used most often in songs with resolution above 500?### Response: SELECT artist_name FROM song WHERE resolution > 500 GROUP BY languages ORDER BY count(*) DESC LIM...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the payment method that is used most frequently.### Response: SELECT payment_method FROM Customers GROUP BY payment_method 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 location codes with at least 3 documents.### Response: SELECT location_code FROM Document_locations GROUP BY location_code HAVING count(*) >= 3.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the film title and inventory id of the item in the inventory which was rented most frequently?### Response: SELECT T1.title , T2.inventory_id FROM film AS T1 JOIN inventory AS T2 ON T1....
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the names of the buildings that have more than one company offices.### Response: SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies A...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the customer name, customer address city, date from, and date to for each customer address history.### Response: SELECT T2.customer_name , T3.city , T1.date_from , T1.date_to FROM custom...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the distinct names of wines produced before the year of 2000 or after the year of 2010.### Response: SELECT DISTINCT Name FROM WINE WHERE YEAR < 2000 OR YEAR > 2010.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: For each grade 0 classroom, report the total number of students.### Response: SELECT classroom , count(*) FROM list WHERE grade = "0" GROUP BY classroom.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show all game names played by Linda Smith### Response: SELECT Gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid JOIN Student AS T3 ON T3.Stuid = T1.Stuid WHERE T3....
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the name of the tourist attraction that is associated with the photo "game1"?### Response: SELECT T2.Name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = ...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: List the names of people that are not employed by any company### Response: SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM employment).
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the last names of teachers who are not involved in any detention.### Response: SELECT last_name FROM Teachers EXCEPT SELECT T1.last_name FROM Teachers AS T1 JOIN Detention AS T2 ON T1.teach...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the states where have some college students in tryout and their decisions are yes.### Response: SELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE ...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Which countries have at least 3 cities?### Response: SELECT T2.country FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id GROUP BY T2.country_id HAVING count(*) >= 3.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: which pilot is in charge of the most number of flights?### Response: SELECT pilot FROM flight GROUP BY pilot 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 distinct position of players from college UCLA or Duke.### Response: SELECT DISTINCT POSITION FROM match_season WHERE College = "UCLA" OR College = "Duke".
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are the average and minimum price (in Euro) of all products?### Response: SELECT avg(price_in_euros) , min(price_in_euros) FROM catalog_contents.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are the minimum and maximum crime rate of counties?### Response: SELECT min(Crime_rate) , max(Crime_rate) FROM county_public_safety.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Which city has the most addresses? List the city name, number of addresses, and city id.### Response: SELECT T2.city , count(*) , T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id =...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the name for regions and the number of storms for each region.### Response: SELECT T1.region_name , count(*) FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GRO...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the country where people older than 30 and younger than 25 are from.### Response: SELECT country FROM people WHERE age < 25 INTERSECT SELECT country FROM people WHERE age > 30.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is average salary of the players in the team named 'Boston Red Stockings' ?### Response: SELECT avg(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.nam...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are the highest and lowest prices of products, grouped by and alphabetically ordered by product type?### Response: SELECT max(product_price) , min(product_price) , product_type_code FROM ...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the name of each user and number of tweets tweeted by each of them.### Response: SELECT T1.name , count(*) FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the total amount of products ordered before 2018-03-17 07:13:53.### Response: SELECT sum(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id ...
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 and make the result set in ascending order ...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are the phone numbers of all customers and suppliers.### Response: SELECT customer_phone FROM customers UNION SELECT supplier_phone FROM suppliers.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Please show the names of aircrafts associated with airport with name "London Gatwick".### Response: SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Ai...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the name of the ship with the largest tonnage?### Response: SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the denomination shared by schools founded before 1890 and schools founded after 1900### Response: SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM ...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the state of the college which player Charles is attending.### Response: SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName JOIN player AS T3 ON T2.pID = T3.pID...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the number of different departments in each school whose number of different departments is less than 5.### Response: SELECT count(DISTINCT dept_name) , school_code FROM department GROUP B...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: List the id of students who registered some courses and the number of their registered courses?### Response: SELECT T1.student_id , count(*) FROM students AS T1 JOIN student_course_registration...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the name of the customer that has been involved in the most policies.### Response: SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id G...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: List the software platform shared by the greatest number of devices.### Response: SELECT Software_Platform FROM device GROUP BY Software_Platform 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 average price of wines that are not produced from Sonoma county.### Response: SELECT avg(price) FROM wine WHERE Appelation NOT IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: List the project details of the projects launched by the organisation### Response: SELECT project_details FROM Projects WHERE organisation_id IN ( SELECT organisation_id FROM Projects GROUP BY o...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Return the names of songs for which format is mp3 and resolution is below 1000.### Response: SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = "mp3...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the names of all the activities Mark Giuliano participates in.### Response: SELECT T3.activity_name FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN Activ...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the names of people, and dates and venues of debates they are on the affirmative side.### Response: SELECT T3.Name , T2.Date , T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.De...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the host year of city "Taizhou ( Zhejiang )"?### Response: SELECT T2.year FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T1.city = "Taizhou ( Zhejiang )".
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: List the names of the browser that are compatible with both 'CACHEbox' and 'Fasterfox'.### Response: SELECT T3.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the name of the swimmer who has the most records.### Response: SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id GROUP BY t2.swimmer_id ORDER BY count(*) DESC L...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the average age of the students who have allergies with food and animal types.### Response: SELECT avg(age) FROM Student WHERE StuID IN ( SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What were all the salary values of players in 2010 and 2001?### Response: SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the name of the company that produces both furnitures with less than 6 components and furnitures with more than 10 components.### Response: SELECT t3.name FROM furniture AS t1 JOIN furnitur...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the names of procedures which physician John Wen was trained in.### Response: SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS ...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the number of rooms with king bed for each decor type.### Response: SELECT decor , count(*) FROM Rooms WHERE bedType = "King" GROUP BY decor;.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the most popular file format?### Response: SELECT formats FROM files GROUP BY formats ORDER BY COUNT (*) DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: List the countries having more than 4 addresses listed.### Response: SELECT country FROM addresses GROUP BY country HAVING count(address_id) > 4.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: List the name of the colleges whose enrollment is greater 18000 sorted by the college's name.### Response: SELECT cName FROM College WHERE enr > 18000 ORDER BY cName.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the names of the swimmers who have both "win" and "loss" results in the record.### Response: SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = ...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the id and details for the investors who have the top 3 number of transactions.### Response: SELECT T2.investor_id , T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1....
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: How many captains with younger than 50 are in each rank?### Response: SELECT count(*) , rank FROM captain WHERE age < 50 GROUP BY rank.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: How many trips started from Mountain View city and ended at Palo Alto city?### Response: SELECT count(*) FROM station AS T1 JOIN trip AS T2 JOIN station AS T3 JOIN trip AS T4 ON T1.id = T2.sta...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: List all female students age is older than 18 who is not majoring in 600. List students' first name and last name.### Response: SELECT Fname , Lname FROM Student WHERE Age > 18 AND Major != 60...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the most common interaction type between enzymes and medicine? And how many are there?### Response: SELECT interaction_type , count(*) FROM medicine_enzyme_interaction GROUP BY interact...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show storm name with at least two regions and 10 cities affected.### Response: SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVI...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the number of airports whose name contain the word 'International'.### Response: SELECT count(*) FROM airports WHERE name LIKE '%International%'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the number of different airports which are the destinations of the American Airlines.### Response: SELECT count(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.al...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: List the object number of railways that do not have any trains.### Response: SELECT ObjectNumber FROM railway WHERE Railway_ID NOT IN (SELECT Railway_ID FROM train).
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are the names of the songs whose rating is below the rating of all songs in English?### Response: SELECT song_name FROM song WHERE rating < (SELECT min(rating) FROM song WHERE languages ...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: display job title and average salary of employees.### Response: SELECT job_title , AVG(salary) FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id GROUP BY T2.job_title.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: List the organisation id with the maximum outcome count, and the count.### Response: SELECT T1.organisation_id , count(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the pilot positions that have both pilots joining after year 2005 and pilots joining before 2000.### Response: SELECT POSITION FROM pilot WHERE Join_Year < 2000 INTERSECT SELECT POSITION ...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find all first-grade students who are NOT taught by OTHA MOYER. Report their first and last names.### Response: SELECT DISTINCT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: How many distinct kinds of camera lenses are used to take photos of mountains in the country 'Ethiopia'?### Response: SELECT count(DISTINCT T2.camera_lens_id) FROM mountain AS T1 JOIN photos AS ...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the headquarters that have both companies in banking industry and companies in oil and gas industry.### Response: SELECT Headquarters FROM company WHERE Industry = "Banking" INTERSECT SEL...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the first names and offices of all instructors who have taught some course and also find the course description.### Response: SELECT T2.emp_fname , T4.prof_office , T3.crs_description FRO...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the names of all instructors in Comp. Sci. department with salary > 80000.### Response: SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.' AND salary > 80000.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Who made the latest order?### Response: SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.order_date DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: How many schools do not participate in the basketball match?### Response: SELECT count(*) FROM university WHERE school_id NOT IN (SELECT school_id FROM basketball_match).
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the document type code with most number of documents?### Response: SELECT document_type_code FROM Documents GROUP BY document_type_code 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 are the distinct name of the mills built by the architects who have also built a bridge longer than 80 meters?### Response: SELECT DISTINCT T1.name FROM mill AS T1 JOIN architect AS t2 ON T...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the names of people aged either 35 or 36.### Response: SELECT Name FROM people WHERE Age = 35 OR Age = 36.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the names of counties that have at least two delegates.### Response: SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id HAVING...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the name of buildings that do not have any institution.### Response: SELECT name FROM building WHERE building_id NOT IN (SELECT building_id FROM institution).
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: How many lessons taught by staff whose first name has letter 'a' in it?### Response: SELECT count(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE "%a...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Who is the instructor with the highest salary?### Response: SELECT name FROM instructor ORDER BY salary DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the names of rooms that have been reserved for more than 60 times.### Response: SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room HAVING ...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: How many players were in the team Boston Red Stockings in 2000?### Response: SELECT count(*) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stocki...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the primary conference of the school that has the lowest acc percent score in the competition?### Response: SELECT t1.Primary_conference FROM university AS t1 JOIN basketball_match AS t2...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the names of editors of age either 24 or 25.### Response: SELECT Name FROM editor WHERE Age = 24 OR Age = 25.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the most common country across members.### Response: SELECT Country FROM member 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: Find the name of customers who have loans of both Mortgages and Auto.### Response: SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE loan_type = 'Mortg...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are the first and last name for those employees who works either in department 70 or 90?### Response: SELECT first_name , last_name FROM employees WHERE department_id = 70 OR department_...
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: With which kind of payment method were the least number of payments processed?### Response: SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY count(*) ASC LIMIT 1.