text2SQL stringlengths 192 7.27k |
|---|
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: In which season and which stadium did any player have an injury of 'Foot injury' or 'Knee problem'?### Response: SELECT T1.season , T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id ... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the distinct last names of all the students who have president votes and whose advisor is 8741.### Response: SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are the distinct cross reference source system codes which are related to the master customer details 'Gottlieb, Becker and Wyman'?### Response: SELECT DISTINCT T2.source_system_code FROM c... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the maximum, minimum and average market share of the listed browsers?### Response: SELECT max(market_share) , min(market_share) , avg(market_share) FROM browser. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: List the main industry with highest total market value and its number of companies.### Response: SELECT main_industry , count(*) FROM company GROUP BY main_industry ORDER BY sum(market_value) D... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find out 5 customers who most recently purchased something. List customers' first and last name.### Response: SELECT T1.first_name , T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Give me a list of descriptions of the problems that are reported by the staff whose first name is Christop.### Response: SELECT T1.problem_description FROM problems AS T1 JOIN staff AS T2 ON T1.... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the name of department has the highest amount of students?### Response: SELECT dept_name FROM student GROUP BY dept_name 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 title of albums have the number of tracks greater than 10.### Response: SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id HAVING count(T1.id) > 10;... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the names of the chip models that are not used by any phone with full accreditation type.### Response: SELECT model_name FROM chip_model EXCEPT SELECT chip_model FROM phone WHERE Accreditat... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the name of the most expensive hardware product.### Response: SELECT product_name FROM products WHERE product_type_code = 'Hardware' ORDER BY product_price DESC LIMIT 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show member names without any registered branch.### Response: SELECT name FROM member WHERE member_id NOT IN (SELECT member_id FROM membership_register_branch). |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the names of players and names of their coaches.### Response: SELECT T3.Player_name , T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Which allergy has most number of students affected?### Response: SELECT Allergy FROM Has_allergy GROUP BY Allergy 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 maximum and minimum share count of different transaction types.### Response: SELECT transaction_type_code , max(share_count) , min(share_count) FROM TRANSACTIONS GROUP BY transaction_... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the total revenue of all companies whose main office is at Tokyo or Taiwan?### Response: SELECT sum(revenue) FROM manufacturers WHERE Headquarter = 'Tokyo' OR Headquarter = 'Taiwan'. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are the names of the employees who authorised the destruction and the employees who destroyed the corresponding documents?### Response: SELECT T2.employee_name , T3.employee_name FROM Docu... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Who is the person that has no friend?### Response: SELECT name FROM person EXCEPT SELECT name FROM PersonFriend. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the location and all games score of the school that has Clemson as its team name.### Response: SELECT t2.All_Games , t1.location FROM university AS t1 JOIN basketball_match AS t2 ON t1.sch... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the name of all the cities and states.### Response: SELECT town_city FROM addresses UNION SELECT state_province_county FROM addresses. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Which committees have delegates from both democratic party and liberal party?### Response: SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = ... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the id of instructors who taught a class in Fall 2009 but not in Spring 2010.### Response: SELECT id FROM teaches WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT id FROM teaches W... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the the name of the customers who have a loan with amount more than 3000.### Response: SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE amount > ... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show all locations with only 1 station.### Response: SELECT LOCATION FROM station GROUP BY LOCATION HAVING count(*) = 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the ids of the faculty who don't participate in any activity.### Response: SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Which building does the instructor who teaches the most number of courses live in?### Response: SELECT T2.Building FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID GROUP BY T1.... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Which organisation hired the most number of research staff? List the organisation id, type and detail.### Response: SELECT T1.organisation_id , T1.organisation_type , T1.organisation_details F... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the positions of the players from the team with name "Ryley Goldner".### Response: SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = "Ry... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: How many assets does each third party company supply? List the count and the company id.### Response: SELECT count(*) , T1.company_id FROM Third_Party_Companies AS T1 JOIN Assets AS T2 ON T1.co... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Which kind of policy type was chosen by the most customers?### Response: SELECT Policy_Type_Code FROM Customer_Policies GROUP BY Policy_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: Which major has the most students?### Response: SELECT Major FROM STUDENT GROUP BY major ORDER BY count(*) DESC LIMIT 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: How many documents do not have any expense?### Response: SELECT count(*) FROM Documents WHERE document_id NOT IN ( SELECT document_id FROM Documents_with_expenses ). |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the headquarters that have at least two companies.### Response: SELECT Headquarters FROM company GROUP BY Headquarters HAVING COUNT(*) >= 2. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Which projects have no outcome? List the project details.### Response: SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_outcomes ). |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: list the names of the companies with more than 200 sales in the descending order of sales and profits.### Response: SELECT name FROM company WHERE Sales_in_Billion > 200 ORDER BY Sales_in_Bill... |
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: What is ids of the songs whose resolution is higher than the resolution of any songs with rating lower than 8?### Response: SELECT f_id FROM song WHERE resolution > (SELECT max(resolution) FRO... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the name and gender of the candidate who got the highest support rate.### Response: SELECT t1.name , t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id ORDER BY... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are the account details with the largest value or with value having char '5' in it?### Response: SELECT max(Account_details) FROM Accounts UNION SELECT Account_details FROM Accounts WHERE A... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the names of scientists who are not working on the project with the highest hours.### Response: SELECT name FROM scientists EXCEPT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 O... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the official names of the cities that have hosted more than one competition.### Response: SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the pixels of the screen modes that are used by both phones with full accreditation types and phones with Provisional accreditation types.### Response: SELECT t1.pixels FROM screen_mode AS ... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the number of routes that have destination John F Kennedy International Airport.### Response: SELECT count(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.name ... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the prices of the products named "Dining" or "Trading Policy".### Response: SELECT Product_Price FROM Products WHERE Product_Name = "Dining" OR Product_Name = "Trading Policy". |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Which part fault requires the most number of skills to fix? List part id and name.### Response: SELECT T1.part_id , T1.part_name FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.par... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show names and seatings, ordered by seating for all tracks opened after 2000.### Response: SELECT name , seating FROM track WHERE year_opened > 2000 ORDER BY seating. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Which film actor (actress) starred the most films? List his or her first name, last name and actor id.### Response: SELECT T2.first_name , T2.last_name , T2.actor_id FROM film_actor AS T1 JOIN... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the names of members and the dates of performances they attended in descending order of attendance of the performances.### Response: SELECT T2.Name , T3.Date FROM member_attendance AS T1 J... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the distinct student first names of all students that have grade point at least 3.8 in one course.### Response: SELECT DISTINCT T3.Fname FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JO... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: How many games were played in park "Columbia Park" in 1907?### Response: SELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 1907 AND T2.park_name =... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the subject ID, name of subject and the corresponding number of courses for each subject, and sort by the course count in ascending order.### Response: SELECT T1.subject_id , T2.subject_na... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the police force shared by counties with location on the east and west.### Response: SELECT Police_force FROM county_public_safety WHERE LOCATION = "East" INTERSECT SELECT Police_force FR... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Which district has the largest population?### Response: SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are the shortest duration and lowest rating of songs grouped by genre and ordered by genre?### Response: SELECT min(T1.duration) , min(T2.rating) , T2.genre_is FROM files AS T1 JOIN song ... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the most common mill type, and how many are there?### Response: SELECT TYPE , count(*) FROM mill GROUP BY TYPE 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 theme and artist name for the exhibition with a ticket price higher than the average?### Response: SELECT T1.theme , T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id ... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the names of players and names of their coaches in descending order of the votes of players.### Response: SELECT T3.Player_name , T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON ... |
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: What are the name and id of the team offering the lowest average salary?### Response: SELECT T1.name , T1.team_id FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_i... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show all student IDs with more than total 10 hours per week on all sports played.### Response: SELECT StuID FROM Sportsinfo GROUP BY StuID HAVING sum(hoursperweek) > 10. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show different tourist attractions' names, ids, and the corresponding number of visits.### Response: SELECT T1.Name , T2.Tourist_Attraction_ID , COUNT(*) FROM Tourist_Attractions AS T1 JOIN V... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: How many restaurant is the Sandwich type restaurant?### Response: SELECT count(*) FROM Restaurant JOIN Type_Of_Restaurant ON Restaurant.ResID = Type_Of_Restaurant.ResID JOIN Restaurant_Type ON ... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the names of buildings except for those having an institution founded in 2003.### Response: SELECT name FROM building EXCEPT SELECT T1.name FROM building AS T1 JOIN institution AS T2 ON T1.... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the first names of students whose first names contain letter "a".### Response: SELECT DISTINCT Fname FROM STUDENT WHERE Fname LIKE '%a%'. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: List all tracks bought by customer Daan Peeters.### Response: SELECT T1.name FROM tracks AS T1 JOIN invoice_lines AS T2 ON T1.id = T2.track_id JOIN invoices AS T3 ON T3.id = T2.invoice_id JOIN c... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Which 3 players won the most player awards? List their full name and id.### Response: SELECT T1.name_first , T1.name_last , T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show writers who have published a book with price more than 4000000.### Response: SELECT T1.Writer FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID WHERE T2.Price > 4000000. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are the distinct positions of the players from a country whose capital is Dublin?### Response: SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the number of classes offered for all class rooms that held at least 2 classes.### Response: SELECT count(*) , class_room FROM CLASS GROUP BY class_room HAVING count(*) >= 2. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the title of course that is provided by both Statistics and Psychology departments.### Response: SELECT title FROM course WHERE dept_name = 'Statistics' INTERSECT SELECT title FROM course... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Please list the years of film market estimations when the market is in country "Japan" in descending order.### Response: SELECT T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the teams that have both wrestlers eliminated by "Orton" and wrestlers eliminated by "Benjamin".### Response: SELECT Team FROM Elimination WHERE Eliminated_By = "Orton" INTERSECT SELECT T... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: List the dates of enrollment and completion of the student with family name "Zieme" and personal name "Bernie".### Response: SELECT T1.date_of_enrolment , T1.date_of_completion FROM Student_Cou... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Which shipping agent shipped the most documents? List the shipping agent name and the number of documents.### Response: SELECT Ref_Shipping_Agents.shipping_agent_name , count(Documents.document_... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the name of customer who has the lowest credit score.### Response: SELECT cust_name FROM customer ORDER BY credit_score LIMIT 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the transaction type code that occurs the most frequently.### Response: SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_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: Find the name and account balance of the customers who have loans with a total amount of more than 5000.### Response: SELECT T1.cust_name , T1.acc_type FROM customer AS T1 JOIN loan AS T2 ON T1... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Which movies have 'Deleted Scenes' as a substring in the special feature?### Response: SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show ids of students who play video game and play sports.### Response: SELECT StuID FROM Sportsinfo INTERSECT SELECT StuID FROM Plays_games. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: List the status shared by more than two roller coaster.### Response: SELECT Status FROM roller_coaster GROUP BY Status HAVING COUNT(*) > 2. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the distinct service types that are provided by the organization which has detail 'Denesik and Sons Party'?### Response: SELECT DISTINCT T1.service_type_code FROM services AS T1 JOIN org... |
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 who are advisors of the students from the Math department.### Response: SELECT T2.name , T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id =... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the name and checking balance of the account with the lowest saving balance.### Response: SELECT T2.balance , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOI... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Return the maximum and minimum population among all counties.### Response: SELECT max(Population) , min(Population) FROM county. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the name, headquarter and founder of the manufacturer that has the highest revenue.### Response: SELECT name , headquarter , founder FROM manufacturers ORDER BY revenue DESC LIMIT 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the most common type code across products.### Response: SELECT Product_Type_Code FROM Products GROUP BY Product_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 is the maximum and minimum grade point of students who live in NYC?### Response: SELECT max(T2.gradepoint) , min(T2.gradepoint) FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDE... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the product ID of the most frequently ordered item on invoices?### Response: SELECT Product_ID FROM INVOICES GROUP BY Product_ID 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 student's age is older than 18 and is majoring in 600? List each student's first and last name.### Response: SELECT Fname , Lname FROM Student WHERE Age > 18 AND Major = 600;. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the name of customer who has the highest amount of loans.### Response: SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY su... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the number of stores in each city.### Response: SELECT t3.headquartered_city , count(*) FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district 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 names of wines whose production year are before the year of all wines by Brander winery?### Response: SELECT Name FROM WINE WHERE YEAR < (SELECT min(YEAR) FROM WINE WHERE Winery ... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the id for the trips that lasted at least as long as the average duration of trips in zip code 94103.### Response: SELECT id FROM trip WHERE duration >= (SELECT avg(duration) FROM trip WH... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What is the highest acc percent score in the competition?### Response: SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the statement detail and the corresponding document name for the statement with detail 'Private Project'.### Response: SELECT T1.statement_details , T2.document_name FROM Statements AS T1 ... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: List the names of technicians who have not been assigned to repair machines.### Response: SELECT Name FROM technician WHERE technician_id NOT IN (SELECT technician_id FROM repair_assignment). |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: What are all the section titles of the document named "David CV"?### Response: SELECT t2.section_title FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code ... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Show the statement detail and the corresponding document name for the statement with detail 'Private Project'.### Response: SELECT T1.statement_details , T2.document_name FROM Statements AS T1 ... |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the name of the target user with the lowest trust score.### Response: SELECT T1.name FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.target_u_id ORDER BY trust LIMIT 1. |
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: Find the start and end dates of behavior incidents of students with last name "Fahey".### Response: SELECT T1.date_incident_start , date_incident_end FROM Behavior_Incident AS T1 JOIN Students ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.