phi3-text-to-sql-studio / data /test_dataset.jsonl
Bhuvandesai's picture
initial deployment
55159b1
Raw
History Blame Contribute Delete
16.5 kB
{"messages": [{"role": "user", "content": "You are a Text-to-SQL generator. Given a database schema and a natural language question, write a valid SQLite query that answers the question. Do not explain the query, just output the raw SQL.\n\nDatabase Schema:\nTable departments:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL, UNIQUE, e.g., 'Sales', 'Engineering', etc.)\n - manager_id: INTEGER (references employees.id)\n\nTable employees:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL)\n - department_id: INTEGER (references departments.id)\n - salary: INTEGER (NOT NULL)\n - hire_date: TEXT (NOT NULL, YYYY-MM-DD)\n - manager_id: INTEGER (references employees.id)\n\nTable products:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL, UNIQUE, e.g., 'Enterprise CRM')\n - category: TEXT (NOT NULL, e.g., 'Software', 'Hardware', 'Cloud')\n - price: REAL (NOT NULL)\n\nTable sales:\n - id: INTEGER (PRIMARY KEY)\n - employee_id: INTEGER (NOT NULL, references employees.id)\n - product_id: INTEGER (NOT NULL, references products.id)\n - amount: REAL (NOT NULL)\n - quantity: INTEGER (NOT NULL)\n - sale_date: TEXT (NOT NULL, YYYY-MM-DD)\n\nQuestion: List all employees in department 1."}, {"role": "assistant", "content": "SELECT * FROM employees WHERE department_id = 1;"}]}
{"messages": [{"role": "user", "content": "You are a Text-to-SQL generator. Given a database schema and a natural language question, write a valid SQLite query that answers the question. Do not explain the query, just output the raw SQL.\n\nDatabase Schema:\nTable departments:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL, UNIQUE, e.g., 'Sales', 'Engineering', etc.)\n - manager_id: INTEGER (references employees.id)\n\nTable employees:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL)\n - department_id: INTEGER (references departments.id)\n - salary: INTEGER (NOT NULL)\n - hire_date: TEXT (NOT NULL, YYYY-MM-DD)\n - manager_id: INTEGER (references employees.id)\n\nTable products:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL, UNIQUE, e.g., 'Enterprise CRM')\n - category: TEXT (NOT NULL, e.g., 'Software', 'Hardware', 'Cloud')\n - price: REAL (NOT NULL)\n\nTable sales:\n - id: INTEGER (PRIMARY KEY)\n - employee_id: INTEGER (NOT NULL, references employees.id)\n - product_id: INTEGER (NOT NULL, references products.id)\n - amount: REAL (NOT NULL)\n - quantity: INTEGER (NOT NULL)\n - sale_date: TEXT (NOT NULL, YYYY-MM-DD)\n\nQuestion: Which software products cost less than 500 dollars?"}, {"role": "assistant", "content": "SELECT * FROM products WHERE category = 'Software' AND price < 500;"}]}
{"messages": [{"role": "user", "content": "You are a Text-to-SQL generator. Given a database schema and a natural language question, write a valid SQLite query that answers the question. Do not explain the query, just output the raw SQL.\n\nDatabase Schema:\nTable departments:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL, UNIQUE, e.g., 'Sales', 'Engineering', etc.)\n - manager_id: INTEGER (references employees.id)\n\nTable employees:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL)\n - department_id: INTEGER (references departments.id)\n - salary: INTEGER (NOT NULL)\n - hire_date: TEXT (NOT NULL, YYYY-MM-DD)\n - manager_id: INTEGER (references employees.id)\n\nTable products:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL, UNIQUE, e.g., 'Enterprise CRM')\n - category: TEXT (NOT NULL, e.g., 'Software', 'Hardware', 'Cloud')\n - price: REAL (NOT NULL)\n\nTable sales:\n - id: INTEGER (PRIMARY KEY)\n - employee_id: INTEGER (NOT NULL, references employees.id)\n - product_id: INTEGER (NOT NULL, references products.id)\n - amount: REAL (NOT NULL)\n - quantity: INTEGER (NOT NULL)\n - sale_date: TEXT (NOT NULL, YYYY-MM-DD)\n\nQuestion: How many departments do not have a manager?"}, {"role": "assistant", "content": "SELECT COUNT(*) FROM departments WHERE manager_id IS NULL;"}]}
{"messages": [{"role": "user", "content": "You are a Text-to-SQL generator. Given a database schema and a natural language question, write a valid SQLite query that answers the question. Do not explain the query, just output the raw SQL.\n\nDatabase Schema:\nTable departments:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL, UNIQUE, e.g., 'Sales', 'Engineering', etc.)\n - manager_id: INTEGER (references employees.id)\n\nTable employees:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL)\n - department_id: INTEGER (references departments.id)\n - salary: INTEGER (NOT NULL)\n - hire_date: TEXT (NOT NULL, YYYY-MM-DD)\n - manager_id: INTEGER (references employees.id)\n\nTable products:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL, UNIQUE, e.g., 'Enterprise CRM')\n - category: TEXT (NOT NULL, e.g., 'Software', 'Hardware', 'Cloud')\n - price: REAL (NOT NULL)\n\nTable sales:\n - id: INTEGER (PRIMARY KEY)\n - employee_id: INTEGER (NOT NULL, references employees.id)\n - product_id: INTEGER (NOT NULL, references products.id)\n - amount: REAL (NOT NULL)\n - quantity: INTEGER (NOT NULL)\n - sale_date: TEXT (NOT NULL, YYYY-MM-DD)\n\nQuestion: Find the total salary budget for the Engineering department."}, {"role": "assistant", "content": "SELECT SUM(e.salary) FROM employees e JOIN departments d ON e.department_id = d.id WHERE d.name = 'Engineering';"}]}
{"messages": [{"role": "user", "content": "You are a Text-to-SQL generator. Given a database schema and a natural language question, write a valid SQLite query that answers the question. Do not explain the query, just output the raw SQL.\n\nDatabase Schema:\nTable departments:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL, UNIQUE, e.g., 'Sales', 'Engineering', etc.)\n - manager_id: INTEGER (references employees.id)\n\nTable employees:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL)\n - department_id: INTEGER (references departments.id)\n - salary: INTEGER (NOT NULL)\n - hire_date: TEXT (NOT NULL, YYYY-MM-DD)\n - manager_id: INTEGER (references employees.id)\n\nTable products:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL, UNIQUE, e.g., 'Enterprise CRM')\n - category: TEXT (NOT NULL, e.g., 'Software', 'Hardware', 'Cloud')\n - price: REAL (NOT NULL)\n\nTable sales:\n - id: INTEGER (PRIMARY KEY)\n - employee_id: INTEGER (NOT NULL, references employees.id)\n - product_id: INTEGER (NOT NULL, references products.id)\n - amount: REAL (NOT NULL)\n - quantity: INTEGER (NOT NULL)\n - sale_date: TEXT (NOT NULL, YYYY-MM-DD)\n\nQuestion: What is the total quantity of CRM products sold in 2024?"}, {"role": "assistant", "content": "SELECT SUM(s.quantity) FROM sales s JOIN products p ON s.product_id = p.id WHERE p.name = 'Enterprise CRM' AND s.sale_date BETWEEN '2024-01-01' AND '2024-12-31';"}]}
{"messages": [{"role": "user", "content": "You are a Text-to-SQL generator. Given a database schema and a natural language question, write a valid SQLite query that answers the question. Do not explain the query, just output the raw SQL.\n\nDatabase Schema:\nTable departments:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL, UNIQUE, e.g., 'Sales', 'Engineering', etc.)\n - manager_id: INTEGER (references employees.id)\n\nTable employees:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL)\n - department_id: INTEGER (references departments.id)\n - salary: INTEGER (NOT NULL)\n - hire_date: TEXT (NOT NULL, YYYY-MM-DD)\n - manager_id: INTEGER (references employees.id)\n\nTable products:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL, UNIQUE, e.g., 'Enterprise CRM')\n - category: TEXT (NOT NULL, e.g., 'Software', 'Hardware', 'Cloud')\n - price: REAL (NOT NULL)\n\nTable sales:\n - id: INTEGER (PRIMARY KEY)\n - employee_id: INTEGER (NOT NULL, references employees.id)\n - product_id: INTEGER (NOT NULL, references products.id)\n - amount: REAL (NOT NULL)\n - quantity: INTEGER (NOT NULL)\n - sale_date: TEXT (NOT NULL, YYYY-MM-DD)\n\nQuestion: Show the employee with the highest salary in department 2."}, {"role": "assistant", "content": "SELECT name, salary FROM employees WHERE department_id = 2 ORDER BY salary DESC LIMIT 1;"}]}
{"messages": [{"role": "user", "content": "You are a Text-to-SQL generator. Given a database schema and a natural language question, write a valid SQLite query that answers the question. Do not explain the query, just output the raw SQL.\n\nDatabase Schema:\nTable departments:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL, UNIQUE, e.g., 'Sales', 'Engineering', etc.)\n - manager_id: INTEGER (references employees.id)\n\nTable employees:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL)\n - department_id: INTEGER (references departments.id)\n - salary: INTEGER (NOT NULL)\n - hire_date: TEXT (NOT NULL, YYYY-MM-DD)\n - manager_id: INTEGER (references employees.id)\n\nTable products:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL, UNIQUE, e.g., 'Enterprise CRM')\n - category: TEXT (NOT NULL, e.g., 'Software', 'Hardware', 'Cloud')\n - price: REAL (NOT NULL)\n\nTable sales:\n - id: INTEGER (PRIMARY KEY)\n - employee_id: INTEGER (NOT NULL, references employees.id)\n - product_id: INTEGER (NOT NULL, references products.id)\n - amount: REAL (NOT NULL)\n - quantity: INTEGER (NOT NULL)\n - sale_date: TEXT (NOT NULL, YYYY-MM-DD)\n\nQuestion: List employees who report directly to Alice Vance."}, {"role": "assistant", "content": "SELECT e.name FROM employees e JOIN employees m ON e.manager_id = m.id WHERE m.name = 'Alice Vance';"}]}
{"messages": [{"role": "user", "content": "You are a Text-to-SQL generator. Given a database schema and a natural language question, write a valid SQLite query that answers the question. Do not explain the query, just output the raw SQL.\n\nDatabase Schema:\nTable departments:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL, UNIQUE, e.g., 'Sales', 'Engineering', etc.)\n - manager_id: INTEGER (references employees.id)\n\nTable employees:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL)\n - department_id: INTEGER (references departments.id)\n - salary: INTEGER (NOT NULL)\n - hire_date: TEXT (NOT NULL, YYYY-MM-DD)\n - manager_id: INTEGER (references employees.id)\n\nTable products:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL, UNIQUE, e.g., 'Enterprise CRM')\n - category: TEXT (NOT NULL, e.g., 'Software', 'Hardware', 'Cloud')\n - price: REAL (NOT NULL)\n\nTable sales:\n - id: INTEGER (PRIMARY KEY)\n - employee_id: INTEGER (NOT NULL, references employees.id)\n - product_id: INTEGER (NOT NULL, references products.id)\n - amount: REAL (NOT NULL)\n - quantity: INTEGER (NOT NULL)\n - sale_date: TEXT (NOT NULL, YYYY-MM-DD)\n\nQuestion: Find the average sale amount for employee ID 9."}, {"role": "assistant", "content": "SELECT AVG(amount) FROM sales WHERE employee_id = 9;"}]}
{"messages": [{"role": "user", "content": "You are a Text-to-SQL generator. Given a database schema and a natural language question, write a valid SQLite query that answers the question. Do not explain the query, just output the raw SQL.\n\nDatabase Schema:\nTable departments:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL, UNIQUE, e.g., 'Sales', 'Engineering', etc.)\n - manager_id: INTEGER (references employees.id)\n\nTable employees:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL)\n - department_id: INTEGER (references departments.id)\n - salary: INTEGER (NOT NULL)\n - hire_date: TEXT (NOT NULL, YYYY-MM-DD)\n - manager_id: INTEGER (references employees.id)\n\nTable products:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL, UNIQUE, e.g., 'Enterprise CRM')\n - category: TEXT (NOT NULL, e.g., 'Software', 'Hardware', 'Cloud')\n - price: REAL (NOT NULL)\n\nTable sales:\n - id: INTEGER (PRIMARY KEY)\n - employee_id: INTEGER (NOT NULL, references employees.id)\n - product_id: INTEGER (NOT NULL, references products.id)\n - amount: REAL (NOT NULL)\n - quantity: INTEGER (NOT NULL)\n - sale_date: TEXT (NOT NULL, YYYY-MM-DD)\n\nQuestion: Find the total revenue generated from software category products."}, {"role": "assistant", "content": "SELECT SUM(s.amount) FROM sales s JOIN products p ON s.product_id = p.id WHERE p.category = 'Software';"}]}
{"messages": [{"role": "user", "content": "You are a Text-to-SQL generator. Given a database schema and a natural language question, write a valid SQLite query that answers the question. Do not explain the query, just output the raw SQL.\n\nDatabase Schema:\nTable departments:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL, UNIQUE, e.g., 'Sales', 'Engineering', etc.)\n - manager_id: INTEGER (references employees.id)\n\nTable employees:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL)\n - department_id: INTEGER (references departments.id)\n - salary: INTEGER (NOT NULL)\n - hire_date: TEXT (NOT NULL, YYYY-MM-DD)\n - manager_id: INTEGER (references employees.id)\n\nTable products:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL, UNIQUE, e.g., 'Enterprise CRM')\n - category: TEXT (NOT NULL, e.g., 'Software', 'Hardware', 'Cloud')\n - price: REAL (NOT NULL)\n\nTable sales:\n - id: INTEGER (PRIMARY KEY)\n - employee_id: INTEGER (NOT NULL, references employees.id)\n - product_id: INTEGER (NOT NULL, references products.id)\n - amount: REAL (NOT NULL)\n - quantity: INTEGER (NOT NULL)\n - sale_date: TEXT (NOT NULL, YYYY-MM-DD)\n\nQuestion: Which product has the lowest price?"}, {"role": "assistant", "content": "SELECT name, price FROM products ORDER BY price ASC LIMIT 1;"}]}
{"messages": [{"role": "user", "content": "You are a Text-to-SQL generator. Given a database schema and a natural language question, write a valid SQLite query that answers the question. Do not explain the query, just output the raw SQL.\n\nDatabase Schema:\nTable departments:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL, UNIQUE, e.g., 'Sales', 'Engineering', etc.)\n - manager_id: INTEGER (references employees.id)\n\nTable employees:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL)\n - department_id: INTEGER (references departments.id)\n - salary: INTEGER (NOT NULL)\n - hire_date: TEXT (NOT NULL, YYYY-MM-DD)\n - manager_id: INTEGER (references employees.id)\n\nTable products:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL, UNIQUE, e.g., 'Enterprise CRM')\n - category: TEXT (NOT NULL, e.g., 'Software', 'Hardware', 'Cloud')\n - price: REAL (NOT NULL)\n\nTable sales:\n - id: INTEGER (PRIMARY KEY)\n - employee_id: INTEGER (NOT NULL, references employees.id)\n - product_id: INTEGER (NOT NULL, references products.id)\n - amount: REAL (NOT NULL)\n - quantity: INTEGER (NOT NULL)\n - sale_date: TEXT (NOT NULL, YYYY-MM-DD)\n\nQuestion: Find the employee who generated the highest total revenue across all sales."}, {"role": "assistant", "content": "SELECT e.name, SUM(s.amount) AS total_revenue FROM employees e JOIN sales s ON e.id = s.employee_id GROUP BY e.name ORDER BY total_revenue DESC LIMIT 1;"}]}
{"messages": [{"role": "user", "content": "You are a Text-to-SQL generator. Given a database schema and a natural language question, write a valid SQLite query that answers the question. Do not explain the query, just output the raw SQL.\n\nDatabase Schema:\nTable departments:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL, UNIQUE, e.g., 'Sales', 'Engineering', etc.)\n - manager_id: INTEGER (references employees.id)\n\nTable employees:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL)\n - department_id: INTEGER (references departments.id)\n - salary: INTEGER (NOT NULL)\n - hire_date: TEXT (NOT NULL, YYYY-MM-DD)\n - manager_id: INTEGER (references employees.id)\n\nTable products:\n - id: INTEGER (PRIMARY KEY)\n - name: TEXT (NOT NULL, UNIQUE, e.g., 'Enterprise CRM')\n - category: TEXT (NOT NULL, e.g., 'Software', 'Hardware', 'Cloud')\n - price: REAL (NOT NULL)\n\nTable sales:\n - id: INTEGER (PRIMARY KEY)\n - employee_id: INTEGER (NOT NULL, references employees.id)\n - product_id: INTEGER (NOT NULL, references products.id)\n - amount: REAL (NOT NULL)\n - quantity: INTEGER (NOT NULL)\n - sale_date: TEXT (NOT NULL, YYYY-MM-DD)\n\nQuestion: List products sold in November 2024."}, {"role": "assistant", "content": "SELECT DISTINCT p.name FROM products p JOIN sales s ON p.id = s.product_id WHERE s.sale_date BETWEEN '2024-11-01' AND '2024-11-30';"}]}