schema
stringclasses 5
values | question
stringclasses 363
values | rejected
stringclasses 286
values | chosen
stringclasses 290
values |
---|---|---|---|
CREATE TABLE employees (name TEXT, age INTEGER, department TEXT) | Which employees received a bonus greater than 5000? | SELECT * FROM bonuses WHERE bonus_amount > 11000 | SELECT * FROM bonuses WHERE bonus_amount > 5000 |
CREATE TABLE projects (project_id INTEGER, project_name TEXT, start_year INTEGER) | What is the average age of employees in Sales? | SELECT AVG(age) FROM employees | SELECT AVG(age) FROM employees WHERE department = "Sales" |
CREATE TABLE projects (project_id INTEGER, project_name TEXT, start_year INTEGER) | What employees joined after 2022? | UNKNOWN | UNKNOWN |
CREATE TABLE departments (department_id INTEGER, department_name TEXT, manager_id INTEGER) | Which employees received a bonus greater than 1000? | SELECT * FROM bonuses WHERE bonus_amount > 21000 | SELECT * FROM bonuses WHERE bonus_amount > 1000 |
CREATE TABLE projects (project_id INTEGER, project_name TEXT, start_year INTEGER) | Which employees have a bonus less than 5000? | SELECT * FROM bonuses WHERE bonus_amount > 2000 | SELECT * FROM bonuses WHERE bonus_amount > 5000 |
CREATE TABLE attendance (employee_id INTEGER, day TEXT, status TEXT) | Which departments have more than 14 employees? | INVALID QUERY | INVALID QUERY |
CREATE TABLE bonuses (employee_id INTEGER, bonus_amount INTEGER) | Who are the employees in the Sales department? | UNKNOWN | UNKNOWN |
CREATE TABLE bonuses (employee_id INTEGER, bonus_amount INTEGER) | Which departments have a manager with ID less than 207? | SELECT department_name FROM departments WHERE manager_id > 281 | SELECT department_name FROM departments WHERE manager_id < 207 |
CREATE TABLE employees (name TEXT, age INTEGER, department TEXT) | Which employees were present on Tuesday? | SELECT name FROM employees WHERE department = "Sales" | SELECT name FROM attendance JOIN employees ON attendance.employee_id = employees.employee_id WHERE day = "Tuesday" AND status = "Present" |
CREATE TABLE projects (project_id INTEGER, project_name TEXT, start_year INTEGER) | Which departments have more than 19 employees? | INVALID QUERY | INVALID QUERY |
CREATE TABLE departments (department_id INTEGER, department_name TEXT, manager_id INTEGER) | Which departments have more than 2 employees? | INVALID QUERY | INVALID QUERY |
CREATE TABLE attendance (employee_id INTEGER, day TEXT, status TEXT) | Which employees received a bonus greater than 5000? | SELECT * FROM bonuses WHERE bonus_amount > 11000 | SELECT * FROM bonuses WHERE bonus_amount > 5000 |
CREATE TABLE projects (project_id INTEGER, project_name TEXT, start_year INTEGER) | Which employees were present on Tuesday? | SELECT name FROM employees WHERE department = "HR" | SELECT name FROM attendance JOIN employees ON attendance.employee_id = employees.employee_id WHERE day = "Tuesday" AND status = "Present" |
CREATE TABLE bonuses (employee_id INTEGER, bonus_amount INTEGER) | What projects started before 2019? | SELECT * FROM projects WHERE start_year > 2019 | SELECT project_name FROM projects WHERE start_year < 2019 |
CREATE TABLE attendance (employee_id INTEGER, day TEXT, status TEXT) | How many projects started in 2014? | SELECT * FROM projects WHERE start_year > 2010 | SELECT project_name FROM projects WHERE start_year < 2014 |
CREATE TABLE attendance (employee_id INTEGER, day TEXT, status TEXT) | What is the average age of employees in Sales? | SELECT AVG(age) FROM employees | SELECT AVG(age) FROM employees WHERE department = "Sales" |
CREATE TABLE employees (name TEXT, age INTEGER, department TEXT) | Which employees have a bonus less than 5000? | SELECT * FROM bonuses WHERE bonus_amount > 21000 | SELECT * FROM bonuses WHERE bonus_amount > 5000 |
CREATE TABLE departments (department_id INTEGER, department_name TEXT, manager_id INTEGER) | What is the average age of employees in Marketing? | SELECT AVG(age) FROM employees | SELECT AVG(age) FROM employees WHERE department = "Marketing" |
CREATE TABLE departments (department_id INTEGER, department_name TEXT, manager_id INTEGER) | What is the average age of employees in HR? | SELECT AVG(age) FROM employees | SELECT AVG(age) FROM employees WHERE department = "HR" |
CREATE TABLE departments (department_id INTEGER, department_name TEXT, manager_id INTEGER) | How many projects started in 2020? | SELECT * FROM projects WHERE start_year > 2005 | SELECT project_name FROM projects WHERE start_year < 2020 |
CREATE TABLE departments (department_id INTEGER, department_name TEXT, manager_id INTEGER) | What projects started before 2021? | SELECT * FROM projects WHERE start_year > 2012 | SELECT project_name FROM projects WHERE start_year < 2021 |
CREATE TABLE projects (project_id INTEGER, project_name TEXT, start_year INTEGER) | What projects started before 2009? | SELECT * FROM projects WHERE start_year > 2022 | SELECT project_name FROM projects WHERE start_year < 2009 |
CREATE TABLE bonuses (employee_id INTEGER, bonus_amount INTEGER) | Which employees were present on Friday? | SELECT name FROM employees WHERE department = "HR" | SELECT name FROM attendance JOIN employees ON attendance.employee_id = employees.employee_id WHERE day = "Friday" AND status = "Present" |
CREATE TABLE bonuses (employee_id INTEGER, bonus_amount INTEGER) | What employees joined after 2003? | UNKNOWN | UNKNOWN |
CREATE TABLE departments (department_id INTEGER, department_name TEXT, manager_id INTEGER) | Who are the employees in the IT department? | UNKNOWN | UNKNOWN |
CREATE TABLE employees (name TEXT, age INTEGER, department TEXT) | Which employees were present on Friday? | SELECT name FROM employees WHERE department = "Marketing" | SELECT name FROM attendance JOIN employees ON attendance.employee_id = employees.employee_id WHERE day = "Friday" AND status = "Present" |
CREATE TABLE employees (name TEXT, age INTEGER, department TEXT) | Which employees were present on Friday? | SELECT name FROM employees WHERE department = "Sales" | SELECT name FROM attendance JOIN employees ON attendance.employee_id = employees.employee_id WHERE day = "Friday" AND status = "Present" |
CREATE TABLE employees (name TEXT, age INTEGER, department TEXT) | Which departments have more than 3 employees? | INVALID QUERY | INVALID QUERY |
CREATE TABLE attendance (employee_id INTEGER, day TEXT, status TEXT) | Which employees were present on Wednesday? | SELECT name FROM employees WHERE department = "HR" | SELECT name FROM attendance JOIN employees ON attendance.employee_id = employees.employee_id WHERE day = "Wednesday" AND status = "Present" |
CREATE TABLE employees (name TEXT, age INTEGER, department TEXT) | Who are the employees in the Sales department? | UNKNOWN | UNKNOWN |
CREATE TABLE attendance (employee_id INTEGER, day TEXT, status TEXT) | Which employees received a bonus greater than 5000? | SELECT * FROM bonuses WHERE bonus_amount > 11000 | SELECT * FROM bonuses WHERE bonus_amount > 5000 |
CREATE TABLE projects (project_id INTEGER, project_name TEXT, start_year INTEGER) | What projects started before 2004? | SELECT * FROM projects WHERE start_year > 2020 | SELECT project_name FROM projects WHERE start_year < 2004 |
CREATE TABLE departments (department_id INTEGER, department_name TEXT, manager_id INTEGER) | Which employees received a bonus greater than 10000? | SELECT * FROM bonuses WHERE bonus_amount > 11000 | SELECT * FROM bonuses WHERE bonus_amount > 10000 |
CREATE TABLE departments (department_id INTEGER, department_name TEXT, manager_id INTEGER) | Which departments have more than 6 employees? | INVALID QUERY | INVALID QUERY |
CREATE TABLE employees (name TEXT, age INTEGER, department TEXT) | Who are the employees in the IT department? | UNKNOWN | UNKNOWN |
CREATE TABLE bonuses (employee_id INTEGER, bonus_amount INTEGER) | Which employees received a bonus greater than 5000? | SELECT * FROM bonuses WHERE bonus_amount > 6000 | SELECT * FROM bonuses WHERE bonus_amount > 5000 |
CREATE TABLE attendance (employee_id INTEGER, day TEXT, status TEXT) | What employees joined after 2015? | UNKNOWN | UNKNOWN |
CREATE TABLE employees (name TEXT, age INTEGER, department TEXT) | Which departments have a manager with ID less than 121? | SELECT department_name FROM departments WHERE manager_id > 223 | SELECT department_name FROM departments WHERE manager_id < 121 |
CREATE TABLE bonuses (employee_id INTEGER, bonus_amount INTEGER) | What is the average age of employees in Finance? | SELECT AVG(age) FROM employees | SELECT AVG(age) FROM employees WHERE department = "Finance" |
CREATE TABLE departments (department_id INTEGER, department_name TEXT, manager_id INTEGER) | Which departments have more than 19 employees? | INVALID QUERY | INVALID QUERY |
CREATE TABLE attendance (employee_id INTEGER, day TEXT, status TEXT) | Which departments have more than 20 employees? | INVALID QUERY | INVALID QUERY |
CREATE TABLE projects (project_id INTEGER, project_name TEXT, start_year INTEGER) | How many projects started in 2018? | SELECT * FROM projects WHERE start_year > 2026 | SELECT project_name FROM projects WHERE start_year < 2018 |
CREATE TABLE bonuses (employee_id INTEGER, bonus_amount INTEGER) | Which employees were present on Tuesday? | SELECT name FROM employees WHERE department = "IT" | SELECT name FROM attendance JOIN employees ON attendance.employee_id = employees.employee_id WHERE day = "Tuesday" AND status = "Present" |
CREATE TABLE departments (department_id INTEGER, department_name TEXT, manager_id INTEGER) | What is the average age of employees in Finance? | SELECT AVG(age) FROM employees | SELECT AVG(age) FROM employees WHERE department = "Finance" |
CREATE TABLE bonuses (employee_id INTEGER, bonus_amount INTEGER) | How many projects started in 2008? | SELECT * FROM projects WHERE start_year > 2020 | SELECT project_name FROM projects WHERE start_year < 2008 |
CREATE TABLE projects (project_id INTEGER, project_name TEXT, start_year INTEGER) | How many projects started in 2005? | SELECT * FROM projects WHERE start_year > 2017 | SELECT project_name FROM projects WHERE start_year < 2005 |
CREATE TABLE departments (department_id INTEGER, department_name TEXT, manager_id INTEGER) | What employees joined after 2012? | UNKNOWN | UNKNOWN |
CREATE TABLE employees (name TEXT, age INTEGER, department TEXT) | Which departments have more than 1 employees? | INVALID QUERY | INVALID QUERY |
CREATE TABLE projects (project_id INTEGER, project_name TEXT, start_year INTEGER) | Which departments have a manager with ID less than 275? | SELECT department_name FROM departments WHERE manager_id > 224 | SELECT department_name FROM departments WHERE manager_id < 275 |
CREATE TABLE attendance (employee_id INTEGER, day TEXT, status TEXT) | What projects started before 2002? | SELECT * FROM projects WHERE start_year > 2017 | SELECT project_name FROM projects WHERE start_year < 2002 |
CREATE TABLE attendance (employee_id INTEGER, day TEXT, status TEXT) | How many projects started in 2000? | SELECT * FROM projects WHERE start_year > 2026 | SELECT project_name FROM projects WHERE start_year < 2000 |
CREATE TABLE bonuses (employee_id INTEGER, bonus_amount INTEGER) | Which departments have more than 14 employees? | INVALID QUERY | INVALID QUERY |
CREATE TABLE bonuses (employee_id INTEGER, bonus_amount INTEGER) | Which employees were present on Wednesday? | SELECT name FROM employees WHERE department = "IT" | SELECT name FROM attendance JOIN employees ON attendance.employee_id = employees.employee_id WHERE day = "Wednesday" AND status = "Present" |
CREATE TABLE bonuses (employee_id INTEGER, bonus_amount INTEGER) | Who are the employees in the Finance department? | UNKNOWN | UNKNOWN |
CREATE TABLE bonuses (employee_id INTEGER, bonus_amount INTEGER) | Which employees have a bonus less than 1000? | SELECT * FROM bonuses WHERE bonus_amount > 21000 | SELECT * FROM bonuses WHERE bonus_amount > 1000 |
CREATE TABLE projects (project_id INTEGER, project_name TEXT, start_year INTEGER) | Which employees received a bonus greater than 10000? | SELECT * FROM bonuses WHERE bonus_amount > 21000 | SELECT * FROM bonuses WHERE bonus_amount > 10000 |
CREATE TABLE employees (name TEXT, age INTEGER, department TEXT) | Which employees were present on Friday? | SELECT name FROM employees WHERE department = "HR" | SELECT name FROM attendance JOIN employees ON attendance.employee_id = employees.employee_id WHERE day = "Friday" AND status = "Present" |
CREATE TABLE attendance (employee_id INTEGER, day TEXT, status TEXT) | Which departments have a manager with ID less than 129? | SELECT department_name FROM departments WHERE manager_id > 344 | SELECT department_name FROM departments WHERE manager_id < 129 |
CREATE TABLE projects (project_id INTEGER, project_name TEXT, start_year INTEGER) | How many projects started in 2007? | SELECT * FROM projects WHERE start_year > 2005 | SELECT project_name FROM projects WHERE start_year < 2007 |
CREATE TABLE attendance (employee_id INTEGER, day TEXT, status TEXT) | How many projects started in 2014? | SELECT * FROM projects WHERE start_year > 2013 | SELECT project_name FROM projects WHERE start_year < 2014 |
CREATE TABLE employees (name TEXT, age INTEGER, department TEXT) | Which departments have a manager with ID less than 152? | SELECT department_name FROM departments WHERE manager_id > 222 | SELECT department_name FROM departments WHERE manager_id < 152 |
CREATE TABLE attendance (employee_id INTEGER, day TEXT, status TEXT) | Which employees received a bonus greater than 20000? | SELECT * FROM bonuses WHERE bonus_amount > 2000 | SELECT * FROM bonuses WHERE bonus_amount > 20000 |
CREATE TABLE employees (name TEXT, age INTEGER, department TEXT) | Which employees have a bonus less than 5000? | SELECT * FROM bonuses WHERE bonus_amount > 2000 | SELECT * FROM bonuses WHERE bonus_amount > 5000 |
CREATE TABLE attendance (employee_id INTEGER, day TEXT, status TEXT) | What is the average age of employees in Sales? | SELECT AVG(age) FROM employees | SELECT AVG(age) FROM employees WHERE department = "Sales" |
CREATE TABLE bonuses (employee_id INTEGER, bonus_amount INTEGER) | What projects started before 2013? | SELECT * FROM projects WHERE start_year > 2005 | SELECT project_name FROM projects WHERE start_year < 2013 |
CREATE TABLE projects (project_id INTEGER, project_name TEXT, start_year INTEGER) | Which employees have a bonus less than 20000? | SELECT * FROM bonuses WHERE bonus_amount > 21000 | SELECT * FROM bonuses WHERE bonus_amount > 20000 |
CREATE TABLE projects (project_id INTEGER, project_name TEXT, start_year INTEGER) | What is the average age of employees in Finance? | SELECT AVG(age) FROM employees | SELECT AVG(age) FROM employees WHERE department = "Finance" |
CREATE TABLE employees (name TEXT, age INTEGER, department TEXT) | What projects started before 2013? | SELECT * FROM projects WHERE start_year > 2014 | SELECT project_name FROM projects WHERE start_year < 2013 |
CREATE TABLE projects (project_id INTEGER, project_name TEXT, start_year INTEGER) | Which departments have a manager with ID less than 169? | SELECT department_name FROM departments WHERE manager_id > 250 | SELECT department_name FROM departments WHERE manager_id < 169 |
CREATE TABLE departments (department_id INTEGER, department_name TEXT, manager_id INTEGER) | Which departments have a manager with ID less than 247? | SELECT department_name FROM departments WHERE manager_id > 329 | SELECT department_name FROM departments WHERE manager_id < 247 |
CREATE TABLE departments (department_id INTEGER, department_name TEXT, manager_id INTEGER) | What projects started before 2014? | SELECT * FROM projects WHERE start_year > 2018 | SELECT project_name FROM projects WHERE start_year < 2014 |
CREATE TABLE departments (department_id INTEGER, department_name TEXT, manager_id INTEGER) | Which departments have a manager with ID less than 183? | SELECT department_name FROM departments WHERE manager_id > 334 | SELECT department_name FROM departments WHERE manager_id < 183 |
CREATE TABLE projects (project_id INTEGER, project_name TEXT, start_year INTEGER) | Which departments have a manager with ID less than 194? | SELECT department_name FROM departments WHERE manager_id > 347 | SELECT department_name FROM departments WHERE manager_id < 194 |
CREATE TABLE employees (name TEXT, age INTEGER, department TEXT) | Which departments have a manager with ID less than 151? | SELECT department_name FROM departments WHERE manager_id > 177 | SELECT department_name FROM departments WHERE manager_id < 151 |
CREATE TABLE projects (project_id INTEGER, project_name TEXT, start_year INTEGER) | What employees joined after 2002? | UNKNOWN | UNKNOWN |
CREATE TABLE projects (project_id INTEGER, project_name TEXT, start_year INTEGER) | Who are the employees in the IT department? | UNKNOWN | UNKNOWN |
CREATE TABLE attendance (employee_id INTEGER, day TEXT, status TEXT) | How many projects started in 2019? | SELECT * FROM projects WHERE start_year > 2015 | SELECT project_name FROM projects WHERE start_year < 2019 |
CREATE TABLE bonuses (employee_id INTEGER, bonus_amount INTEGER) | How many projects started in 2001? | SELECT * FROM projects WHERE start_year > 2021 | SELECT project_name FROM projects WHERE start_year < 2001 |
CREATE TABLE employees (name TEXT, age INTEGER, department TEXT) | Which departments have more than 4 employees? | INVALID QUERY | INVALID QUERY |
CREATE TABLE departments (department_id INTEGER, department_name TEXT, manager_id INTEGER) | Which departments have more than 15 employees? | INVALID QUERY | INVALID QUERY |
CREATE TABLE projects (project_id INTEGER, project_name TEXT, start_year INTEGER) | What is the average age of employees in Finance? | SELECT AVG(age) FROM employees | SELECT AVG(age) FROM employees WHERE department = "Finance" |
CREATE TABLE bonuses (employee_id INTEGER, bonus_amount INTEGER) | Which departments have more than 4 employees? | INVALID QUERY | INVALID QUERY |
CREATE TABLE employees (name TEXT, age INTEGER, department TEXT) | Who are the employees in the Sales department? | UNKNOWN | UNKNOWN |
CREATE TABLE employees (name TEXT, age INTEGER, department TEXT) | Which employees were present on Tuesday? | SELECT name FROM employees WHERE department = "HR" | SELECT name FROM attendance JOIN employees ON attendance.employee_id = employees.employee_id WHERE day = "Tuesday" AND status = "Present" |
CREATE TABLE departments (department_id INTEGER, department_name TEXT, manager_id INTEGER) | Which employees were present on Monday? | SELECT name FROM employees WHERE department = "HR" | SELECT name FROM attendance JOIN employees ON attendance.employee_id = employees.employee_id WHERE day = "Monday" AND status = "Present" |
CREATE TABLE employees (name TEXT, age INTEGER, department TEXT) | Which departments have a manager with ID less than 210? | SELECT department_name FROM departments WHERE manager_id > 227 | SELECT department_name FROM departments WHERE manager_id < 210 |
CREATE TABLE attendance (employee_id INTEGER, day TEXT, status TEXT) | What employees joined after 2015? | UNKNOWN | UNKNOWN |
CREATE TABLE employees (name TEXT, age INTEGER, department TEXT) | How many projects started in 2012? | SELECT * FROM projects WHERE start_year > 2008 | SELECT project_name FROM projects WHERE start_year < 2012 |
CREATE TABLE projects (project_id INTEGER, project_name TEXT, start_year INTEGER) | What is the average age of employees in HR? | SELECT AVG(age) FROM employees | SELECT AVG(age) FROM employees WHERE department = "HR" |
CREATE TABLE employees (name TEXT, age INTEGER, department TEXT) | What employees joined after 2015? | UNKNOWN | UNKNOWN |
CREATE TABLE departments (department_id INTEGER, department_name TEXT, manager_id INTEGER) | Which departments have more than 5 employees? | INVALID QUERY | INVALID QUERY |
CREATE TABLE projects (project_id INTEGER, project_name TEXT, start_year INTEGER) | Which employees received a bonus greater than 20000? | SELECT * FROM bonuses WHERE bonus_amount > 6000 | SELECT * FROM bonuses WHERE bonus_amount > 20000 |
CREATE TABLE bonuses (employee_id INTEGER, bonus_amount INTEGER) | Which employees received a bonus greater than 1000? | SELECT * FROM bonuses WHERE bonus_amount > 11000 | SELECT * FROM bonuses WHERE bonus_amount > 1000 |
CREATE TABLE projects (project_id INTEGER, project_name TEXT, start_year INTEGER) | What employees joined after 2007? | UNKNOWN | UNKNOWN |
CREATE TABLE employees (name TEXT, age INTEGER, department TEXT) | How many projects started in 2022? | SELECT * FROM projects WHERE start_year > 2007 | SELECT project_name FROM projects WHERE start_year < 2022 |
CREATE TABLE bonuses (employee_id INTEGER, bonus_amount INTEGER) | What is the average age of employees in Sales? | SELECT AVG(age) FROM employees | SELECT AVG(age) FROM employees WHERE department = "Sales" |
CREATE TABLE attendance (employee_id INTEGER, day TEXT, status TEXT) | What projects started before 2019? | SELECT * FROM projects WHERE start_year > 2016 | SELECT project_name FROM projects WHERE start_year < 2019 |
CREATE TABLE attendance (employee_id INTEGER, day TEXT, status TEXT) | What is the average age of employees in Marketing? | SELECT AVG(age) FROM employees | SELECT AVG(age) FROM employees WHERE department = "Marketing" |
CREATE TABLE attendance (employee_id INTEGER, day TEXT, status TEXT) | Which employees received a bonus greater than 10000? | SELECT * FROM bonuses WHERE bonus_amount > 6000 | SELECT * FROM bonuses WHERE bonus_amount > 10000 |
CREATE TABLE departments (department_id INTEGER, department_name TEXT, manager_id INTEGER) | Which employees have a bonus less than 1000? | SELECT * FROM bonuses WHERE bonus_amount > 2000 | SELECT * FROM bonuses WHERE bonus_amount > 1000 |