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|>Which Party has Years in Assembly of 2008–present, and a Name of tom ammiano? SQL Table Create Statement: CREATE TABLE table_name_77 (party VARCHAR, years_in_assembly VARCHAR, name VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT party FROM table_name_77 WHERE years_in_assembly = "2008–present" AND name = "tom ammiano"</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 all reviewers who rated Gone with the Wind. SQL Table Create Statement: CREATE TABLE Movie (mID VARCHAR, title VARCHAR); CREATE TABLE Reviewer (name VARCHAR, rID VARCHAR); CREATE TABLE Rating (mID VARCHAR, rID VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT DISTINCT T3.name FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T2.title = 'Gone with the Wind'</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 movies with the highest average rating. Return the movie titles and average rating. SQL Table Create Statement: CREATE TABLE Rating (stars INTEGER, mID VARCHAR); CREATE TABLE Movie (title VARCHAR, mID VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T2.title, AVG(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY AVG(T1.stars) 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 status has gauteng falcons as the opposing team? SQL Table Create Statement: CREATE TABLE table_name_2 (status VARCHAR, opposing_team VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT status FROM table_name_2 WHERE opposing_team = "gauteng falcons"</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 distinct police forces of counties whose location is not on east side. SQL Table Create Statement: CREATE TABLE county_public_safety (Police_force VARCHAR, LOCATION VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT DISTINCT Police_force FROM county_public_safety WHERE LOCATION <> "East"</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 public schools with a master's university? SQL Table Create Statement: CREATE TABLE table_2076595_1 (location_s_ VARCHAR, control VARCHAR, type VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT location_s_ FROM table_2076595_1 WHERE control = "Public" AND type = "Master's 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|>Can you tell me the average Average that has the Rank larger than 4, and the Player of dean minors? SQL Table Create Statement: CREATE TABLE table_name_77 (average INTEGER, rank VARCHAR, player VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT AVG(average) FROM table_name_77 WHERE rank > 4 AND player = "dean minors"</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 name and number of reservations made for each of the rooms. SQL Table Create Statement: CREATE TABLE Reservations (Room VARCHAR); CREATE TABLE Rooms (roomName VARCHAR, RoomId VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T2.roomName, COUNT(*), T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room</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 renting arrears tax ids related to the customer master index whose detail is not 'Schmidt, Kertzmann and Lubowitz'? SQL Table Create Statement: CREATE TABLE Rent_Arrears (council_tax_id VARCHAR, cmi_cross_ref_id VARCHAR); CREATE TABLE Customer_Master_Index (master_customer_id VARCHAR, cmi_details VARCHAR); CREATE TABLE CMI_Cross_References (cmi_cross_ref_id VARCHAR, master_customer_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.council_tax_id FROM Rent_Arrears AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id JOIN Customer_Master_Index AS T3 ON T3.master_customer_id = T2.master_customer_id WHERE T3.cmi_details <> 'Schmidt , Kertzmann and Lubowitz'</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 themes of parties in ascending order of number of hosts. SQL Table Create Statement: CREATE TABLE party (Party_Theme VARCHAR, Number_of_hosts VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT Party_Theme FROM party ORDER BY Number_of_hosts</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 race number had sail number AUS 98888? SQL Table Create Statement: CREATE TABLE table_20854943_2 (race_number VARCHAR, sail_number VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT race_number FROM table_20854943_2 WHERE sail_number = "AUS 98888"</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 storm name with at least two regions and 10 cities affected. SQL Table Create Statement: CREATE TABLE affected_region (storm_id VARCHAR, number_city_affected INTEGER); CREATE TABLE storm (name VARCHAR, storm_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING COUNT(*) >= 2 INTERSECT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING SUM(T2.number_city_affected) >= 10</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 Label has a Format of cd, and a Catalog of crgd 86136? SQL Table Create Statement: CREATE TABLE table_name_88 (label VARCHAR, format VARCHAR, catalog VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT label FROM table_name_88 WHERE format = "cd" AND catalog = "crgd 86136"</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 Place has a To par of –4? SQL Table Create Statement: CREATE TABLE table_name_92 (place VARCHAR, to_par VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT place FROM table_name_92 WHERE to_par = "–4"</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 least episode for november 29, 1985 SQL Table Create Statement: CREATE TABLE table_20967430_2 (ep INTEGER, original_air_date VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT MIN(ep) FROM table_20967430_2 WHERE original_air_date = "November 29, 1985"</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 Advisor has most of students? List advisor and the number of students. SQL Table Create Statement: CREATE TABLE Student (Advisor VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT Advisor, COUNT(*) FROM Student GROUP BY Advisor ORDER BY COUNT(Advisor) 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|>Which student visited restaurant most often? List student's first name and last name. SQL Table Create Statement: CREATE TABLE Visits_Restaurant (Id VARCHAR); CREATE TABLE Student (Id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT Student.Fname, Student.Lname FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID GROUP BY Student.StuID 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 names and phone numbers of customers living in California state. SQL Table Create Statement: CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_phone VARCHAR, customer_id VARCHAR); CREATE TABLE addresses (address_id VARCHAR, state_province_county VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT t1.customer_name, t1.customer_phone 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 WHERE t3.state_province_county = 'California'</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 did they do in the game when their record was 3-2-1? SQL Table Create Statement: CREATE TABLE table_21058823_1 (result VARCHAR, record VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT result FROM table_21058823_1 WHERE record = "3-2-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 are the last names of the author of the paper titled "Binders Unbound"? SQL Table Create Statement: CREATE TABLE authorship (authid VARCHAR, paperid VARCHAR); CREATE TABLE authors (lname VARCHAR, authid VARCHAR); CREATE TABLE papers (paperid VARCHAR, title VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = "Binders Unbound"</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 paper is published in an institution in "USA" and have "Turon" as its second author? SQL Table Create Statement: CREATE TABLE authorship (authid VARCHAR, paperid VARCHAR, instid VARCHAR, authorder VARCHAR); CREATE TABLE authors (authid VARCHAR, lname VARCHAR); CREATE TABLE papers (title VARCHAR, paperid VARCHAR); CREATE TABLE inst (instid VARCHAR, country VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = "USA" AND t2.authorder = 2 AND t1.lname = "Turon"</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|>Retrieve the title of the paper that has the largest number of authors. SQL Table Create Statement: CREATE TABLE authorship (authorder INTEGER); CREATE TABLE authorship (paperid VARCHAR, authorder INTEGER); CREATE TABLE papers (title VARCHAR, paperid VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid = t2.paperid WHERE t1.authorder = (SELECT MAX(authorder) FROM authorship)</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 score of the game with away team chelsea on 29 january 1983? SQL Table Create Statement: CREATE TABLE table_name_10 (score VARCHAR, date VARCHAR, away_team VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT score FROM table_name_10 WHERE date = "29 january 1983" AND away_team = "chelsea"</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 film has the most copies in the inventory? List both title and id. SQL Table Create Statement: CREATE TABLE film (title VARCHAR, film_id VARCHAR); CREATE TABLE inventory (film_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.title, T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_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 full name of the staff member who has rented a film to a customer with the first name April and the last name Burns? SQL Table Create Statement: CREATE TABLE customer (customer_id VARCHAR, first_name VARCHAR, last_name VARCHAR); CREATE TABLE rental (staff_id VARCHAR, customer_id VARCHAR); CREATE TABLE staff (first_name VARCHAR, last_name VARCHAR, staff_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT DISTINCT T1.first_name, T1.last_name FROM staff AS T1 JOIN rental AS T2 ON T1.staff_id = T2.staff_id JOIN customer AS T3 ON T2.customer_id = T3.customer_id WHERE T3.first_name = 'APRIL' AND T3.last_name = 'BURNS'</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 Provider that has a pay in 2006–, and a Transmission of iptv and digital terrestrial? SQL Table Create Statement: CREATE TABLE table_name_90 (provider VARCHAR, transmission VARCHAR, free_or_pay VARCHAR, years VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT provider FROM table_name_90 WHERE free_or_pay = "pay" AND years = "2006–" AND transmission = "iptv and digital terrestrial"</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 customers who do not have an saving account. SQL Table Create Statement: CREATE TABLE customer (cust_name VARCHAR, acc_type VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT cust_name FROM customer EXCEPT SELECT cust_name FROM customer WHERE acc_type = 'saving'</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 bank branch that provided the greatest total amount of loans to customers with credit score is less than 100. SQL Table Create Statement: CREATE TABLE loan (branch_id VARCHAR, cust_id VARCHAR, amount INTEGER); CREATE TABLE bank (bname VARCHAR, branch_id VARCHAR); CREATE TABLE customer (cust_id VARCHAR, credit_score INTEGER)<|end|><|assistant|><codestart type="sql">SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100 GROUP BY T2.bname ORDER BY SUM(T1.amount) 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 losses consist of the team of japan? SQL Table Create Statement: CREATE TABLE table_name_13 (losses VARCHAR, team VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT losses FROM table_name_13 WHERE team = "japan"</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 code and description of the most frequent behavior incident type? SQL Table Create Statement: CREATE TABLE Ref_Incident_Type (incident_type_description VARCHAR, incident_type_code VARCHAR); CREATE TABLE Behavior_Incident (incident_type_code VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.incident_type_code, T2.incident_type_description FROM Behavior_Incident AS T1 JOIN Ref_Incident_Type AS T2 ON T1.incident_type_code = T2.incident_type_code GROUP BY T1.incident_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|>What is the smallest Pick with Overall larger than 17, a Player name of dave adams category:articles with hcards, and a Year larger than 1963? SQL Table Create Statement: CREATE TABLE table_name_88 (pick INTEGER, year VARCHAR, overall VARCHAR, player_name VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT MIN(pick) FROM table_name_88 WHERE overall > 17 AND player_name = "dave adams category:articles with hcards" AND year > 1963</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 assets does each maintenance contract contain? List the number and the contract id. SQL Table Create Statement: CREATE TABLE Assets (maintenance_contract_id VARCHAR); CREATE TABLE Maintenance_Contracts (maintenance_contract_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT COUNT(*), T1.maintenance_contract_id FROM Maintenance_Contracts AS T1 JOIN Assets AS T2 ON T1.maintenance_contract_id = T2.maintenance_contract_id GROUP BY T1.maintenance_contract_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|>For all the faults of different parts, what are all the decriptions of the skills required to fix them? List the name of the faults and the skill description. SQL Table Create Statement: CREATE TABLE Skills_Required_To_Fix (part_fault_id VARCHAR, skill_id VARCHAR); CREATE TABLE Part_Faults (fault_short_name VARCHAR, part_fault_id VARCHAR); CREATE TABLE Skills (skill_description VARCHAR, skill_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.fault_short_name, T3.skill_description FROM Part_Faults AS T1 JOIN Skills_Required_To_Fix AS T2 ON T1.part_fault_id = T2.part_fault_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_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 part fault requires the most number of skills to fix? List part id and name. SQL Table Create Statement: CREATE TABLE Part_Faults (part_id VARCHAR, part_fault_id VARCHAR); CREATE TABLE Skills_Required_To_Fix (part_fault_id VARCHAR); CREATE TABLE Parts (part_id VARCHAR, part_name VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.part_id, T1.part_name FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id JOIN Skills_Required_To_Fix AS T3 ON T2.part_fault_id = T3.part_fault_id GROUP BY T1.part_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|>Which Apps have a Club of barcelona, and a Season of 1996/97, and a Rank smaller than 7? SQL Table Create Statement: CREATE TABLE table_name_29 (apps INTEGER, rank VARCHAR, club VARCHAR, season VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT MIN(apps) FROM table_name_29 WHERE club = "barcelona" AND season = "1996/97" AND rank < 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 id and local authority of the station with has the highest average high temperature. SQL Table Create Statement: CREATE TABLE weekly_weather (station_id VARCHAR); CREATE TABLE station (id VARCHAR, local_authority VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT t2.id, t2.local_authority FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id GROUP BY t1.station_id ORDER BY AVG(high_temperature) 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 was the result of the Australian Championships? SQL Table Create Statement: CREATE TABLE table_2139023_2 (outcome VARCHAR, championship VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT outcome FROM table_2139023_2 WHERE championship = "Australian championships"</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 students enrolled in class ACCT-211? SQL Table Create Statement: CREATE TABLE enroll (class_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT COUNT(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code WHERE T1.crs_code = 'ACCT-211'</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 records had result/games: 10 games (29,606 avg.) SQL Table Create Statement: CREATE TABLE table_21436373_12 (type_of_record VARCHAR, result_games VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT COUNT(type_of_record) FROM table_21436373_12 WHERE result_games = "10 games (29,606 avg.)"</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 code of the course which the student whose last name is Smithson took? SQL Table Create Statement: CREATE TABLE student (stu_num VARCHAR, stu_lname VARCHAR); CREATE TABLE enroll (class_code VARCHAR, stu_num VARCHAR); CREATE TABLE CLASS (crs_code VARCHAR, class_code VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.crs_code FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num WHERE T3.stu_lname = 'Smithson'</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 teams for season 1950-51? SQL Table Create Statement: CREATE TABLE table_name_89 (teams VARCHAR, season VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT teams FROM table_name_89 WHERE season = "1950-51"</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 names and offices of all instructors who have taught some course and the course description and the department name. SQL Table Create Statement: CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR); CREATE TABLE course (crs_description VARCHAR, crs_code VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR, crs_code VARCHAR); CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR, dept_code VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T2.emp_fname, T4.prof_office, T3.crs_description, T5.dept_name FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num JOIN department AS T5 ON T4.dept_code = T5.dept_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|>How many copies were sold of the game released on october 23, 2008? SQL Table Create Statement: CREATE TABLE table_21458142_1 (total_copies_sold VARCHAR, release_date VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT total_copies_sold FROM table_21458142_1 WHERE release_date = "October 23, 2008"</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 launch date for the sattelite with ado that was 4 kg and 3 meters in diameter? SQL Table Create Statement: CREATE TABLE table_2150068_1 (launch_date__utc_ VARCHAR, diameter_m_ VARCHAR, usage VARCHAR, mass_kg_ VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT launch_date__utc_ FROM table_2150068_1 WHERE usage = "ado" AND mass_kg_ = "4" AND diameter_m_ = "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|>Find the id and number of shops for the company that produces the most expensive furniture. SQL Table Create Statement: CREATE TABLE manufacturer (manufacturer_id VARCHAR, num_of_shops VARCHAR); CREATE TABLE furniture_manufacte (manufacturer_id VARCHAR, Price_in_Dollar VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT t1.manufacturer_id, t1.num_of_shops FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id ORDER BY t2.Price_in_Dollar 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 Date (Opening), when Opening Film is "Another Myanmar, Mae Sot"? SQL Table Create Statement: CREATE TABLE table_name_47 (date__opening_ VARCHAR, opening_film VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT date__opening_ FROM table_name_47 WHERE opening_film = "another myanmar, mae sot"</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 population in millions for 2011 where the GDP (nominal) (billions USD) is 4? SQL Table Create Statement: CREATE TABLE table_2155836_1 (population__millions VARCHAR, _2011_ VARCHAR, gdp__nominal___billions_usd_ VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT population__millions, _2011_ FROM table_2155836_1 WHERE gdp__nominal___billions_usd_ = "4"</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|>display the employee id and salary of all employees who report to Payam (first name). SQL Table Create Statement: CREATE TABLE employees (employee_id VARCHAR, salary VARCHAR, manager_id VARCHAR, first_name VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT employee_id, salary FROM employees WHERE manager_id = (SELECT employee_id FROM employees WHERE first_name = 'Payam')</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|>display the employee number, name( first name and last name ), and salary for all employees who earn more than the average salary and who work in a department with any employee with a 'J' in their first name. SQL Table Create Statement: CREATE TABLE employees (employee_id VARCHAR, first_name VARCHAR, last_name VARCHAR, salary INTEGER, department_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT employee_id, first_name, last_name, salary FROM employees WHERE salary > (SELECT AVG(salary) FROM employees) AND department_id IN (SELECT department_id FROM employees WHERE first_name LIKE '%J%')</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|>display the department name, city, and state province for each department. SQL Table Create Statement: CREATE TABLE locations (city VARCHAR, state_province VARCHAR, location_id VARCHAR); CREATE TABLE departments (department_name VARCHAR, location_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.department_name, T2.city, T2.state_province FROM departments AS T1 JOIN locations AS T2 ON T2.location_id = T1.location_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|>List the file size and format for all songs that have resolution lower than 800. SQL Table Create Statement: CREATE TABLE song (f_id VARCHAR, resolution INTEGER); CREATE TABLE files (file_size VARCHAR, formats VARCHAR, f_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT DISTINCT T1.file_size, T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.resolution < 800</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 1st leg with Team 2 Lyon? SQL Table Create Statement: CREATE TABLE table_name_98 (team_2 VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT 1 AS st_leg FROM table_name_98 WHERE team_2 = "lyon"</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 maximum and minimum resolution of songs whose duration is 3 minutes? SQL Table Create Statement: CREATE TABLE files (f_id VARCHAR, duration VARCHAR); CREATE TABLE song (resolution INTEGER, f_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT MAX(T2.resolution), MIN(T2.resolution) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE "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|>Find the top 3 artists who have the largest number of songs works whose language is Bangla. SQL Table Create Statement: CREATE TABLE song (artist_name VARCHAR, languages VARCHAR); CREATE TABLE artist (artist_name VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = "bangla" GROUP BY T2.artist_name ORDER BY COUNT(*) DESC 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|>How many people per km2 are there in the municipality whose mayor is Boy Quiat? SQL Table Create Statement: CREATE TABLE table_216776_2 (pop_density__per_km²_ VARCHAR, municipal_mayor VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT pop_density__per_km²_ FROM table_216776_2 WHERE municipal_mayor = "Boy Quiat"</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 name and id of the team offering the lowest average salary? SQL Table Create Statement: CREATE TABLE team (name VARCHAR, team_id VARCHAR); CREATE TABLE salary (team_id VARCHAR, salary INTEGER)<|end|><|assistant|><codestart type="sql">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_id ORDER BY AVG(T2.salary) 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|>Which nationality is kitchener rangers (ohl) college/junior/club team? SQL Table Create Statement: CREATE TABLE table_21721351_18 (nationality VARCHAR, college_junior_club_team VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT nationality FROM table_21721351_18 WHERE college_junior_club_team = "Kitchener Rangers (OHL)"</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 players' first name and last name who received salary from team Washington Nationals in both 2005 and 2007. SQL Table Create Statement: CREATE TABLE player (name_first VARCHAR, name_last VARCHAR, player_id VARCHAR); CREATE TABLE team (team_id_br VARCHAR, name VARCHAR); CREATE TABLE salary (player_id VARCHAR, team_id VARCHAR, year VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T2.name_first, T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2005 AND T3.name = 'Washington Nationals' INTERSECT SELECT T2.name_first, T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2007 AND T3.name = 'Washington Nationals'</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 number of season number entries that had US Viewers of 12.30 million? SQL Table Create Statement: CREATE TABLE table_21781578_2 (season_no VARCHAR, us_viewers__millions_ VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT COUNT(season_no) FROM table_21781578_2 WHERE us_viewers__millions_ = "12.30"</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 number was the pick for the position of DT in 1952, after round 1, where the overall was less than 155? SQL Table Create Statement: CREATE TABLE table_name_10 (pick VARCHAR, year VARCHAR, overall VARCHAR, position VARCHAR, round VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT pick FROM table_name_10 WHERE position = "dt" AND round > 1 AND overall < 155 AND year = "1952"</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 program that is broadcast most frequently. SQL Table Create Statement: CREATE TABLE program (name VARCHAR, program_id VARCHAR); CREATE TABLE broadcast (program_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id GROUP BY t2.program_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 Country, when Place is "T8", and when Score is "70-67=137"? SQL Table Create Statement: CREATE TABLE table_name_98 (country VARCHAR, place VARCHAR, score VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT country FROM table_name_98 WHERE place = "t8" AND score = 70 - 67 = 137</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 date of enrollment of the course named "Spanish"? SQL Table Create Statement: CREATE TABLE Student_Course_Enrolment (date_of_enrolment VARCHAR, course_id VARCHAR); CREATE TABLE Courses (course_id VARCHAR, course_name VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "Spanish"</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 dates of enrollment and completion of the student with family name "Zieme" and personal name "Bernie". SQL Table Create Statement: CREATE TABLE Student_Course_Enrolment (date_of_enrolment VARCHAR, date_of_completion VARCHAR, student_id VARCHAR); CREATE TABLE Students (student_id VARCHAR, family_name VARCHAR, personal_name VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.date_of_enrolment, T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.family_name = "Zieme" AND T2.personal_name = "Bernie"</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 claims caused more than 2 settlements or have the maximum claim value? List the date the claim was made and the claim id. SQL Table Create Statement: CREATE TABLE Settlements (Claim_id VARCHAR); CREATE TABLE Claims (Amount_Claimed INTEGER); CREATE TABLE Claims (Date_Claim_Made VARCHAR, Claim_id VARCHAR, Amount_Claimed INTEGER)<|end|><|assistant|><codestart type="sql">SELECT T1.Date_Claim_Made, T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.Claim_id HAVING COUNT(*) > 2 UNION SELECT T1.Date_Claim_Made, T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id WHERE T1.Amount_Claimed = (SELECT MAX(Amount_Claimed) FROM Claims)</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 claim incurred the most number of settlements? List the claim id, the date the claim was made, and the number. SQL Table Create Statement: CREATE TABLE Claims (claim_id VARCHAR, date_claim_made VARCHAR); CREATE TABLE Settlements (claim_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.claim_id, T1.date_claim_made, COUNT(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id ORDER BY COUNT(*) DESC LIMIT 1</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 Label has a Country of canada, and a Format of cd/digital download? SQL Table Create Statement: CREATE TABLE table_name_53 (label VARCHAR, country VARCHAR, format VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT label FROM table_name_53 WHERE country = "canada" AND format = "cd/digital download"</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 Format has a Label of eagle eye media, a Catalogue number(s) of —, and a Country of united states? SQL Table Create Statement: CREATE TABLE table_name_33 (format VARCHAR, country VARCHAR, label VARCHAR, catalogue_number_s_ VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT format FROM table_name_33 WHERE label = "eagle eye media" AND catalogue_number_s_ = "—" AND 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 are the results for the film titled 'Joki'? SQL Table Create Statement: CREATE TABLE table_22020724_1 (result VARCHAR, title_in_the_original_language VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT COUNT(result) FROM table_22020724_1 WHERE title_in_the_original_language = "Joki"</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 year did jaroslav vojtek category:articles with hcards Direct? SQL Table Create Statement: CREATE TABLE table_22032599_1 (year__ceremony_ VARCHAR, director VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT year__ceremony_ FROM table_22032599_1 WHERE director = "Jaroslav Vojtek Category:Articles with hCards"</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 physician who was trained in the most expensive procedure? SQL Table Create Statement: CREATE TABLE trained_in (physician VARCHAR, treatment VARCHAR); CREATE TABLE physician (name VARCHAR, employeeid VARCHAR); CREATE TABLE procedures (code VARCHAR, cost VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment ORDER BY T3.cost 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 names of patients who are not using the medication of Procrastin-X. SQL Table Create Statement: CREATE TABLE Prescribes (Patient VARCHAR, Medication VARCHAR); CREATE TABLE Medication (Code VARCHAR, name VARCHAR); CREATE TABLE patient (name VARCHAR, SSN VARCHAR); CREATE TABLE patient (name VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT name FROM patient EXCEPT SELECT T1.name FROM patient AS T1 JOIN Prescribes AS T2 ON T2.Patient = T1.SSN JOIN Medication AS T3 ON T2.Medication = T3.Code WHERE T3.name = 'Procrastin-X'</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 all students taught by OTHA MOYER. Output the first and last names of the students. SQL Table Create Statement: CREATE TABLE list (firstname VARCHAR, lastname VARCHAR, classroom VARCHAR); CREATE TABLE teachers (classroom VARCHAR, firstname VARCHAR, lastname VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "OTHA" AND T2.lastname = "MOYER"</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 all first-grade students who are NOT taught by OTHA MOYER. Report their first and last names. SQL Table Create Statement: CREATE TABLE list (firstname VARCHAR, lastname VARCHAR, classroom VARCHAR, grade VARCHAR); CREATE TABLE teachers (classroom VARCHAR, firstname VARCHAR, lastname VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT DISTINCT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 1 EXCEPT SELECT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "OTHA" AND T2.lastname = "MOYER"</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 has a finish of t66? SQL Table Create Statement: CREATE TABLE table_name_89 (player VARCHAR, finish VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT player FROM table_name_89 WHERE finish = "t66"</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 BOOKMARKING, TAGGING, RATING AND COMMENTS WITH NO LIST MANAGEMENT, NO CHARTING, NO WEB PUBLISHING, OF MICROSOFT EXCHANGE SERVER? SQL Table Create Statement: CREATE TABLE table_name_1 (bookmarking VARCHAR, _tagging VARCHAR, _rating_and_comments VARCHAR, name VARCHAR, web_publishing VARCHAR, list_management VARCHAR, charting VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT bookmarking, _tagging, _rating_and_comments FROM table_name_1 WHERE list_management = "no" AND charting = "no" AND web_publishing = "no" AND name = "microsoft exchange server"</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 titles and directors of the films were never presented in China? SQL Table Create Statement: CREATE TABLE film (title VARCHAR, director VARCHAR, film_id VARCHAR, country VARCHAR); CREATE TABLE market (Market_ID VARCHAR); CREATE TABLE film_market_estimation (market_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT title, director FROM film WHERE NOT film_id IN (SELECT film_id FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.market_id = T2.Market_ID WHERE country = 'China')</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 role code with the largest number of employees? SQL Table Create Statement: CREATE TABLE Employees (role_code VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT role_code FROM Employees GROUP BY role_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|>What is the alpha 2 code for the area also known as NZL? SQL Table Create Statement: CREATE TABLE table_222771_1 (alpha_2_code VARCHAR, alpha_3_code VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT alpha_2_code FROM table_222771_1 WHERE alpha_3_code = "NZL"</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 ids of all employees who have either destroyed a document or made an authorization to do this. SQL Table Create Statement: CREATE TABLE Documents_to_be_destroyed (Destroyed_by_Employee_ID VARCHAR, Destruction_Authorised_by_Employee_ID VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed</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 clubs does "Linda Smith" belong to? SQL Table Create Statement: CREATE TABLE student (stuid VARCHAR, fname VARCHAR, lname VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubid VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = "Linda" AND t3.lname = "Smith"</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 outcome on March 20, 1994? SQL Table Create Statement: CREATE TABLE table_name_89 (outcome VARCHAR, date VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT outcome FROM table_name_89 WHERE date = "march 20, 1994"</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 all the clubs that have at least a member from the city with city code "BAL". SQL Table Create Statement: CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR); CREATE TABLE student (stuid VARCHAR, city_code VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = "BAL"</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 grant amount of the organisations described as research? SQL Table Create Statement: CREATE TABLE organisation_Types (organisation_type VARCHAR, organisation_type_description VARCHAR); CREATE TABLE Grants (organisation_id VARCHAR); CREATE TABLE Organisations (organisation_id VARCHAR, organisation_type VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT SUM(grant_amount) FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id JOIN organisation_Types AS T3 ON T2.organisation_type = T3.organisation_type WHERE T3.organisation_type_description = 'Research'</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 task details, task id and project id for the projects which are detailed as 'omnis' or have more than 2 outcomes? SQL Table Create Statement: CREATE TABLE Projects (project_id VARCHAR, project_details VARCHAR); CREATE TABLE Project_outcomes (project_id VARCHAR); CREATE TABLE Tasks (task_details VARCHAR, task_id VARCHAR, project_id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.task_details, T1.task_id, T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'omnis' UNION SELECT T1.task_details, T1.task_id, T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.project_id HAVING COUNT(*) > 2</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 document type is described with the prefix 'Initial'? SQL Table Create Statement: CREATE TABLE Document_Types (document_type_code VARCHAR, document_description VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT document_type_code FROM Document_Types WHERE document_description LIKE 'Initial%'</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 descriptions of all the project outcomes? SQL Table Create Statement: CREATE TABLE Research_outcomes (outcome_description VARCHAR, outcome_code VARCHAR); CREATE TABLE Project_outcomes (outcome_code VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_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|>Find the name of the person who has friends with age above 40 and under age 30? SQL Table Create Statement: CREATE TABLE Person (name VARCHAR, age INTEGER); CREATE TABLE PersonFriend (name VARCHAR, friend VARCHAR); CREATE TABLE Person (name VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age > 40) INTERSECT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age < 30)</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 has friends that are older than the average age? Print their friends and their ages as well SQL Table Create Statement: CREATE TABLE person (age INTEGER); CREATE TABLE PersonFriend (name VARCHAR, friend VARCHAR); CREATE TABLE Person (age INTEGER, name VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT DISTINCT T2.name, T2.friend, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age > (SELECT AVG(age) FROM person)</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 nominated work, nominated for the drama league award before 2007? SQL Table Create Statement: CREATE TABLE table_name_29 (nominated_work VARCHAR, year VARCHAR, result VARCHAR, award VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT nominated_work FROM table_name_29 WHERE result = "nominated" AND award = "drama league award" AND year < 2007</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 structure of the document with the least number of accesses? SQL Table Create Statement: CREATE TABLE document_structures (document_structure_description VARCHAR, document_structure_code VARCHAR); CREATE TABLE documents (document_structure_code VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT t2.document_structure_description FROM documents AS t1 JOIN document_structures AS t2 ON t1.document_structure_code = t2.document_structure_code GROUP BY t1.document_structure_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|>How many reasons for change were listed when Edward Hempstead was the successor? SQL Table Create Statement: CREATE TABLE table_225095_4 (reason_for_change VARCHAR, successor VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT COUNT(reason_for_change) FROM table_225095_4 WHERE successor = "Edward Hempstead"</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 race caller for jim mckay and howard cosell and eddie arcaro SQL Table Create Statement: CREATE TABLE table_22514845_5 (race_caller VARCHAR, s_analyst VARCHAR, trophy_presentation VARCHAR, reporters VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT race_caller FROM table_22514845_5 WHERE trophy_presentation = "Jim McKay and Howard Cosell" AND reporters = "Howard Cosell" AND s_analyst = "Eddie Arcaro"</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 names of products that are in at least two events in ascending alphabetical order of product name. SQL Table Create Statement: CREATE TABLE Products (Product_Name VARCHAR, Product_ID VARCHAR); CREATE TABLE Products_in_Events (Product_ID VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T1.Product_Name FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name HAVING COUNT(*) >= 2 ORDER BY T1.Product_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|>What is the name of the host nations if the winner was Hong Kong 207/6 (47.1 overs)? SQL Table Create Statement: CREATE TABLE table_22577693_1 (host_nation_s_ VARCHAR, winner VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT host_nation_s_ FROM table_22577693_1 WHERE winner = "Hong Kong 207/6 (47.1 overs)"</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 Release date has a Category of utilities, a Developer of microsoft, and a Title of chord finder? SQL Table Create Statement: CREATE TABLE table_name_86 (release_date VARCHAR, title VARCHAR, category VARCHAR, developer VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT release_date FROM table_name_86 WHERE category = "utilities" AND developer = "microsoft" AND title = "chord finder"</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 address type codes for all customer addresses? SQL Table Create Statement: CREATE TABLE customer_addresses (address_type_code VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT DISTINCT address_type_code FROM customer_addresses</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|>If the race time is 2:00:33, what is the average speed? SQL Table Create Statement: CREATE TABLE table_2260452_1 (average_speed__mph_ VARCHAR, race_time VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT average_speed__mph_ FROM table_2260452_1 WHERE race_time = "2:00:33"</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 first and last names of the instructors who teach the top 3 number of courses? SQL Table Create Statement: CREATE TABLE COURSE (Instructor VARCHAR); CREATE TABLE FACULTY (Fname VARCHAR, Lname VARCHAR, FacID VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T2.Fname, T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID GROUP BY T1.Instructor ORDER BY COUNT(*) DESC LIMIT 3</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 first names and last names of the students that minor in the department with DNO 140. SQL Table Create Statement: CREATE TABLE STUDENT (Fname VARCHAR, Lname VARCHAR, StuID VARCHAR); CREATE TABLE MINOR_IN (StuID VARCHAR, DNO VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT T2.Fname, T2.Lname FROM MINOR_IN AS T1 JOIN STUDENT AS T2 ON T1.StuID = T2.StuID WHERE T1.DNO = 140</codeend><|end|>