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

Table Schemas:

school_player contains tables such as school, school_details, school_performance, player.
Table school has columns such as School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors.
School_ID is the primary key.
Table school_details has columns such as School_ID, Nickname, Colors, League, Class, Division.
School_ID is the primary key.
Table school_performance has columns such as School_Id, School_Year, Class_A, Class_AA.
School_Id is the primary key.
Table player has columns such as Player_ID, Player, Team, Age, Position, School_ID.
Player_ID is the primary key.
The School_ID of school_details is the foreign key of School_ID of school.
The School_Id of school_performance is the foreign key of School_ID of school.
The School_ID of player is the foreign key of School_ID of school.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - player: Age, Player, Position, School_ID, Team
  - school: * (all columns)
  - school_details: Class, Colors, Division, League, Nickname
  - school_performance: Class_A, School_Year

Question: Show the nicknames of schools that are not in division 1.
Answer: SELECT Nickname FROM school_details WHERE Division != "Division 1"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT Nickname FROM school_details WHERE Division != "Division 1"
##Instruction:
Database: school_player
Total Tables: 4
Total Columns: 26

Table Schemas:

school_player contains tables such as school, school_details, school_performance, player.
Table school has columns such as School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors.
School_ID is the primary key.
Table school_details has columns such as School_ID, Nickname, Colors, League, Class, Division.
School_ID is the primary key.
Table school_performance has columns such as School_Id, School_Year, Class_A, Class_AA.
School_Id is the primary key.
Table player has columns such as Player_ID, Player, Team, Age, Position, School_ID.
Player_ID is the primary key.
The School_ID of school_details is the foreign key of School_ID of school.
The School_Id of school_performance is the foreign key of School_ID of school.
The School_ID of player is the foreign key of School_ID of school.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - player: Age, Player, Position, School_ID, Team
  - school: * (all columns)
  - school_details: Class, Colors, Division, League, Nickname
  - school_performance: Class_A, School_Year

Question: What are the nicknames of schools whose division is not 1?
Answer: SELECT Nickname FROM school_details WHERE Division != "Division 1"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT Nickname FROM school_details WHERE Division != "Division 1"
##Instruction:
Database: school_player
Total Tables: 4
Total Columns: 26

Table Schemas:

school_player contains tables such as school, school_details, school_performance, player.
Table school has columns such as School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors.
School_ID is the primary key.
Table school_details has columns such as School_ID, Nickname, Colors, League, Class, Division.
School_ID is the primary key.
Table school_performance has columns such as School_Id, School_Year, Class_A, Class_AA.
School_Id is the primary key.
Table player has columns such as Player_ID, Player, Team, Age, Position, School_ID.
Player_ID is the primary key.
The School_ID of school_details is the foreign key of School_ID of school.
The School_Id of school_performance is the foreign key of School_ID of school.
The School_ID of player is the foreign key of School_ID of school.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - player: Age, Player, Position, School_ID, Team
  - school: * (all columns)
  - school_details: Class, Colors, Division, League, Nickname
  - school_performance: Class_A, School_Year

Question: Show the denomination shared by more than one school.
Answer: SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*)  >  1
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*)  >  1
##Instruction:
Database: school_player
Total Tables: 4
Total Columns: 26

Table Schemas:

school_player contains tables such as school, school_details, school_performance, player.
Table school has columns such as School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors.
School_ID is the primary key.
Table school_details has columns such as School_ID, Nickname, Colors, League, Class, Division.
School_ID is the primary key.
Table school_performance has columns such as School_Id, School_Year, Class_A, Class_AA.
School_Id is the primary key.
Table player has columns such as Player_ID, Player, Team, Age, Position, School_ID.
Player_ID is the primary key.
The School_ID of school_details is the foreign key of School_ID of school.
The School_Id of school_performance is the foreign key of School_ID of school.
The School_ID of player is the foreign key of School_ID of school.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - player: Age, Player, Position, School_ID, Team
  - school: * (all columns)
  - school_details: Class, Colors, Division, League, Nickname
  - school_performance: Class_A, School_Year

Question: What are the denomination more than one school have?
Answer: SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*)  >  1
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*)  >  1
##Instruction:
Database: school_player
Total Tables: 4
Total Columns: 26

Table Schemas:

school_player contains tables such as school, school_details, school_performance, player.
Table school has columns such as School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors.
School_ID is the primary key.
Table school_details has columns such as School_ID, Nickname, Colors, League, Class, Division.
School_ID is the primary key.
Table school_performance has columns such as School_Id, School_Year, Class_A, Class_AA.
School_Id is the primary key.
Table player has columns such as Player_ID, Player, Team, Age, Position, School_ID.
Player_ID is the primary key.
The School_ID of school_details is the foreign key of School_ID of school.
The School_Id of school_performance is the foreign key of School_ID of school.
The School_ID of player is the foreign key of School_ID of school.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - player: * (all columns)
  - school: Boys_or_Girls, Day_or_Boarding, Denomination, Enrollment, Founded, Location, School, School_ID, Year_Entered_Competition
  - school_details: * (all columns)
  - school_performance: Class_A, School_Id, School_Year

Question: How many schools are there?
Answer: SELECT count(*) FROM school
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(*) FROM school
##Instruction:
Database: school_player
Total Tables: 4
Total Columns: 26

Table Schemas:

school_player contains tables such as school, school_details, school_performance, player.
Table school has columns such as School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors.
School_ID is the primary key.
Table school_details has columns such as School_ID, Nickname, Colors, League, Class, Division.
School_ID is the primary key.
Table school_performance has columns such as School_Id, School_Year, Class_A, Class_AA.
School_Id is the primary key.
Table player has columns such as Player_ID, Player, Team, Age, Position, School_ID.
Player_ID is the primary key.
The School_ID of school_details is the foreign key of School_ID of school.
The School_Id of school_performance is the foreign key of School_ID of school.
The School_ID of player is the foreign key of School_ID of school.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - player: * (all columns)
  - school: Boys_or_Girls, Day_or_Boarding, Denomination, Enrollment, Founded, Location, School, School_ID, Year_Entered_Competition
  - school_details: * (all columns)
  - school_performance: Class_A, School_Id, School_Year

Question: Count the number of schools.
Answer: SELECT count(*) FROM school
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(*) FROM school
##Instruction:
Database: school_player
Total Tables: 4
Total Columns: 26

Table Schemas:

school_player contains tables such as school, school_details, school_performance, player.
Table school has columns such as School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors.
School_ID is the primary key.
Table school_details has columns such as School_ID, Nickname, Colors, League, Class, Division.
School_ID is the primary key.
Table school_performance has columns such as School_Id, School_Year, Class_A, Class_AA.
School_Id is the primary key.
Table player has columns such as Player_ID, Player, Team, Age, Position, School_ID.
Player_ID is the primary key.
The School_ID of school_details is the foreign key of School_ID of school.
The School_Id of school_performance is the foreign key of School_ID of school.
The School_ID of player is the foreign key of School_ID of school.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - player: * (all columns)
  - school: Boys_or_Girls, Day_or_Boarding, Denomination, Enrollment, Founded, Location, School, School_ID, Year_Entered_Competition
  - school_details: * (all columns)
  - school_performance: Class_A, School_Id, School_Year

Question: List the locations of schools in ascending order of enrollment.
Answer: SELECT LOCATION FROM school ORDER BY Enrollment ASC
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT LOCATION FROM school ORDER BY Enrollment ASC
##Instruction:
Database: school_player
Total Tables: 4
Total Columns: 26

Table Schemas:

school_player contains tables such as school, school_details, school_performance, player.
Table school has columns such as School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors.
School_ID is the primary key.
Table school_details has columns such as School_ID, Nickname, Colors, League, Class, Division.
School_ID is the primary key.
Table school_performance has columns such as School_Id, School_Year, Class_A, Class_AA.
School_Id is the primary key.
Table player has columns such as Player_ID, Player, Team, Age, Position, School_ID.
Player_ID is the primary key.
The School_ID of school_details is the foreign key of School_ID of school.
The School_Id of school_performance is the foreign key of School_ID of school.
The School_ID of player is the foreign key of School_ID of school.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - player: * (all columns)
  - school: Boys_or_Girls, Day_or_Boarding, Denomination, Enrollment, Founded, Location, School, School_ID, Year_Entered_Competition
  - school_details: * (all columns)
  - school_performance: Class_A, School_Id, School_Year

Question: What is the list of school locations sorted in ascending order of school enrollment?
Answer: SELECT LOCATION FROM school ORDER BY Enrollment ASC
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT LOCATION FROM school ORDER BY Enrollment ASC
##Instruction:
Database: school_player
Total Tables: 4
Total Columns: 26

Table Schemas:

school_player contains tables such as school, school_details, school_performance, player.
Table school has columns such as School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors.
School_ID is the primary key.
Table school_details has columns such as School_ID, Nickname, Colors, League, Class, Division.
School_ID is the primary key.
Table school_performance has columns such as School_Id, School_Year, Class_A, Class_AA.
School_Id is the primary key.
Table player has columns such as Player_ID, Player, Team, Age, Position, School_ID.
Player_ID is the primary key.
The School_ID of school_details is the foreign key of School_ID of school.
The School_Id of school_performance is the foreign key of School_ID of school.
The School_ID of player is the foreign key of School_ID of school.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - player: * (all columns)
  - school: Boys_or_Girls, Day_or_Boarding, Denomination, Enrollment, Founded, Location, School, School_ID, Year_Entered_Competition
  - school_details: * (all columns)
  - school_performance: Class_A, School_Id, School_Year

Question: List the locations of schools in descending order of founded year.
Answer: SELECT LOCATION FROM school ORDER BY Founded DESC
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT LOCATION FROM school ORDER BY Founded DESC
##Instruction:
Database: school_player
Total Tables: 4
Total Columns: 26

Table Schemas:

school_player contains tables such as school, school_details, school_performance, player.
Table school has columns such as School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors.
School_ID is the primary key.
Table school_details has columns such as School_ID, Nickname, Colors, League, Class, Division.
School_ID is the primary key.
Table school_performance has columns such as School_Id, School_Year, Class_A, Class_AA.
School_Id is the primary key.
Table player has columns such as Player_ID, Player, Team, Age, Position, School_ID.
Player_ID is the primary key.
The School_ID of school_details is the foreign key of School_ID of school.
The School_Id of school_performance is the foreign key of School_ID of school.
The School_ID of player is the foreign key of School_ID of school.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - player: * (all columns)
  - school: Boys_or_Girls, Day_or_Boarding, Denomination, Enrollment, Founded, Location, School, School_ID, Year_Entered_Competition
  - school_details: * (all columns)
  - school_performance: Class_A, School_Id, School_Year

Question: What is the list of school locations sorted in descending order of school foundation year?
Answer: SELECT LOCATION FROM school ORDER BY Founded DESC
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT LOCATION FROM school ORDER BY Founded DESC
##Instruction:
Database: school_player
Total Tables: 4
Total Columns: 26

Table Schemas:

school_player contains tables such as school, school_details, school_performance, player.
Table school has columns such as School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors.
School_ID is the primary key.
Table school_details has columns such as School_ID, Nickname, Colors, League, Class, Division.
School_ID is the primary key.
Table school_performance has columns such as School_Id, School_Year, Class_A, Class_AA.
School_Id is the primary key.
Table player has columns such as Player_ID, Player, Team, Age, Position, School_ID.
Player_ID is the primary key.
The School_ID of school_details is the foreign key of School_ID of school.
The School_Id of school_performance is the foreign key of School_ID of school.
The School_ID of player is the foreign key of School_ID of school.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - player: * (all columns)
  - school: Boys_or_Girls, Day_or_Boarding, Denomination, Enrollment, Founded, Location, School, School_ID, Year_Entered_Competition
  - school_details: * (all columns)
  - school_performance: Class_A, School_Id, School_Year

Question: What are the enrollments of schools whose denomination is not "Catholic"?
Answer: SELECT Enrollment FROM school WHERE Denomination != "Catholic"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT Enrollment FROM school WHERE Denomination != "Catholic"
##Instruction:
Database: school_player
Total Tables: 4
Total Columns: 26

Table Schemas:

school_player contains tables such as school, school_details, school_performance, player.
Table school has columns such as School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors.
School_ID is the primary key.
Table school_details has columns such as School_ID, Nickname, Colors, League, Class, Division.
School_ID is the primary key.
Table school_performance has columns such as School_Id, School_Year, Class_A, Class_AA.
School_Id is the primary key.
Table player has columns such as Player_ID, Player, Team, Age, Position, School_ID.
Player_ID is the primary key.
The School_ID of school_details is the foreign key of School_ID of school.
The School_Id of school_performance is the foreign key of School_ID of school.
The School_ID of player is the foreign key of School_ID of school.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - player: * (all columns)
  - school: Boys_or_Girls, Day_or_Boarding, Denomination, Enrollment, Founded, Location, School, School_ID, Year_Entered_Competition
  - school_details: * (all columns)
  - school_performance: Class_A, School_Id, School_Year

Question: List the enrollment for each school that does not have "Catholic" as denomination.
Answer: SELECT Enrollment FROM school WHERE Denomination != "Catholic"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT Enrollment FROM school WHERE Denomination != "Catholic"
##Instruction:
Database: school_player
Total Tables: 4
Total Columns: 26

Table Schemas:

school_player contains tables such as school, school_details, school_performance, player.
Table school has columns such as School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors.
School_ID is the primary key.
Table school_details has columns such as School_ID, Nickname, Colors, League, Class, Division.
School_ID is the primary key.
Table school_performance has columns such as School_Id, School_Year, Class_A, Class_AA.
School_Id is the primary key.
Table player has columns such as Player_ID, Player, Team, Age, Position, School_ID.
Player_ID is the primary key.
The School_ID of school_details is the foreign key of School_ID of school.
The School_Id of school_performance is the foreign key of School_ID of school.
The School_ID of player is the foreign key of School_ID of school.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - player: * (all columns)
  - school: Boys_or_Girls, Day_or_Boarding, Denomination, Enrollment, Founded, Location, School, School_ID, Year_Entered_Competition
  - school_details: * (all columns)
  - school_performance: Class_A, School_Id, School_Year

Question: What is the average enrollment of schools?
Answer: SELECT avg(Enrollment) FROM school
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT avg(Enrollment) FROM school
##Instruction:
Database: school_player
Total Tables: 4
Total Columns: 26

Table Schemas:

school_player contains tables such as school, school_details, school_performance, player.
Table school has columns such as School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors.
School_ID is the primary key.
Table school_details has columns such as School_ID, Nickname, Colors, League, Class, Division.
School_ID is the primary key.
Table school_performance has columns such as School_Id, School_Year, Class_A, Class_AA.
School_Id is the primary key.
Table player has columns such as Player_ID, Player, Team, Age, Position, School_ID.
Player_ID is the primary key.
The School_ID of school_details is the foreign key of School_ID of school.
The School_Id of school_performance is the foreign key of School_ID of school.
The School_ID of player is the foreign key of School_ID of school.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - player: * (all columns)
  - school: Boys_or_Girls, Day_or_Boarding, Denomination, Enrollment, Founded, Location, School, School_ID, Year_Entered_Competition
  - school_details: * (all columns)
  - school_performance: Class_A, School_Id, School_Year

Question: Take the average of the school enrollment.
Answer: SELECT avg(Enrollment) FROM school
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT avg(Enrollment) FROM school
##Instruction:
Database: school_player
Total Tables: 4
Total Columns: 26

Table Schemas:

school_player contains tables such as school, school_details, school_performance, player.
Table school has columns such as School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors.
School_ID is the primary key.
Table school_details has columns such as School_ID, Nickname, Colors, League, Class, Division.
School_ID is the primary key.
Table school_performance has columns such as School_Id, School_Year, Class_A, Class_AA.
School_Id is the primary key.
Table player has columns such as Player_ID, Player, Team, Age, Position, School_ID.
Player_ID is the primary key.
The School_ID of school_details is the foreign key of School_ID of school.
The School_Id of school_performance is the foreign key of School_ID of school.
The School_ID of player is the foreign key of School_ID of school.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - player: * (all columns)
  - school: Boys_or_Girls, Day_or_Boarding, Denomination, Enrollment, Founded, Location, School, School_ID, Year_Entered_Competition
  - school_details: * (all columns)
  - school_performance: Class_A, School_Id, School_Year

Question: What are the teams of the players, sorted in ascending alphabetical order?
Answer: SELECT Team FROM player ORDER BY Team ASC
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT Team FROM player ORDER BY Team ASC
##Instruction:
Database: school_player
Total Tables: 4
Total Columns: 26

Table Schemas:

school_player contains tables such as school, school_details, school_performance, player.
Table school has columns such as School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors.
School_ID is the primary key.
Table school_details has columns such as School_ID, Nickname, Colors, League, Class, Division.
School_ID is the primary key.
Table school_performance has columns such as School_Id, School_Year, Class_A, Class_AA.
School_Id is the primary key.
Table player has columns such as Player_ID, Player, Team, Age, Position, School_ID.
Player_ID is the primary key.
The School_ID of school_details is the foreign key of School_ID of school.
The School_Id of school_performance is the foreign key of School_ID of school.
The School_ID of player is the foreign key of School_ID of school.

##Role Access Policy (Column-Level):
Role: DataOperator_2
Accessible Columns:
  - player: * (all columns)
  - school: Boys_or_Girls, Day_or_Boarding, Denomination, Enrollment, Founded, Location, School, School_ID, Year_Entered_Competition
  - school_details: * (all columns)
  - school_performance: Class_A, School_Id, School_Year

Question: Find the team of each player and sort them in ascending alphabetical order.
Answer: SELECT Team FROM player ORDER BY Team ASC
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT Team FROM player ORDER BY Team ASC