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_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 different positions of players are there?
Answer: SELECT count(DISTINCT POSITION) FROM player
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(DISTINCT POSITION) FROM player
##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 distinct player positions.
Answer: SELECT count(DISTINCT POSITION) FROM player
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(DISTINCT POSITION) FROM player
##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 the player of the highest age.
Answer: SELECT Team FROM player ORDER BY Age DESC LIMIT 1
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT Team FROM player ORDER BY Age DESC LIMIT 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: Which team has the oldest player?
Answer: SELECT Team FROM player ORDER BY Age DESC LIMIT 1
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT Team FROM player ORDER BY Age DESC LIMIT 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: List the teams of the players with the top 5 largest ages.
Answer: SELECT Team FROM player ORDER BY Age DESC LIMIT 5
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT Team FROM player ORDER BY Age DESC LIMIT 5
##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 that have the 5 oldest players?
Answer: SELECT Team FROM player ORDER BY Age DESC LIMIT 5
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT Team FROM player ORDER BY Age DESC LIMIT 5
##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: For each player, show the team and the location of school they belong to.
Answer: SELECT T1.Team ,  T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT T1.Team ,  T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID
##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 team and the location of school each player belongs to?
Answer: SELECT T1.Team ,  T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT T1.Team ,  T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID
##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: Show the locations of schools that have more than 1 player.
Answer: SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*)  >  1
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID GROUP BY T1.School_ID 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: Which schools have more than 1 player? Give me the school locations.
Answer: SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*)  >  1
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID GROUP BY T1.School_ID 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: Show the denomination of the school that has the most players.
Answer: SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 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: What is the denomination of the school the most players belong to?
Answer: SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 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: Show locations and nicknames of schools.
Answer: SELECT T1.Location ,  T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID  =  T2.School_ID
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT T1.Location ,  T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID  =  T2.School_ID
##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 location and nickname of each school?
Answer: SELECT T1.Location ,  T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID  =  T2.School_ID
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT T1.Location ,  T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID  =  T2.School_ID
##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: Please show different denominations and the corresponding number of schools.
Answer: SELECT Denomination ,  COUNT(*) FROM school GROUP BY Denomination
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT Denomination ,  COUNT(*) FROM school GROUP BY Denomination