text
stringlengths
380
1.33k
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the name of physicians whose position title contains the word 'senior'. ### Context: CREATE TABLE physician (name VARCHAR, POSITION VARCHAR) [/INST] ### Response: SELECT name FROM physician WHERE POSITION LIKE '%senior%' </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the patient who has the most recent undergoing treatment? ### Context: CREATE TABLE undergoes (patient VARCHAR, dateundergoes VARCHAR) [/INST] ### Response: SELECT patient FROM undergoes ORDER BY dateundergoes LIMIT 1 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the names of all patients who have an undergoing treatment and are staying in room 111. ### Context: CREATE TABLE undergoes (patient VARCHAR, Stay VARCHAR); CREATE TABLE stay (StayID VARCHAR, room VARCHAR); CREATE TABLE patient (name VARCHAR, SSN VARCHAR) [/INST] ### Response: SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN patient AS T2 ON T1.patient = T2.SSN JOIN stay AS T3 ON T1.Stay = T3.StayID WHERE T3.room = 111 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: List the names of all distinct nurses ordered by alphabetical order? ### Context: CREATE TABLE nurse (name VARCHAR) [/INST] ### Response: SELECT DISTINCT name FROM nurse ORDER BY name </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the names of nurses who are nursing an undergoing treatment. ### Context: CREATE TABLE undergoes (AssistingNurse VARCHAR); CREATE TABLE nurse (name VARCHAR, EmployeeID VARCHAR) [/INST] ### Response: SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN nurse AS T2 ON T1.AssistingNurse = T2.EmployeeID </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: List the names of all distinct medications, ordered in an alphabetical order. ### Context: CREATE TABLE medication (name VARCHAR) [/INST] ### Response: SELECT DISTINCT name FROM medication ORDER BY name </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: What are the names of the physician who prescribed the highest dose? ### Context: CREATE TABLE prescribes (physician VARCHAR, dose VARCHAR); CREATE TABLE physician (name VARCHAR, employeeid VARCHAR) [/INST] ### Response: SELECT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician ORDER BY T2.dose DESC LIMIT 1 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: List the physicians' employee ids together with their primary affiliation departments' ids. ### Context: CREATE TABLE affiliated_with (physician VARCHAR, department VARCHAR, primaryaffiliation VARCHAR) [/INST] ### Response: SELECT physician, department FROM affiliated_with WHERE primaryaffiliation = 1 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: List the names of departments where some physicians are primarily affiliated with. ### Context: CREATE TABLE affiliated_with (department VARCHAR); CREATE TABLE department (name VARCHAR, departmentid VARCHAR) [/INST] ### Response: SELECT DISTINCT T2.name FROM affiliated_with AS T1 JOIN department AS T2 ON T1.department = T2.departmentid WHERE PrimaryAffiliation = 1 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: What nurses are on call with block floor 1 and block code 1? Tell me their names. ### Context: CREATE TABLE on_call (nurse VARCHAR, blockfloor VARCHAR, blockcode VARCHAR) [/INST] ### Response: SELECT nurse FROM on_call WHERE blockfloor = 1 AND blockcode = 1 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: What are the highest cost, lowest cost and average cost of procedures? ### Context: CREATE TABLE procedures (cost INTEGER) [/INST] ### Response: SELECT MAX(cost), MIN(cost), AVG(cost) FROM procedures </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: List the name and cost of all procedures sorted by the cost from the highest to the lowest. ### Context: CREATE TABLE procedures (name VARCHAR, cost VARCHAR) [/INST] ### Response: SELECT name, cost FROM procedures ORDER BY cost DESC </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the three most expensive procedures. ### Context: CREATE TABLE procedures (name VARCHAR, cost VARCHAR) [/INST] ### Response: SELECT name FROM procedures ORDER BY cost LIMIT 3 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the physicians who are trained in a procedure that costs more than 5000. ### Context: CREATE TABLE trained_in (physician VARCHAR, treatment VARCHAR); CREATE TABLE physician (name VARCHAR, employeeid VARCHAR); CREATE TABLE procedures (code VARCHAR, cost INTEGER) [/INST] ### Response: 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 WHERE T3.cost > 5000 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the physician who was trained in the most expensive procedure? ### Context: CREATE TABLE trained_in (physician VARCHAR, treatment VARCHAR); CREATE TABLE physician (name VARCHAR, employeeid VARCHAR); CREATE TABLE procedures (code VARCHAR, cost VARCHAR) [/INST] ### Response: 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 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: What is the average cost of procedures that physician John Wen was trained in? ### Context: CREATE TABLE trained_in (physician VARCHAR, treatment VARCHAR); CREATE TABLE procedures (cost INTEGER, code VARCHAR); CREATE TABLE physician (employeeid VARCHAR, name VARCHAR) [/INST] ### Response: SELECT AVG(T3.cost) FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = "John Wen" </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the names of procedures which physician John Wen was trained in. ### Context: CREATE TABLE trained_in (physician VARCHAR, treatment VARCHAR); CREATE TABLE physician (employeeid VARCHAR, name VARCHAR); CREATE TABLE procedures (name VARCHAR, code VARCHAR) [/INST] ### Response: SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = "John Wen" </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find all procedures which cost more than 1000 or which physician John Wen was trained in. ### Context: CREATE TABLE trained_in (physician VARCHAR, treatment VARCHAR); CREATE TABLE procedures (name VARCHAR, cost INTEGER); CREATE TABLE physician (employeeid VARCHAR, name VARCHAR); CREATE TABLE procedures (name VARCHAR, code VARCHAR) [/INST] ### Response: SELECT name FROM procedures WHERE cost > 1000 UNION SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = "John Wen" </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the names of all procedures which cost more than 1000 but which physician John Wen was not trained in? ### Context: CREATE TABLE trained_in (physician VARCHAR, treatment VARCHAR); CREATE TABLE procedures (name VARCHAR, cost INTEGER); CREATE TABLE physician (employeeid VARCHAR, name VARCHAR); CREATE TABLE procedures (name VARCHAR, code VARCHAR) [/INST] ### Response: SELECT name FROM procedures WHERE cost > 1000 EXCEPT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = "John Wen" </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the names of all procedures such that the cost is less than 5000 and physician John Wen was trained in. ### Context: CREATE TABLE trained_in (physician VARCHAR, treatment VARCHAR); CREATE TABLE procedures (name VARCHAR, cost INTEGER); CREATE TABLE physician (employeeid VARCHAR, name VARCHAR); CREATE TABLE procedures (name VARCHAR, code VARCHAR) [/INST] ### Response: SELECT name FROM procedures WHERE cost < 5000 INTERSECT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = "John Wen" </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the name of physicians who are affiliated with both Surgery and Psychiatry departments. ### Context: CREATE TABLE affiliated_with (physician VARCHAR, department VARCHAR); CREATE TABLE department (DepartmentID VARCHAR, name VARCHAR); CREATE TABLE physician (name VARCHAR, EmployeeID VARCHAR) [/INST] ### Response: SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' INTERSECT SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Psychiatry' </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the name of physicians who are affiliated with Surgery or Psychiatry department. ### Context: CREATE TABLE affiliated_with (physician VARCHAR, department VARCHAR); CREATE TABLE department (DepartmentID VARCHAR, name VARCHAR); CREATE TABLE physician (name VARCHAR, EmployeeID VARCHAR) [/INST] ### Response: SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' OR T3.name = 'Psychiatry' </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the names of patients who are not using the medication of Procrastin-X. ### Context: 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) [/INST] ### Response: 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' </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the number of patients who are not using the medication of Procrastin-X. ### Context: CREATE TABLE Prescribes (patient VARCHAR, Medication VARCHAR); CREATE TABLE patient (SSN VARCHAR); CREATE TABLE Medication (Code VARCHAR, name VARCHAR) [/INST] ### Response: SELECT COUNT(*) FROM patient WHERE NOT SSN IN (SELECT T1.patient FROM Prescribes AS T1 JOIN Medication AS T2 ON T1.Medication = T2.Code WHERE T2.name = 'Procrastin-X') </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: How many appointments are there? ### Context: CREATE TABLE appointment (Id VARCHAR) [/INST] ### Response: SELECT COUNT(*) FROM appointment </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the names of nurses who are on call. ### Context: CREATE TABLE on_call (nurse VARCHAR); CREATE TABLE nurse (name VARCHAR, EmployeeID VARCHAR) [/INST] ### Response: SELECT DISTINCT T1.name FROM nurse AS T1 JOIN on_call AS T2 ON T1.EmployeeID = T2.nurse </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: How many ships are there? ### Context: CREATE TABLE ship (Id VARCHAR) [/INST] ### Response: SELECT COUNT(*) FROM ship </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: List the name of ships in ascending order of tonnage. ### Context: CREATE TABLE ship (Name VARCHAR, Tonnage VARCHAR) [/INST] ### Response: SELECT Name FROM ship ORDER BY Tonnage </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: What are the type and nationality of ships? ### Context: CREATE TABLE ship (TYPE VARCHAR, Nationality VARCHAR) [/INST] ### Response: SELECT TYPE, Nationality FROM ship </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: List the name of ships whose nationality is not "United States". ### Context: CREATE TABLE ship (Name VARCHAR, Nationality VARCHAR) [/INST] ### Response: SELECT Name FROM ship WHERE Nationality <> "United States" </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Show the name of ships whose nationality is either United States or United Kingdom. ### Context: CREATE TABLE ship (Name VARCHAR, Nationality VARCHAR) [/INST] ### Response: SELECT Name FROM ship WHERE Nationality = "United States" OR Nationality = "United Kingdom" </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: What is the name of the ship with the largest tonnage? ### Context: CREATE TABLE ship (Name VARCHAR, Tonnage VARCHAR) [/INST] ### Response: SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Show different types of ships and the number of ships of each type. ### Context: CREATE TABLE ship (TYPE VARCHAR) [/INST] ### Response: SELECT TYPE, COUNT(*) FROM ship GROUP BY TYPE </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Please show the most common type of ships. ### Context: CREATE TABLE ship (TYPE VARCHAR) [/INST] ### Response: SELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: List the nations that have more than two ships. ### Context: CREATE TABLE ship (Nationality VARCHAR) [/INST] ### Response: SELECT Nationality FROM ship GROUP BY Nationality HAVING COUNT(*) > 2 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Show different types of ships and the average tonnage of ships of each type. ### Context: CREATE TABLE ship (TYPE VARCHAR, Tonnage INTEGER) [/INST] ### Response: SELECT TYPE, AVG(Tonnage) FROM ship GROUP BY TYPE </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Show codes and fates of missions, and names of ships involved. ### Context: CREATE TABLE mission (Code VARCHAR, Fate VARCHAR, Ship_ID VARCHAR); CREATE TABLE ship (Name VARCHAR, Ship_ID VARCHAR) [/INST] ### Response: SELECT T1.Code, T1.Fate, T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Show names of ships involved in a mission launched after 1928. ### Context: CREATE TABLE mission (Ship_ID VARCHAR, Launched_Year INTEGER); CREATE TABLE ship (Name VARCHAR, Ship_ID VARCHAR) [/INST] ### Response: SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T1.Launched_Year > 1928 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Show the distinct fate of missions that involve ships with nationality "United States" ### Context: CREATE TABLE mission (Fate VARCHAR, Ship_ID VARCHAR); CREATE TABLE ship (Ship_ID VARCHAR, Nationality VARCHAR) [/INST] ### Response: SELECT DISTINCT T1.Fate FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T2.Nationality = "United States" </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: List the name of ships that are not involved in any mission ### Context: CREATE TABLE mission (Name VARCHAR, Ship_ID VARCHAR); CREATE TABLE ship (Name VARCHAR, Ship_ID VARCHAR) [/INST] ### Response: SELECT Name FROM ship WHERE NOT Ship_ID IN (SELECT Ship_ID FROM mission) </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Show the types of ships that have both ships with tonnage larger than 6000 and ships with tonnage smaller than 4000. ### Context: CREATE TABLE ship (TYPE VARCHAR, Tonnage INTEGER) [/INST] ### Response: SELECT TYPE FROM ship WHERE Tonnage > 6000 INTERSECT SELECT TYPE FROM ship WHERE Tonnage < 4000 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the number of students in total. ### Context: CREATE TABLE list (Id VARCHAR) [/INST] ### Response: SELECT COUNT(*) FROM list </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the last names of students studying in room 111. ### Context: CREATE TABLE list (lastname VARCHAR, classroom VARCHAR) [/INST] ### Response: SELECT lastname FROM list WHERE classroom = 111 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the first names of students studying in room 108. ### Context: CREATE TABLE list (firstname VARCHAR, classroom VARCHAR) [/INST] ### Response: SELECT firstname FROM list WHERE classroom = 108 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: What are the first names of students studying in room 107? ### Context: CREATE TABLE list (firstname VARCHAR, classroom VARCHAR) [/INST] ### Response: SELECT DISTINCT firstname FROM list WHERE classroom = 107 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: For each classroom report the grade that is taught in it. Report just the classroom number and the grade number. ### Context: CREATE TABLE list (classroom VARCHAR, grade VARCHAR) [/INST] ### Response: SELECT DISTINCT classroom, grade FROM list </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Which grade is studying in classroom 103? ### Context: CREATE TABLE list (grade VARCHAR, classroom VARCHAR) [/INST] ### Response: SELECT DISTINCT grade FROM list WHERE classroom = 103 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the grade studying in room 105. ### Context: CREATE TABLE list (grade VARCHAR, classroom VARCHAR) [/INST] ### Response: SELECT DISTINCT grade FROM list WHERE classroom = 105 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Which classrooms are used by grade 4? ### Context: CREATE TABLE list (classroom VARCHAR, grade VARCHAR) [/INST] ### Response: SELECT DISTINCT classroom FROM list WHERE grade = 4 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Which classrooms are used by grade 5? ### Context: CREATE TABLE list (classroom VARCHAR, grade VARCHAR) [/INST] ### Response: SELECT DISTINCT classroom FROM list WHERE grade = 5 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the last names of the teachers that teach fifth grade. ### Context: CREATE TABLE list (classroom VARCHAR); CREATE TABLE teachers (lastname VARCHAR, classroom VARCHAR) [/INST] ### Response: SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 5 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the first names of the teachers that teach first grade. ### Context: CREATE TABLE list (classroom VARCHAR); CREATE TABLE teachers (firstname VARCHAR, classroom VARCHAR) [/INST] ### Response: SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 1 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the first names of all the teachers that teach in classroom 110. ### Context: CREATE TABLE teachers (firstname VARCHAR, classroom VARCHAR) [/INST] ### Response: SELECT firstname FROM teachers WHERE classroom = 110 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the last names of teachers teaching in classroom 109. ### Context: CREATE TABLE teachers (lastname VARCHAR, classroom VARCHAR) [/INST] ### Response: SELECT lastname FROM teachers WHERE classroom = 109 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Report the first name and last name of all the teachers. ### Context: CREATE TABLE teachers (firstname VARCHAR, lastname VARCHAR) [/INST] ### Response: SELECT DISTINCT firstname, lastname FROM teachers </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Report the first name and last name of all the students. ### Context: CREATE TABLE list (firstname VARCHAR, lastname VARCHAR) [/INST] ### Response: SELECT DISTINCT firstname, lastname FROM list </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find all students taught by OTHA MOYER. Output the first and last names of the students. ### Context: CREATE TABLE list (firstname VARCHAR, lastname VARCHAR, classroom VARCHAR); CREATE TABLE teachers (classroom VARCHAR, firstname VARCHAR, lastname VARCHAR) [/INST] ### Response: 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" </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find all students taught by MARROTTE KIRK. Output first and last names of students. ### Context: CREATE TABLE list (firstname VARCHAR, lastname VARCHAR, classroom VARCHAR); CREATE TABLE teachers (classroom VARCHAR, firstname VARCHAR, lastname VARCHAR) [/INST] ### Response: SELECT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "MARROTTE" AND T2.lastname = "KIRK" </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the first and last name of all the teachers that teach EVELINA BROMLEY. ### Context: CREATE TABLE teachers (firstname VARCHAR, lastname VARCHAR, classroom VARCHAR); CREATE TABLE list (classroom VARCHAR, firstname VARCHAR, lastname VARCHAR) [/INST] ### Response: SELECT T2.firstname, T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "EVELINA" AND T1.lastname = "BROMLEY" </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the last names of all the teachers that teach GELL TAMI. ### Context: CREATE TABLE teachers (lastname VARCHAR, classroom VARCHAR); CREATE TABLE list (classroom VARCHAR, firstname VARCHAR, lastname VARCHAR) [/INST] ### Response: SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "GELL" AND T1.lastname = "TAMI" </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: How many students does LORIA ONDERSMA teaches? ### Context: CREATE TABLE list (classroom VARCHAR); CREATE TABLE teachers (classroom VARCHAR, firstname VARCHAR, lastname VARCHAR) [/INST] ### Response: SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "LORIA" AND T2.lastname = "ONDERSMA" </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: How many students does KAWA GORDON teaches? ### Context: CREATE TABLE list (classroom VARCHAR); CREATE TABLE teachers (classroom VARCHAR, firstname VARCHAR, lastname VARCHAR) [/INST] ### Response: SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "KAWA" AND T2.lastname = "GORDON" </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the number of students taught by TARRING LEIA. ### Context: CREATE TABLE list (classroom VARCHAR); CREATE TABLE teachers (classroom VARCHAR, firstname VARCHAR, lastname VARCHAR) [/INST] ### Response: SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "TARRING" AND T2.lastname = "LEIA" </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: How many teachers does the student named CHRISSY NABOZNY have? ### Context: CREATE TABLE teachers (classroom VARCHAR); CREATE TABLE list (classroom VARCHAR, firstname VARCHAR, lastname VARCHAR) [/INST] ### Response: SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "CHRISSY" AND T1.lastname = "NABOZNY" </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: How many teachers does the student named MADLOCK RAY have? ### Context: CREATE TABLE teachers (classroom VARCHAR); CREATE TABLE list (classroom VARCHAR, firstname VARCHAR, lastname VARCHAR) [/INST] ### Response: SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "MADLOCK" AND T1.lastname = "RAY" </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find all first-grade students who are NOT taught by OTHA MOYER. Report their first and last names. ### Context: CREATE TABLE list (firstname VARCHAR, lastname VARCHAR, classroom VARCHAR, grade VARCHAR); CREATE TABLE teachers (classroom VARCHAR, firstname VARCHAR, lastname VARCHAR) [/INST] ### Response: 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" </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the last names of the students in third grade that are not taught by COVIN JEROME. ### Context: CREATE TABLE list (lastname VARCHAR, classroom VARCHAR, grade VARCHAR); CREATE TABLE teachers (classroom VARCHAR, lastname VARCHAR, firstname VARCHAR) [/INST] ### Response: SELECT DISTINCT T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 3 AND T2.firstname <> "COVIN" AND T2.lastname <> "JEROME" </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: For each grade, report the grade, the number of classrooms in which it is taught and the total number of students in the grade. ### Context: CREATE TABLE list (grade VARCHAR, classroom VARCHAR) [/INST] ### Response: SELECT grade, COUNT(DISTINCT classroom), COUNT(*) FROM list GROUP BY grade </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: For each classroom, report the classroom number and the number of grades using it. ### Context: CREATE TABLE list (classroom VARCHAR, grade VARCHAR) [/INST] ### Response: SELECT classroom, COUNT(DISTINCT grade) FROM list GROUP BY classroom </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Which classroom has the most students? ### Context: CREATE TABLE list (classroom VARCHAR) [/INST] ### Response: SELECT classroom FROM list GROUP BY classroom ORDER BY COUNT(*) DESC LIMIT 1 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Report the number of students in each classroom. ### Context: CREATE TABLE list (classroom VARCHAR) [/INST] ### Response: SELECT classroom, COUNT(*) FROM list GROUP BY classroom </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: For each grade 0 classroom, report the total number of students. ### Context: CREATE TABLE list (classroom VARCHAR, grade VARCHAR) [/INST] ### Response: SELECT classroom, COUNT(*) FROM list WHERE grade = "0" GROUP BY classroom </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Report the total number of students for each fourth-grade classroom. ### Context: CREATE TABLE list (classroom VARCHAR, grade VARCHAR) [/INST] ### Response: SELECT classroom, COUNT(*) FROM list WHERE grade = "4" GROUP BY classroom </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the name of the teacher who teaches the largest number of students. ### Context: CREATE TABLE list (classroom VARCHAR); CREATE TABLE teachers (firstname VARCHAR, lastname VARCHAR, classroom VARCHAR) [/INST] ### Response: SELECT T2.firstname, T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom GROUP BY T2.firstname, T2.lastname ORDER BY COUNT(*) DESC LIMIT 1 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Find the number of students in one classroom. ### Context: CREATE TABLE list (classroom VARCHAR) [/INST] ### Response: SELECT COUNT(*), classroom FROM list GROUP BY classroom </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: How many companies are headquartered in the US? ### Context: CREATE TABLE company (Headquarters VARCHAR) [/INST] ### Response: SELECT COUNT(*) FROM company WHERE Headquarters = 'USA' </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: List the names of companies by ascending number of sales. ### Context: CREATE TABLE company (Name VARCHAR, Sales_in_Billion VARCHAR) [/INST] ### Response: SELECT Name FROM company ORDER BY Sales_in_Billion </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: What are the headquarters and industries of all companies? ### Context: CREATE TABLE company (Headquarters VARCHAR, Industry VARCHAR) [/INST] ### Response: SELECT Headquarters, Industry FROM company </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Show the names of companies in the banking or retailing industry? ### Context: CREATE TABLE company (Name VARCHAR, Industry VARCHAR) [/INST] ### Response: SELECT Name FROM company WHERE Industry = "Banking" OR Industry = "Retailing" </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: What is the maximum and minimum market value of companies? ### Context: CREATE TABLE company (Market_Value_in_Billion INTEGER) [/INST] ### Response: SELECT MAX(Market_Value_in_Billion), MIN(Market_Value_in_Billion) FROM company </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: What is the headquarter of the company with the largest sales? ### Context: CREATE TABLE company (Headquarters VARCHAR, Sales_in_Billion VARCHAR) [/INST] ### Response: SELECT Headquarters FROM company ORDER BY Sales_in_Billion DESC LIMIT 1 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Show the different headquarters and number of companies at each headquarter. ### Context: CREATE TABLE company (Headquarters VARCHAR) [/INST] ### Response: SELECT Headquarters, COUNT(*) FROM company GROUP BY Headquarters </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Show the most common headquarter for companies. ### Context: CREATE TABLE company (Headquarters VARCHAR) [/INST] ### Response: SELECT Headquarters FROM company GROUP BY Headquarters ORDER BY COUNT(*) DESC LIMIT 1 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Show the headquarters that have at least two companies. ### Context: CREATE TABLE company (Headquarters VARCHAR) [/INST] ### Response: SELECT Headquarters FROM company GROUP BY Headquarters HAVING COUNT(*) >= 2 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Show the headquarters that have both companies in banking industry and companies in oil and gas industry. ### Context: CREATE TABLE company (Headquarters VARCHAR, Industry VARCHAR) [/INST] ### Response: SELECT Headquarters FROM company WHERE Industry = "Banking" INTERSECT SELECT Headquarters FROM company WHERE Industry = "Oil and gas" </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Show the names of companies and of employees. ### Context: CREATE TABLE company (Name VARCHAR, Company_ID VARCHAR); CREATE TABLE employment (People_ID VARCHAR, Company_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR) [/INST] ### Response: SELECT T3.Name, T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Show names of companies and that of employees in descending order of number of years working for that employee. ### Context: CREATE TABLE people (Name VARCHAR, People_ID VARCHAR); CREATE TABLE company (Name VARCHAR, Company_ID VARCHAR); CREATE TABLE employment (People_ID VARCHAR, Company_ID VARCHAR, Year_working VARCHAR) [/INST] ### Response: SELECT T3.Name, T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID ORDER BY T1.Year_working </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Show the names of employees that work for companies with sales bigger than 200. ### Context: CREATE TABLE employment (People_ID VARCHAR, Company_ID VARCHAR); CREATE TABLE company (Company_ID VARCHAR, Sales_in_Billion INTEGER); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR) [/INST] ### Response: SELECT T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID WHERE T3.Sales_in_Billion > 200 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: Show the names of companies and the number of employees they have ### Context: CREATE TABLE company (Name VARCHAR, Company_ID VARCHAR); CREATE TABLE people (People_ID VARCHAR); CREATE TABLE employment (People_ID VARCHAR, Company_ID VARCHAR) [/INST] ### Response: SELECT T3.Name, COUNT(*) FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID GROUP BY T3.Name </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: List the names of people that are not employed by any company ### Context: CREATE TABLE employment (Name VARCHAR, People_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR) [/INST] ### Response: SELECT Name FROM people WHERE NOT People_ID IN (SELECT People_ID FROM employment) </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: list the names of the companies with more than 200 sales in the descending order of sales and profits. ### Context: CREATE TABLE company (name VARCHAR, Sales_in_Billion INTEGER, Profits_in_Billion VARCHAR) [/INST] ### Response: SELECT name FROM company WHERE Sales_in_Billion > 200 ORDER BY Sales_in_Billion, Profits_in_Billion DESC </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: How many film are there? ### Context: CREATE TABLE film (Id VARCHAR) [/INST] ### Response: SELECT COUNT(*) FROM film </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: List the distinct director of all films. ### Context: CREATE TABLE film (Director VARCHAR) [/INST] ### Response: SELECT DISTINCT Director FROM film </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: What is the average ticket sales gross in dollars of films? ### Context: CREATE TABLE film (Gross_in_dollar INTEGER) [/INST] ### Response: SELECT AVG(Gross_in_dollar) FROM film </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: What are the low and high estimates of film markets? ### Context: CREATE TABLE film_market_estimation (Low_Estimate VARCHAR, High_Estimate VARCHAR) [/INST] ### Response: SELECT Low_Estimate, High_Estimate FROM film_market_estimation </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: What are the types of film market estimations in year 1995? ### Context: CREATE TABLE film_market_estimation (TYPE VARCHAR, YEAR VARCHAR) [/INST] ### Response: SELECT TYPE FROM film_market_estimation WHERE YEAR = 1995 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: What are the maximum and minimum number of cities in all markets. ### Context: CREATE TABLE market (Number_cities INTEGER) [/INST] ### Response: SELECT MAX(Number_cities), MIN(Number_cities) FROM market </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: How many markets have number of cities smaller than 300? ### Context: CREATE TABLE market (Number_cities INTEGER) [/INST] ### Response: SELECT COUNT(*) FROM market WHERE Number_cities < 300 </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: List all countries of markets in ascending alphabetical order. ### Context: CREATE TABLE market (Country VARCHAR) [/INST] ### Response: SELECT Country FROM market ORDER BY Country </s>
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>> ### Input: List all countries of markets in descending order of number of cities. ### Context: CREATE TABLE market (Country VARCHAR, Number_cities VARCHAR) [/INST] ### Response: SELECT Country FROM market ORDER BY Number_cities DESC </s>