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 the id and salary of Mark Young.
Answer: SELECT eid ,  salary FROM Employee WHERE name  =  'Mark Young'
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT eid ,  salary FROM Employee WHERE name  =  'Mark Young'
##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 salary of the employee named Mark Young?
Answer: SELECT eid ,  salary FROM Employee WHERE name  =  'Mark Young'
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT eid ,  salary FROM Employee WHERE name  =  'Mark Young'
##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 flights do we have?
Answer: SELECT count(*) FROM Flight
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(*) FROM Flight
##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 flights?
Answer: SELECT count(*) FROM Flight
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(*) FROM Flight
##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 flight number, origin, destination of all flights in the alphabetical order of the departure cities.
Answer: SELECT flno ,  origin ,  destination FROM Flight ORDER BY origin
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT flno ,  origin ,  destination FROM Flight ORDER BY origin
##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 flight number, origin, and destination for all flights in alphabetical order by departure cities?
Answer: SELECT flno ,  origin ,  destination FROM Flight ORDER BY origin
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT flno ,  origin ,  destination FROM Flight ORDER BY origin
##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 all flight number from Los Angeles.
Answer: SELECT flno FROM Flight WHERE origin  =  "Los Angeles"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT flno FROM Flight WHERE origin  =  "Los Angeles"
##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 numbers of all flights coming from Los Angeles?
Answer: SELECT flno FROM Flight WHERE origin  =  "Los Angeles"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT flno FROM Flight WHERE origin  =  "Los Angeles"
##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 origins of all flights with destination Honolulu.
Answer: SELECT origin FROM Flight WHERE destination  =  "Honolulu"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT origin FROM Flight WHERE destination  =  "Honolulu"
##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 origins of all flights that are headed to Honolulu?
Answer: SELECT origin FROM Flight WHERE destination  =  "Honolulu"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT origin FROM Flight WHERE destination  =  "Honolulu"
##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 me the departure date and arrival date for all flights from Los Angeles to Honolulu.
Answer: SELECT departure_date ,  arrival_date FROM Flight WHERE origin  =  "Los Angeles" AND destination  =  "Honolulu"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT departure_date ,  arrival_date FROM Flight WHERE origin  =  "Los Angeles" AND destination  =  "Honolulu"
##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 departure and arrival dates of all flights from LA to Honolulu?
Answer: SELECT departure_date ,  arrival_date FROM Flight WHERE origin  =  "Los Angeles" AND destination  =  "Honolulu"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT departure_date ,  arrival_date FROM Flight WHERE origin  =  "Los Angeles" AND destination  =  "Honolulu"
##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 flight number for all flights with more than 2000 distance.
Answer: SELECT flno FROM Flight WHERE distance  >  2000
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT flno FROM Flight WHERE distance  >  2000
##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 numbers of all flights that can cover a distance of more than 2000?
Answer: SELECT flno FROM Flight WHERE distance  >  2000
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT flno FROM Flight WHERE distance  >  2000
##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 price for flights from Los Angeles to Honolulu.
Answer: SELECT avg(price) FROM Flight WHERE origin  =  "Los Angeles" AND destination  =  "Honolulu"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT avg(price) FROM Flight WHERE origin  =  "Los Angeles" AND destination  =  "Honolulu"
##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 price for flights from LA to Honolulu?
Answer: SELECT avg(price) FROM Flight WHERE origin  =  "Los Angeles" AND destination  =  "Honolulu"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT avg(price) FROM Flight WHERE origin  =  "Los Angeles" AND destination  =  "Honolulu"
##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 origin and destination for flights with price higher than 300.
Answer: SELECT origin ,  destination FROM Flight WHERE price  >  300
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT origin ,  destination FROM Flight WHERE price  >  300
##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 origin and destination for all flights whose price is higher than 300?
Answer: SELECT origin ,  destination FROM Flight WHERE price  >  300
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT origin ,  destination FROM Flight WHERE price  >  300
##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 flight number and distance of the flight with maximum price.
Answer: SELECT flno ,  distance FROM Flight ORDER BY price DESC LIMIT 1
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT flno ,  distance FROM Flight ORDER BY price 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 flight number and its distance for the one with the maximum price?
Answer: SELECT flno ,  distance FROM Flight ORDER BY price DESC LIMIT 1
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT flno ,  distance FROM Flight ORDER BY price DESC LIMIT 1