prompt
stringlengths 669
1.39k
|
---|
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What are the name, phone number and email address of the customer who made the largest number of orders?
SQL Table Create Statement:
CREATE TABLE customers (customer_name VARCHAR, customer_phone VARCHAR, customer_email VARCHAR, customer_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.customer_name, T1.customer_phone, T1.customer_email FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id ORDER BY COUNT(*) DESC LIMIT 1</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What is the name and job title of the staff who was assigned the latest?
SQL Table Create Statement:
CREATE TABLE staff (staff_name VARCHAR, staff_id VARCHAR); CREATE TABLE staff_department_assignments (job_title_code VARCHAR, staff_id VARCHAR, date_assigned_to VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.staff_name, T2.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY T2.date_assigned_to DESC LIMIT 1</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Return the ids of all products that were ordered more than three times or supplied more than 80000.
SQL Table Create Statement:
CREATE TABLE Order_Items (product_id VARCHAR, total_amount_purchased INTEGER); CREATE TABLE Product_Suppliers (product_id VARCHAR, total_amount_purchased INTEGER)<|end|><|assistant|><codestart type="sql">SELECT product_id FROM Order_Items GROUP BY product_id HAVING COUNT(*) > 3 UNION SELECT product_id FROM Product_Suppliers GROUP BY product_id HAVING SUM(total_amount_purchased) > 80000</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>List the names of all the distinct customers who bought a keyboard.
SQL Table Create Statement:
CREATE TABLE order_items (order_id VARCHAR, product_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE products (product_id VARCHAR, product_name VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id JOIN products AS T4 ON T3.product_id = T4.product_id WHERE T4.product_name = "keyboard"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What are the total number of Domestic Passengers of airports that contain the word "London".
SQL Table Create Statement:
CREATE TABLE airport (Domestic_Passengers INTEGER, Airport_Name VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT SUM(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE "%London%"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>List the names of aircrafts and that won matches at least twice.
SQL Table Create Statement:
CREATE TABLE MATCH (Winning_Aircraft VARCHAR); CREATE TABLE aircraft (Aircraft VARCHAR, Aircraft_ID VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*) >= 2</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What is each customer's move in date, and the corresponding customer id and details?
SQL Table Create Statement:
CREATE TABLE Customer_Events (date_moved_in VARCHAR, customer_id VARCHAR); CREATE TABLE Customers (customer_id VARCHAR, customer_details VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T2.date_moved_in, T1.customer_id, T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Which To par has a Year(s) won of 1983?
SQL Table Create Statement:
CREATE TABLE table_name_15 (to_par VARCHAR, year_s__won VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT to_par FROM table_name_15 WHERE year_s__won = "1983"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Which Week has a Game site of oakland-alameda county coliseum, and an Attendance larger than 52,169?
SQL Table Create Statement:
CREATE TABLE table_name_71 (week INTEGER, game_site VARCHAR, attendance VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT MIN(week) FROM table_name_71 WHERE game_site = "oakland-alameda county coliseum" AND attendance > 52 OFFSET 169</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What products are available at store named "Miramichi"?
SQL Table Create Statement:
CREATE TABLE store_product (product_id VARCHAR, store_id VARCHAR); CREATE TABLE store (store_id VARCHAR, store_name VARCHAR); CREATE TABLE product (product VARCHAR, product_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT t1.product FROM product AS t1 JOIN store_product AS t2 ON t1.product_id = t2.product_id JOIN store AS t3 ON t2.store_id = t3.store_id WHERE t3.store_name = "Miramichi"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Which season had less than 25.4 viewers and had a viewer rank of #6?
SQL Table Create Statement:
CREATE TABLE table_name_43 (season INTEGER, households_viewers__in_millions_ VARCHAR, viewer_rank___number_ VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT MIN(season) FROM table_name_43 WHERE households_viewers__in_millions_ < 25.4 AND viewer_rank___number_ = "#6"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Find the names of the students who are in the position of striker and got a yes tryout decision.
SQL Table Create Statement:
CREATE TABLE tryout (pID VARCHAR, decision VARCHAR, pPos VARCHAR); CREATE TABLE player (pName VARCHAR, pID VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker'</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Find the names of states that have some college students playing in goalie and mid positions.
SQL Table Create Statement:
CREATE TABLE tryout (cName VARCHAR, pPos VARCHAR); CREATE TABLE college (state VARCHAR, cName VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie' INTERSECT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid'</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Show the name of the shop that has the most kind of devices in stock.
SQL Table Create Statement:
CREATE TABLE shop (Shop_Name VARCHAR, Shop_ID VARCHAR); CREATE TABLE stock (Shop_ID VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY COUNT(*) DESC LIMIT 1</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Show the minimum, average, maximum order quantity of all invoices.
SQL Table Create Statement:
CREATE TABLE INVOICES (Order_Quantity INTEGER)<|end|><|assistant|><codestart type="sql">SELECT MIN(Order_Quantity), AVG(Order_Quantity), MAX(Order_Quantity) FROM INVOICES</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Name the opponent for 3β6, 4β6, 6β1, 6β7 (7β9)
SQL Table Create Statement:
CREATE TABLE table_22853654_9 (opponent VARCHAR, result VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT opponent FROM table_22853654_9 WHERE result = "3β6, 4β6, 6β1, 6β7 (7β9)"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What is the amount of US open runner-up score?
SQL Table Create Statement:
CREATE TABLE table_22858557_1 (score_in_final VARCHAR, championship VARCHAR, outcome VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT COUNT(score_in_final) FROM table_22858557_1 WHERE championship = "US Open" AND outcome = "Runner-up"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What is the description of the service type which offers both the photo product and the film product?
SQL Table Create Statement:
CREATE TABLE Ref_Service_Types (Service_Type_Description VARCHAR, Service_Type_Code VARCHAR); CREATE TABLE Services (Service_Type_Code VARCHAR, Product_Name VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'photo' INTERSECT SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'film'</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What instrument did the musician with last name "Heilo" use in the song "Le Pop"?
SQL Table Create Statement:
CREATE TABLE Songs (SongId VARCHAR, songid VARCHAR, title VARCHAR); CREATE TABLE Performance (bandmate VARCHAR, SongId VARCHAR); CREATE TABLE Band (id VARCHAR, lastname VARCHAR); CREATE TABLE Instruments (instrument VARCHAR, songid VARCHAR, bandmateid VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = "Heilo" AND T3.title = "Le Pop"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Which vocal type did the musician with first name "Solveig" played in the song with title "A Bar in Amsterdam"?
SQL Table Create Statement:
CREATE TABLE vocals (songid VARCHAR, bandmate VARCHAR); CREATE TABLE band (id VARCHAR, firstname VARCHAR); CREATE TABLE songs (songid VARCHAR, title VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.firstname = "Solveig" AND T2.title = "A Bar In Amsterdam"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Which vocal type has the band mate with first name "Solveig" played the most?
SQL Table Create Statement:
CREATE TABLE vocals (bandmate VARCHAR); CREATE TABLE band (id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = "Solveig" GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Find the number of songs in all the studio albums.
SQL Table Create Statement:
CREATE TABLE songs (title VARCHAR, songid VARCHAR); CREATE TABLE albums (aid VARCHAR); CREATE TABLE tracklists (albumid VARCHAR, songid VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT COUNT(DISTINCT T3.title) FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.type = "Studio"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>How many product # have episode 1?
SQL Table Create Statement:
CREATE TABLE table_2289806_1 (prod__number INTEGER, episode__number VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT MAX(prod__number) FROM table_2289806_1 WHERE episode__number = 1</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What is the total number of Top division titles for the club that has more than 40 seasons in top division, a First season of current spell in top division of 1943-44, and more than 89 seasons in Liga MX?
SQL Table Create Statement:
CREATE TABLE table_name_55 (top_division_titles VARCHAR, number_of_seasons_in_liga_mx VARCHAR, number_of_seasons_in_top_division VARCHAR, first_season_of_current_spell_in_top_division VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT COUNT(top_division_titles) FROM table_name_55 WHERE number_of_seasons_in_top_division > 40 AND first_season_of_current_spell_in_top_division = "1943-44" AND number_of_seasons_in_liga_mx > 89</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Select the name of each manufacturer along with the name and price of its most expensive product.
SQL Table Create Statement:
CREATE TABLE Manufacturers (name VARCHAR, code VARCHAR); CREATE TABLE products (Name VARCHAR, Price INTEGER, manufacturer VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.Name, MAX(T1.Price), T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>For each product that has problems, find the number of problems reported after 1986-11-13 and the product id?
SQL Table Create Statement:
CREATE TABLE product (product_id VARCHAR); CREATE TABLE problems (product_id VARCHAR, date_problem_reported INTEGER)<|end|><|assistant|><codestart type="sql">SELECT COUNT(*), T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T1.date_problem_reported > "1986-11-13" GROUP BY T2.product_id</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Find the first and last name of the staff members who reported problems from the product "rem" but not "aut"?
SQL Table Create Statement:
CREATE TABLE product (product_name VARCHAR, product_id VARCHAR); CREATE TABLE staff (staff_first_name VARCHAR, staff_last_name VARCHAR, staff_id VARCHAR); CREATE TABLE problems (product_id VARCHAR, reported_by_staff_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T3.staff_first_name, T3.staff_last_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = "rem" EXCEPT SELECT T3.staff_first_name, T3.staff_last_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = "aut"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What does American have if Australia has ΙΚ?
SQL Table Create Statement:
CREATE TABLE table_name_65 (american VARCHAR, australian VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT american FROM table_name_65 WHERE australian = "ΙΚ"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>WHAT IS THE YEAR'S TALLEST VALUE WITH FLOORS LESS THAN 24, AND 05.0 210 north charles street?
SQL Table Create Statement:
CREATE TABLE table_name_10 (years_as_tallest VARCHAR, floors VARCHAR, street_address VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT years_as_tallest FROM table_name_10 WHERE floors < 24 AND street_address = "05.0 210 north charles street"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Find the distinct Advisor of students who have treasurer votes in the spring election cycle.
SQL Table Create Statement:
CREATE TABLE STUDENT (Advisor VARCHAR, StuID VARCHAR); CREATE TABLE VOTING_RECORD (Treasurer_Vote VARCHAR, Election_Cycle VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT DISTINCT T1.Advisor FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote WHERE T2.Election_Cycle = "Spring"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Find the distinct first names of all the students who have vice president votes and whose city code is not PIT.
SQL Table Create Statement:
CREATE TABLE STUDENT (Fname VARCHAR, city_code VARCHAR); CREATE TABLE STUDENT (Fname VARCHAR, StuID VARCHAR); CREATE TABLE VOTING_RECORD (VICE_PRESIDENT_Vote VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_PRESIDENT_Vote EXCEPT SELECT DISTINCT Fname FROM STUDENT WHERE city_code = "PIT"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What is every part number with model number core i5-670?
SQL Table Create Statement:
CREATE TABLE table_23028629_2 (part_number_s_ VARCHAR, model_number VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT part_number_s_ FROM table_23028629_2 WHERE model_number = "Core i5-670"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What is the color code and description of the product named "chervil"?
SQL Table Create Statement:
CREATE TABLE products (color_code VARCHAR, product_name VARCHAR); CREATE TABLE ref_colors (color_description VARCHAR, color_code VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT t1.color_code, t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = "chervil"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>How many characteristics does the product named "laurel" have?
SQL Table Create Statement:
CREATE TABLE CHARACTERISTICS (characteristic_id VARCHAR); CREATE TABLE products (product_id VARCHAR, product_name VARCHAR); CREATE TABLE product_characteristics (product_id VARCHAR, characteristic_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "laurel"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What are Arthur Ashe's games w-l?
SQL Table Create Statement:
CREATE TABLE table_23133482_1 (games_w_l VARCHAR, player VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT games_w_l FROM table_23133482_1 WHERE player = "Arthur Ashe"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What is the characteristic name used by most number of the products?
SQL Table Create Statement:
CREATE TABLE products (product_id VARCHAR); CREATE TABLE CHARACTERISTICS (characteristic_name VARCHAR, characteristic_id VARCHAR); CREATE TABLE product_characteristics (product_id VARCHAR, characteristic_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name ORDER BY COUNT(*) DESC LIMIT 1</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What Opponent has a Site of war memorial stadium β’ little rock, ar, and a Result of l6β7?
SQL Table Create Statement:
CREATE TABLE table_name_63 (opponent VARCHAR, site VARCHAR, result VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT opponent FROM table_name_63 WHERE site = "war memorial stadium β’ little rock, ar" AND result = "l6β7"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Find the name of the swimmer who has the most records.
SQL Table Create Statement:
CREATE TABLE record (swimmer_id VARCHAR); CREATE TABLE swimmer (name VARCHAR, id VARCHAR)<|end|><|assistant|><codestart type="sql">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 LIMIT 1</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What is the remark for Norway?
SQL Table Create Statement:
CREATE TABLE table_name_38 (remarks VARCHAR, country_of_origin VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT remarks FROM table_name_38 WHERE country_of_origin = "norway"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What is the lowest Against, when Venue is "Twickenham , London", when Status is "Six Nations", and when Opposing Teams is "France"?
SQL Table Create Statement:
CREATE TABLE table_name_78 (against INTEGER, opposing_teams VARCHAR, venue VARCHAR, status VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT MIN(against) FROM table_name_78 WHERE venue = "twickenham , london" AND status = "six nations" AND opposing_teams = "france"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Which country won in 1988?
SQL Table Create Statement:
CREATE TABLE table_name_19 (country VARCHAR, year_s__won VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT country FROM table_name_19 WHERE year_s__won = "1988"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Who had the high assists when the score was l 85β118 (ot)
SQL Table Create Statement:
CREATE TABLE table_23248869_8 (high_assists VARCHAR, score VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT high_assists FROM table_23248869_8 WHERE score = "L 85β118 (OT)"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What is the score of Howard Clark from England with a To Par of +1?
SQL Table Create Statement:
CREATE TABLE table_name_55 (score VARCHAR, player VARCHAR, to_par VARCHAR, country VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT score FROM table_name_55 WHERE to_par = "+1" AND country = "england" AND player = "howard clark"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Find the average age of students who are living in the dorm with the largest capacity.
SQL Table Create Statement:
CREATE TABLE dorm (student_capacity INTEGER); CREATE TABLE student (age INTEGER, stuid VARCHAR); CREATE TABLE lives_in (stuid VARCHAR, dormid VARCHAR); CREATE TABLE dorm (dormid VARCHAR, student_capacity INTEGER)<|end|><|assistant|><codestart type="sql">SELECT AVG(T1.age) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.student_capacity = (SELECT MAX(student_capacity) FROM dorm)</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Find the name of dorms that do not have amenity TV Lounge.
SQL Table Create Statement:
CREATE TABLE dorm (dorm_name VARCHAR, dormid VARCHAR); CREATE TABLE has_amenity (dormid VARCHAR, amenid VARCHAR); CREATE TABLE dorm (dorm_name VARCHAR); CREATE TABLE dorm_amenity (amenid VARCHAR, amenity_name VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT dorm_name FROM dorm EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge'</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What is the phone number of the customer who has filed the most recent complaint?
SQL Table Create Statement:
CREATE TABLE customers (phone_number VARCHAR, customer_id VARCHAR); CREATE TABLE complaints (customer_id VARCHAR, date_complaint_raised VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT t1.phone_number FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.date_complaint_raised DESC LIMIT 1</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Find the number of complaints with Product Failure type for each complaint status.
SQL Table Create Statement:
CREATE TABLE complaints (complaint_status_code VARCHAR, complaint_type_code VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT complaint_status_code, COUNT(*) FROM complaints WHERE complaint_type_code = "Product Failure" GROUP BY complaint_status_code</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Show all dates of transactions whose type code is "SALE".
SQL Table Create Statement:
CREATE TABLE TRANSACTIONS (date_of_transaction VARCHAR, transaction_type_code VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT date_of_transaction FROM TRANSACTIONS WHERE transaction_type_code = "SALE"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What are the lot details of lots associated with transactions whose share count is bigger than 100 and whose type code is "PUR"?
SQL Table Create Statement:
CREATE TABLE LOTS (lot_details VARCHAR, lot_id VARCHAR); CREATE TABLE TRANSACTIONS_LOTS (transaction_id VARCHAR); CREATE TABLE TRANSACTIONS (transaction_id VARCHAR, share_count VARCHAR, transaction_type_code VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count > 100 AND T3.transaction_type_code = "PUR"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Show the description of the transaction type that occurs most frequently.
SQL Table Create Statement:
CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR); CREATE TABLE Ref_Transaction_Types (transaction_type_description VARCHAR, transaction_type_code VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.transaction_type_description FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code GROUP BY T1.transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Name least series number for writers david e. kelley & jill goldsmith
SQL Table Create Statement:
CREATE TABLE table_23286722_1 (series__number INTEGER, written_by VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT MIN(series__number) FROM table_23286722_1 WHERE written_by = "David E. Kelley & Jill Goldsmith"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What are the details and ways to get to tourist attractions related to royal family?
SQL Table Create Statement:
CREATE TABLE TOURIST_ATTRACTIONS (How_to_Get_There VARCHAR, Tourist_Attraction_ID VARCHAR); CREATE TABLE ROYAL_FAMILY (Royal_Family_Details VARCHAR, Royal_Family_ID VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.Royal_Family_Details, T2.How_to_Get_There FROM ROYAL_FAMILY AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Royal_Family_ID = T2.Tourist_Attraction_ID</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Show the details and star ratings of the 3 least expensive hotels.
SQL Table Create Statement:
CREATE TABLE HOTELS (other_hotel_details VARCHAR, star_rating_code VARCHAR, price_range VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT other_hotel_details, star_rating_code FROM HOTELS ORDER BY price_range LIMIT 3</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What are the names of the tourist attractions that have parking or shopping as their feature details?
SQL Table Create Statement:
CREATE TABLE Tourist_Attraction_Features (tourist_attraction_id VARCHAR, Feature_ID VARCHAR); CREATE TABLE Features (Feature_ID VARCHAR, feature_Details VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, tourist_attraction_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'park' UNION SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'shopping'</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Who was the rider riding the Kawasaki ZX-6r, that rode less than 22 laps, and the grid was greater than 19, and retirement was the time?
SQL Table Create Statement:
CREATE TABLE table_name_64 (rider VARCHAR, bike VARCHAR, time VARCHAR, laps VARCHAR, grid VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT rider FROM table_name_64 WHERE laps < 22 AND grid > 19 AND time = "retirement" AND bike = "kawasaki zx-6r"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Who were the champions in years where michigan technological university was in third place?
SQL Table Create Statement:
CREATE TABLE table_2331549_1 (champion VARCHAR, third_place VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT champion FROM table_2331549_1 WHERE third_place = "Michigan Technological University"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>How many seasons have motopark team?
SQL Table Create Statement:
CREATE TABLE table_23338693_1 (season VARCHAR, team VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT COUNT(season) FROM table_23338693_1 WHERE team = "Motopark"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Which city has the most customers living in?
SQL Table Create Statement:
CREATE TABLE customers (customer_id VARCHAR); CREATE TABLE addresses (city VARCHAR, address_id VARCHAR); CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id GROUP BY t3.city ORDER BY COUNT(*) DESC LIMIT 1</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What is the name of the customer that has purchased the most items?
SQL Table Create Statement:
CREATE TABLE order_items (order_id VARCHAR, order_quantity INTEGER); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY SUM(t3.order_quantity) DESC LIMIT 1</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Find the total amount of products ordered before 2018-03-17 07:13:53.
SQL Table Create Statement:
CREATE TABLE customer_orders (order_id VARCHAR, order_date INTEGER); CREATE TABLE order_items (order_quantity INTEGER, order_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT SUM(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_date < "2018-03-17 07:13:53"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Find the names of customers who ordered both products Latte and Americano.
SQL Table Create Statement:
CREATE TABLE products (product_id VARCHAR, product_details VARCHAR); CREATE TABLE order_items (order_id VARCHAR, product_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte' INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Americano'</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What are the famous title of the artists associated with volumes with more than 2 weeks on top?
SQL Table Create Statement:
CREATE TABLE artist (Famous_Title VARCHAR, Artist_ID VARCHAR); CREATE TABLE volume (Artist_ID VARCHAR, Weeks_on_Top INTEGER)<|end|><|assistant|><codestart type="sql">SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Felicia Taylor was cyber girl in week 3, so who was the cyber girl in week 5?
SQL Table Create Statement:
CREATE TABLE table_name_95 (week_5 VARCHAR, week_3 VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT week_5 FROM table_name_95 WHERE week_3 = "felicia taylor"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What is the Title of the Pye Label mono LP release?
SQL Table Create Statement:
CREATE TABLE table_name_18 (title VARCHAR, format VARCHAR, label VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT title FROM table_name_18 WHERE format = "mono lp" AND label = "pye"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Find the cities which were once a host city after 2010?
SQL Table Create Statement:
CREATE TABLE city (city VARCHAR, city_id VARCHAR); CREATE TABLE hosting_city (host_city VARCHAR, year INTEGER)<|end|><|assistant|><codestart type="sql">SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T2.year > 2010</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Give me a list of cities whose temperature in Feb is higher than that in Jun or cities that were once host cities?
SQL Table Create Statement:
CREATE TABLE city (city VARCHAR, city_id VARCHAR); CREATE TABLE hosting_city (host_city VARCHAR); CREATE TABLE temperature (city_id VARCHAR, Feb INTEGER, Jun VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Feb > T2.Jun UNION SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Find the emails of parties with the most popular party form.
SQL Table Create Statement:
CREATE TABLE party_forms (form_id VARCHAR); CREATE TABLE parties (party_email VARCHAR, party_id VARCHAR); CREATE TABLE party_forms (party_id VARCHAR, form_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT t1.party_email FROM parties AS t1 JOIN party_forms AS t2 ON t1.party_id = t2.party_id WHERE t2.form_id = (SELECT form_id FROM party_forms GROUP BY form_id ORDER BY COUNT(*) DESC LIMIT 1)</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>When middle assyrian empire is the ubaid period in mesopotamia what is the copper age?
SQL Table Create Statement:
CREATE TABLE table_23537091_1 (copper_age VARCHAR, ubaid_period_in_mesopotamia VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT copper_age FROM table_23537091_1 WHERE ubaid_period_in_mesopotamia = "Middle Assyrian Empire"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>How many shows did team David consist of vernon kay and dara Γ³ briain
SQL Table Create Statement:
CREATE TABLE table_23575917_8 (episode VARCHAR, davids_team VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT COUNT(episode) FROM table_23575917_8 WHERE davids_team = "Vernon Kay and Dara Γ Briain"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>How many companies operates airlines in each airport?
SQL Table Create Statement:
CREATE TABLE airport (id VARCHAR); CREATE TABLE flight (Id VARCHAR); CREATE TABLE operate_company (id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T3.id, COUNT(*) FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id JOIN airport AS T3 ON T2.airport_id = T3.id GROUP BY T3.id</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>How many different percentages of immigrants in 2006 can there be for Morocco?
SQL Table Create Statement:
CREATE TABLE table_23619212_1 (_percentage_of_all_immigrants_2006 VARCHAR, country VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT COUNT(_percentage_of_all_immigrants_2006) FROM table_23619212_1 WHERE country = "Morocco"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What is the project id and detail for the project with at least two documents?
SQL Table Create Statement:
CREATE TABLE Projects (project_id VARCHAR, project_details VARCHAR); CREATE TABLE Documents (project_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.project_id, T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id HAVING COUNT(*) > 2</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Show ids for all documents in type CV without expense budgets.
SQL Table Create Statement:
CREATE TABLE Documents_with_expenses (document_id VARCHAR, document_type_code VARCHAR); CREATE TABLE Documents (document_id VARCHAR, document_type_code VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT document_id FROM Documents WHERE document_type_code = "CV" EXCEPT SELECT document_id FROM Documents_with_expenses</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>List the name of all projects that are operated longer than the average working hours of all projects.
SQL Table Create Statement:
CREATE TABLE projects (name VARCHAR, hours INTEGER)<|end|><|assistant|><codestart type="sql">SELECT name FROM projects WHERE hours > (SELECT AVG(hours) FROM projects)</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Which Year completed has a Dam type of earthfill embankment, and a Dam constructed of khancoban dam?
SQL Table Create Statement:
CREATE TABLE table_name_25 (year_completed INTEGER, dam_type VARCHAR, dam_constructed VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT MAX(year_completed) FROM table_name_25 WHERE dam_type = "earthfill embankment" AND dam_constructed = "khancoban dam"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What was the 2006 population count of the local government area where Coober Pedy is located?
SQL Table Create Statement:
CREATE TABLE table_23685890_2 (pop_2006 VARCHAR, major_town VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT pop_2006 FROM table_23685890_2 WHERE major_town = "Coober Pedy"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>In what bowl game was the result Oklahoma 31, Stanford 27?
SQL Table Create Statement:
CREATE TABLE table_23718905_6 (bowl_game VARCHAR, matchup_results VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT bowl_game FROM table_23718905_6 WHERE matchup_results = "Oklahoma 31, Stanford 27"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What is the winning coach total number if the top team in regular season (points) is the Kansas City Spurs (110 points)?
SQL Table Create Statement:
CREATE TABLE table_237757_3 (winning_coach VARCHAR, top_team_in_regular_season__points_ VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT COUNT(winning_coach) FROM table_237757_3 WHERE top_team_in_regular_season__points_ = "Kansas City Spurs (110 points)"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Show all train names and times in stations in London in descending order by train time.
SQL Table Create Statement:
CREATE TABLE train_station (station_id VARCHAR, train_id VARCHAR); CREATE TABLE station (station_id VARCHAR, location VARCHAR); CREATE TABLE train (name VARCHAR, time VARCHAR, train_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T3.name, T3.time FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id WHERE T2.location = 'London' ORDER BY T3.time DESC</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>When was the average attendance 789?
SQL Table Create Statement:
CREATE TABLE table_2380212_1 (year INTEGER, avg_attendance VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT MIN(year) FROM table_2380212_1 WHERE avg_attendance = 789</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>How many staff live in state Georgia?
SQL Table Create Statement:
CREATE TABLE Addresses (state_province_county VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT COUNT(*) FROM Addresses WHERE state_province_county = "Georgia"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>When are the birthdays of customer who are classified as 'Good Customer' status?
SQL Table Create Statement:
CREATE TABLE Customers (date_of_birth VARCHAR, customer_status_code VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT date_of_birth FROM Customers WHERE customer_status_code = 'Good Customer'</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>How much in total does customer with first name as Carole and last name as Bernhard paid?
SQL Table Create Statement:
CREATE TABLE Customers (customer_id VARCHAR, first_name VARCHAR, last_name VARCHAR); CREATE TABLE Customer_Payments (amount_payment INTEGER, customer_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT SUM(T1.amount_payment) FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = "Carole" AND T2.last_name = "Bernhard"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Name the original air date for harry hannigan directed by adam weissman
SQL Table Create Statement:
CREATE TABLE table_23937219_2 (original_air_date VARCHAR, written_by VARCHAR, directed_by VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT original_air_date FROM table_23937219_2 WHERE written_by = "Harry Hannigan" AND directed_by = "Adam Weissman"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Who was the home team on 4 February 1987 when Luton Town was away team and there was no replay?
SQL Table Create Statement:
CREATE TABLE table_name_68 (home_team VARCHAR, away_team VARCHAR, tie_no VARCHAR, date VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT home_team FROM table_name_68 WHERE tie_no = "replay" AND date = "4 february 1987" AND away_team = "luton town"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Show all the activity names and the number of faculty involved in each activity.
SQL Table Create Statement:
CREATE TABLE Faculty_participates_in (actID VARCHAR); CREATE TABLE Activity (activity_name VARCHAR, actID VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.activity_name, COUNT(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What is Tie no, when Date is "18 Nov 1989", and when Home Team is "Doncaster Rovers"?
SQL Table Create Statement:
CREATE TABLE table_name_32 (tie_no VARCHAR, date VARCHAR, home_team VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT tie_no FROM table_name_32 WHERE date = "18 nov 1989" AND home_team = "doncaster rovers"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Find the number of different airports which are the destinations of the American Airlines.
SQL Table Create Statement:
CREATE TABLE routes (alid VARCHAR); CREATE TABLE airlines (alid VARCHAR, name VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT COUNT(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines'</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Find the number of routes from the United States to Canada.
SQL Table Create Statement:
CREATE TABLE airports (dst_apid VARCHAR, src_apid VARCHAR, apid VARCHAR, country VARCHAR); CREATE TABLE routes (dst_apid VARCHAR, src_apid VARCHAR, apid VARCHAR, country VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT COUNT(*) FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'Canada') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States')</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What date has 11 as the tie no.?
SQL Table Create Statement:
CREATE TABLE table_name_48 (date VARCHAR, tie_no VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT date FROM table_name_48 WHERE tie_no = "11"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What is the best top-10 result when events are fewer than 39, top-5 is 1 and more than 5 cuts are made?
SQL Table Create Statement:
CREATE TABLE table_name_89 (top_10 INTEGER, cuts_made VARCHAR, events VARCHAR, top_5 VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT MAX(top_10) FROM table_name_89 WHERE events < 39 AND top_5 = 1 AND cuts_made > 5</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>How many times is the award ceremony laurence olivier award, result is won and the nominee is imelda staunton?
SQL Table Create Statement:
CREATE TABLE table_name_3 (year VARCHAR, nominee VARCHAR, award_ceremony VARCHAR, result VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT COUNT(year) FROM table_name_3 WHERE award_ceremony = "laurence olivier award" AND result = "won" AND nominee = "imelda staunton"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What are the distinct name of the mills built by the architects who have also built a bridge longer than 80 meters?
SQL Table Create Statement:
CREATE TABLE architect (Id VARCHAR); CREATE TABLE mill (name VARCHAR, architect_id VARCHAR); CREATE TABLE bridge (architect_id VARCHAR, length_meters INTEGER)<|end|><|assistant|><codestart type="sql">SELECT DISTINCT T1.name FROM mill AS T1 JOIN architect AS t2 ON T1.architect_id = T2.id JOIN bridge AS T3 ON T3.architect_id = T2.id WHERE T3.length_meters > 80</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>How many points were scored by the player with 79 goals and who played 38 games?
SQL Table Create Statement:
CREATE TABLE table_name_32 (points VARCHAR, goals VARCHAR, games VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT points FROM table_name_32 WHERE goals = "79" AND games = "38"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Find the number of concerts happened in the stadium with the highest capacity .
SQL Table Create Statement:
CREATE TABLE concert (stadium_id VARCHAR, capacity VARCHAR); CREATE TABLE stadium (stadium_id VARCHAR, capacity VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT COUNT(*) FROM concert WHERE stadium_id = (SELECT stadium_id FROM stadium ORDER BY capacity DESC LIMIT 1)</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>Find the id of students who do not have a cat pet.
SQL Table Create Statement:
CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE pets (petid VARCHAR, pettype VARCHAR); CREATE TABLE student (stuid VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat'</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>How many models does each car maker produce? List maker full name, id and the number.
SQL Table Create Statement:
CREATE TABLE MODEL_LIST (Maker VARCHAR); CREATE TABLE CAR_MAKERS (FullName VARCHAR, Id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.FullName, T1.Id, COUNT(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What is the number of car models that are produced by each maker and what is the id and full name of each maker?
SQL Table Create Statement:
CREATE TABLE CAR_MAKERS (FullName VARCHAR, id VARCHAR, Id VARCHAR); CREATE TABLE MODEL_LIST (Maker VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT COUNT(*), T2.FullName, T2.id FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id GROUP BY T2.id</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What was the reason for change to the successor that was seated on December 13, 1880?
SQL Table Create Statement:
CREATE TABLE table_2417395_4 (reason_for_change VARCHAR, date_successor_seated VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT reason_for_change FROM table_2417395_4 WHERE date_successor_seated = "December 13, 1880"</codeend><|end|> |
<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.
SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.
Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>How many countries has more than 2 car makers ?
SQL Table Create Statement:
CREATE TABLE car_makers (country VARCHAR); CREATE TABLE countries (countryid VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT COUNT(*) FROM countries AS t1 JOIN car_makers AS t2 ON t1.countryid = t2.country GROUP BY t1.countryid HAVING COUNT(*) > 2</codeend><|end|> |