sharkiefff/RBAC-Text2SQL-Benchmark huggingface dataset:
##Instruction:
Database: flight_1
Total Tables: 4
Total Columns: 16

Table Schemas:

flight_1 contains tables such as flight, aircraft, employee, certificate.
Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid.
flno is the primary key.
Table aircraft has columns such as aid, name, distance.
aid is the primary key.
Table employee has columns such as eid, name, salary.
eid is the primary key.
Table certificate has columns such as eid, aid.
eid is the primary key.
The aid of flight is the foreign key of aid of aircraft.
The aid of certificate is the foreign key of aid of aircraft.
The eid of certificate is the foreign key of eid of employee.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - aircraft: distance, name
  - certificate: * (all columns)
  - employee: * (all columns)
  - flight: * (all columns)

Question: Show names for all aircrafts with distances more than the average.
Answer: SELECT name FROM Aircraft WHERE distance  >  (SELECT avg(distance) FROM Aircraft)
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT name FROM Aircraft WHERE distance  >  (SELECT avg(distance) FROM Aircraft)
##Instruction:
Database: flight_1
Total Tables: 4
Total Columns: 16

Table Schemas:

flight_1 contains tables such as flight, aircraft, employee, certificate.
Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid.
flno is the primary key.
Table aircraft has columns such as aid, name, distance.
aid is the primary key.
Table employee has columns such as eid, name, salary.
eid is the primary key.
Table certificate has columns such as eid, aid.
eid is the primary key.
The aid of flight is the foreign key of aid of aircraft.
The aid of certificate is the foreign key of aid of aircraft.
The eid of certificate is the foreign key of eid of employee.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - aircraft: distance, name
  - certificate: * (all columns)
  - employee: * (all columns)
  - flight: * (all columns)

Question: What are the names of all aircrafts that can cover more distances than average?
Answer: SELECT name FROM Aircraft WHERE distance  >  (SELECT avg(distance) FROM Aircraft)
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT name FROM Aircraft WHERE distance  >  (SELECT avg(distance) FROM Aircraft)
##Instruction:
Database: flight_1
Total Tables: 4
Total Columns: 16

Table Schemas:

flight_1 contains tables such as flight, aircraft, employee, certificate.
Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid.
flno is the primary key.
Table aircraft has columns such as aid, name, distance.
aid is the primary key.
Table employee has columns such as eid, name, salary.
eid is the primary key.
Table certificate has columns such as eid, aid.
eid is the primary key.
The aid of flight is the foreign key of aid of aircraft.
The aid of certificate is the foreign key of aid of aircraft.
The eid of certificate is the foreign key of eid of employee.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - aircraft: distance, name
  - certificate: * (all columns)
  - employee: * (all columns)
  - flight: * (all columns)

Question: How many employees do we have?
Answer: SELECT count(*) FROM Employee
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(*) FROM Employee
##Instruction:
Database: flight_1
Total Tables: 4
Total Columns: 16

Table Schemas:

flight_1 contains tables such as flight, aircraft, employee, certificate.
Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid.
flno is the primary key.
Table aircraft has columns such as aid, name, distance.
aid is the primary key.
Table employee has columns such as eid, name, salary.
eid is the primary key.
Table certificate has columns such as eid, aid.
eid is the primary key.
The aid of flight is the foreign key of aid of aircraft.
The aid of certificate is the foreign key of aid of aircraft.
The eid of certificate is the foreign key of eid of employee.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - aircraft: distance, name
  - certificate: * (all columns)
  - employee: * (all columns)
  - flight: * (all columns)

Question: What is the number of employees?
Answer: SELECT count(*) FROM Employee
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(*) FROM Employee
##Instruction:
Database: flight_1
Total Tables: 4
Total Columns: 16

Table Schemas:

flight_1 contains tables such as flight, aircraft, employee, certificate.
Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid.
flno is the primary key.
Table aircraft has columns such as aid, name, distance.
aid is the primary key.
Table employee has columns such as eid, name, salary.
eid is the primary key.
Table certificate has columns such as eid, aid.
eid is the primary key.
The aid of flight is the foreign key of aid of aircraft.
The aid of certificate is the foreign key of aid of aircraft.
The eid of certificate is the foreign key of eid of employee.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - aircraft: distance, name
  - certificate: * (all columns)
  - employee: * (all columns)
  - flight: * (all columns)

Question: Show name and salary for all employees sorted by salary.
Answer: SELECT name ,  salary FROM Employee ORDER BY salary
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT name ,  salary FROM Employee ORDER BY salary
##Instruction:
Database: flight_1
Total Tables: 4
Total Columns: 16

Table Schemas:

flight_1 contains tables such as flight, aircraft, employee, certificate.
Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid.
flno is the primary key.
Table aircraft has columns such as aid, name, distance.
aid is the primary key.
Table employee has columns such as eid, name, salary.
eid is the primary key.
Table certificate has columns such as eid, aid.
eid is the primary key.
The aid of flight is the foreign key of aid of aircraft.
The aid of certificate is the foreign key of aid of aircraft.
The eid of certificate is the foreign key of eid of employee.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - aircraft: distance, name
  - certificate: * (all columns)
  - employee: * (all columns)
  - flight: * (all columns)

Question: What is the name and salary of all employees in order of salary?
Answer: SELECT name ,  salary FROM Employee ORDER BY salary
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT name ,  salary FROM Employee ORDER BY salary
##Instruction:
Database: flight_1
Total Tables: 4
Total Columns: 16

Table Schemas:

flight_1 contains tables such as flight, aircraft, employee, certificate.
Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid.
flno is the primary key.
Table aircraft has columns such as aid, name, distance.
aid is the primary key.
Table employee has columns such as eid, name, salary.
eid is the primary key.
Table certificate has columns such as eid, aid.
eid is the primary key.
The aid of flight is the foreign key of aid of aircraft.
The aid of certificate is the foreign key of aid of aircraft.
The eid of certificate is the foreign key of eid of employee.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - aircraft: distance, name
  - certificate: * (all columns)
  - employee: * (all columns)
  - flight: * (all columns)

Question: Show ids for all employees with at least 100000 salary.
Answer: SELECT eid FROM Employee WHERE salary  >  100000
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT eid FROM Employee WHERE salary  >  100000
##Instruction:
Database: flight_1
Total Tables: 4
Total Columns: 16

Table Schemas:

flight_1 contains tables such as flight, aircraft, employee, certificate.
Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid.
flno is the primary key.
Table aircraft has columns such as aid, name, distance.
aid is the primary key.
Table employee has columns such as eid, name, salary.
eid is the primary key.
Table certificate has columns such as eid, aid.
eid is the primary key.
The aid of flight is the foreign key of aid of aircraft.
The aid of certificate is the foreign key of aid of aircraft.
The eid of certificate is the foreign key of eid of employee.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - aircraft: distance, name
  - certificate: * (all columns)
  - employee: * (all columns)
  - flight: * (all columns)

Question: What is the id of every employee who has at least a salary of  100000?
Answer: SELECT eid FROM Employee WHERE salary  >  100000
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT eid FROM Employee WHERE salary  >  100000
##Instruction:
Database: flight_1
Total Tables: 4
Total Columns: 16

Table Schemas:

flight_1 contains tables such as flight, aircraft, employee, certificate.
Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid.
flno is the primary key.
Table aircraft has columns such as aid, name, distance.
aid is the primary key.
Table employee has columns such as eid, name, salary.
eid is the primary key.
Table certificate has columns such as eid, aid.
eid is the primary key.
The aid of flight is the foreign key of aid of aircraft.
The aid of certificate is the foreign key of aid of aircraft.
The eid of certificate is the foreign key of eid of employee.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - aircraft: distance, name
  - certificate: * (all columns)
  - employee: * (all columns)
  - flight: * (all columns)

Question: How many employees have salary between 100000 and 200000?
Answer: SELECT count(*) FROM Employee WHERE salary BETWEEN 100000 AND 200000
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(*) FROM Employee WHERE salary BETWEEN 100000 AND 200000
##Instruction:
Database: flight_1
Total Tables: 4
Total Columns: 16

Table Schemas:

flight_1 contains tables such as flight, aircraft, employee, certificate.
Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid.
flno is the primary key.
Table aircraft has columns such as aid, name, distance.
aid is the primary key.
Table employee has columns such as eid, name, salary.
eid is the primary key.
Table certificate has columns such as eid, aid.
eid is the primary key.
The aid of flight is the foreign key of aid of aircraft.
The aid of certificate is the foreign key of aid of aircraft.
The eid of certificate is the foreign key of eid of employee.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - aircraft: distance, name
  - certificate: * (all columns)
  - employee: * (all columns)
  - flight: * (all columns)

Question: What is the number of employees that have a salary between 100000 and 200000?
Answer: SELECT count(*) FROM Employee WHERE salary BETWEEN 100000 AND 200000
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(*) FROM Employee WHERE salary BETWEEN 100000 AND 200000
##Instruction:
Database: flight_1
Total Tables: 4
Total Columns: 16

Table Schemas:

flight_1 contains tables such as flight, aircraft, employee, certificate.
Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid.
flno is the primary key.
Table aircraft has columns such as aid, name, distance.
aid is the primary key.
Table employee has columns such as eid, name, salary.
eid is the primary key.
Table certificate has columns such as eid, aid.
eid is the primary key.
The aid of flight is the foreign key of aid of aircraft.
The aid of certificate is the foreign key of aid of aircraft.
The eid of certificate is the foreign key of eid of employee.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - aircraft: distance, name
  - certificate: * (all columns)
  - employee: * (all columns)
  - flight: * (all columns)

Question: What is the name and salary for employee with id 242518965?
Answer: SELECT name ,  salary FROM Employee WHERE eid  =  242518965
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT name ,  salary FROM Employee WHERE eid  =  242518965
##Instruction:
Database: flight_1
Total Tables: 4
Total Columns: 16

Table Schemas:

flight_1 contains tables such as flight, aircraft, employee, certificate.
Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid.
flno is the primary key.
Table aircraft has columns such as aid, name, distance.
aid is the primary key.
Table employee has columns such as eid, name, salary.
eid is the primary key.
Table certificate has columns such as eid, aid.
eid is the primary key.
The aid of flight is the foreign key of aid of aircraft.
The aid of certificate is the foreign key of aid of aircraft.
The eid of certificate is the foreign key of eid of employee.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - aircraft: distance, name
  - certificate: * (all columns)
  - employee: * (all columns)
  - flight: * (all columns)

Question: What is the name and salary of the employee with the id 242518965?
Answer: SELECT name ,  salary FROM Employee WHERE eid  =  242518965
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT name ,  salary FROM Employee WHERE eid  =  242518965
##Instruction:
Database: flight_1
Total Tables: 4
Total Columns: 16

Table Schemas:

flight_1 contains tables such as flight, aircraft, employee, certificate.
Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid.
flno is the primary key.
Table aircraft has columns such as aid, name, distance.
aid is the primary key.
Table employee has columns such as eid, name, salary.
eid is the primary key.
Table certificate has columns such as eid, aid.
eid is the primary key.
The aid of flight is the foreign key of aid of aircraft.
The aid of certificate is the foreign key of aid of aircraft.
The eid of certificate is the foreign key of eid of employee.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - aircraft: distance, name
  - certificate: * (all columns)
  - employee: * (all columns)
  - flight: * (all columns)

Question: What is average and maximum salary of all employees.
Answer: SELECT avg(salary) ,  max(salary) FROM Employee
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT avg(salary) ,  max(salary) FROM Employee
##Instruction:
Database: flight_1
Total Tables: 4
Total Columns: 16

Table Schemas:

flight_1 contains tables such as flight, aircraft, employee, certificate.
Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid.
flno is the primary key.
Table aircraft has columns such as aid, name, distance.
aid is the primary key.
Table employee has columns such as eid, name, salary.
eid is the primary key.
Table certificate has columns such as eid, aid.
eid is the primary key.
The aid of flight is the foreign key of aid of aircraft.
The aid of certificate is the foreign key of aid of aircraft.
The eid of certificate is the foreign key of eid of employee.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - aircraft: distance, name
  - certificate: * (all columns)
  - employee: * (all columns)
  - flight: * (all columns)

Question: What is the average and largest salary of all employees?
Answer: SELECT avg(salary) ,  max(salary) FROM Employee
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT avg(salary) ,  max(salary) FROM Employee
##Instruction:
Database: flight_1
Total Tables: 4
Total Columns: 16

Table Schemas:

flight_1 contains tables such as flight, aircraft, employee, certificate.
Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid.
flno is the primary key.
Table aircraft has columns such as aid, name, distance.
aid is the primary key.
Table employee has columns such as eid, name, salary.
eid is the primary key.
Table certificate has columns such as eid, aid.
eid is the primary key.
The aid of flight is the foreign key of aid of aircraft.
The aid of certificate is the foreign key of aid of aircraft.
The eid of certificate is the foreign key of eid of employee.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - aircraft: distance, name
  - certificate: * (all columns)
  - employee: * (all columns)
  - flight: * (all columns)

Question: Show the id and name of the employee with maximum salary.
Answer: SELECT eid ,  name FROM Employee ORDER BY salary DESC LIMIT 1
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT eid ,  name FROM Employee ORDER BY salary DESC LIMIT 1
##Instruction:
Database: flight_1
Total Tables: 4
Total Columns: 16

Table Schemas:

flight_1 contains tables such as flight, aircraft, employee, certificate.
Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid.
flno is the primary key.
Table aircraft has columns such as aid, name, distance.
aid is the primary key.
Table employee has columns such as eid, name, salary.
eid is the primary key.
Table certificate has columns such as eid, aid.
eid is the primary key.
The aid of flight is the foreign key of aid of aircraft.
The aid of certificate is the foreign key of aid of aircraft.
The eid of certificate is the foreign key of eid of employee.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - aircraft: distance, name
  - certificate: * (all columns)
  - employee: * (all columns)
  - flight: * (all columns)

Question: What is the id and name of the employee with the highest salary?
Answer: SELECT eid ,  name FROM Employee ORDER BY salary DESC LIMIT 1
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT eid ,  name FROM Employee ORDER BY salary DESC LIMIT 1
##Instruction:
Database: flight_1
Total Tables: 4
Total Columns: 16

Table Schemas:

flight_1 contains tables such as flight, aircraft, employee, certificate.
Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid.
flno is the primary key.
Table aircraft has columns such as aid, name, distance.
aid is the primary key.
Table employee has columns such as eid, name, salary.
eid is the primary key.
Table certificate has columns such as eid, aid.
eid is the primary key.
The aid of flight is the foreign key of aid of aircraft.
The aid of certificate is the foreign key of aid of aircraft.
The eid of certificate is the foreign key of eid of employee.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - aircraft: distance, name
  - certificate: * (all columns)
  - employee: * (all columns)
  - flight: * (all columns)

Question: Show the name of employees with three lowest salaries.
Answer: SELECT name FROM Employee ORDER BY salary ASC LIMIT 3
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT name FROM Employee ORDER BY salary ASC LIMIT 3
##Instruction:
Database: flight_1
Total Tables: 4
Total Columns: 16

Table Schemas:

flight_1 contains tables such as flight, aircraft, employee, certificate.
Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid.
flno is the primary key.
Table aircraft has columns such as aid, name, distance.
aid is the primary key.
Table employee has columns such as eid, name, salary.
eid is the primary key.
Table certificate has columns such as eid, aid.
eid is the primary key.
The aid of flight is the foreign key of aid of aircraft.
The aid of certificate is the foreign key of aid of aircraft.
The eid of certificate is the foreign key of eid of employee.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - aircraft: distance, name
  - certificate: * (all columns)
  - employee: * (all columns)
  - flight: * (all columns)

Question: What is the name of the 3 employees who get paid the least?
Answer: SELECT name FROM Employee ORDER BY salary ASC LIMIT 3
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT name FROM Employee ORDER BY salary ASC LIMIT 3
##Instruction:
Database: flight_1
Total Tables: 4
Total Columns: 16

Table Schemas:

flight_1 contains tables such as flight, aircraft, employee, certificate.
Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid.
flno is the primary key.
Table aircraft has columns such as aid, name, distance.
aid is the primary key.
Table employee has columns such as eid, name, salary.
eid is the primary key.
Table certificate has columns such as eid, aid.
eid is the primary key.
The aid of flight is the foreign key of aid of aircraft.
The aid of certificate is the foreign key of aid of aircraft.
The eid of certificate is the foreign key of eid of employee.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - aircraft: distance, name
  - certificate: * (all columns)
  - employee: * (all columns)
  - flight: * (all columns)

Question: Show names for all employees with salary more than the average.
Answer: SELECT name FROM Employee WHERE salary  >  (SELECT avg(salary) FROM Employee)
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT name FROM Employee WHERE salary  >  (SELECT avg(salary) FROM Employee)
##Instruction:
Database: flight_1
Total Tables: 4
Total Columns: 16

Table Schemas:

flight_1 contains tables such as flight, aircraft, employee, certificate.
Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid.
flno is the primary key.
Table aircraft has columns such as aid, name, distance.
aid is the primary key.
Table employee has columns such as eid, name, salary.
eid is the primary key.
Table certificate has columns such as eid, aid.
eid is the primary key.
The aid of flight is the foreign key of aid of aircraft.
The aid of certificate is the foreign key of aid of aircraft.
The eid of certificate is the foreign key of eid of employee.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - aircraft: distance, name
  - certificate: * (all columns)
  - employee: * (all columns)
  - flight: * (all columns)

Question: What are the names of all employees who have a salary higher than average?
Answer: SELECT name FROM Employee WHERE salary  >  (SELECT avg(salary) FROM Employee)
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT name FROM Employee WHERE salary  >  (SELECT avg(salary) FROM Employee)