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

Table Schemas:

sports_competition contains tables such as club, club_rank, player, competition, competition_result.
Table club has columns such as Club_ID, name, Region, Start_year.
Club_ID is the primary key.
Table club_rank has columns such as Rank, Club_ID, Gold, Silver, Bronze, Total.
Rank is the primary key.
Table player has columns such as Player_ID, name, Position, Club_ID, Apps, Tries, Goals, Points.
Player_ID is the primary key.
Table competition has columns such as Competition_ID, Year, Competition_type, Country.
Competition_ID is the primary key.
Table competition_result has columns such as Competition_ID, Club_ID_1, Club_ID_2, Score.
Competition_ID is the primary key.
The Club_ID of club_rank is the foreign key of Club_ID of club.
The Club_ID of player is the foreign key of Club_ID of club.
The Competition_ID of competition_result is the foreign key of Competition_ID of competition.
The Club_ID_2 of competition_result is the foreign key of Club_ID of club.
The Club_ID_1 of competition_result is the foreign key of Club_ID of club.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - club: * (all columns)
  - club_rank: Bronze, Club_ID, Rank, Silver, Total
  - competition: * (all columns)
  - competition_result: Club_ID_1, Club_ID_2, Competition_ID
  - player: Apps, Goals, Points, Position, Tries, name

Question: Show the names of clubs that have players with position "Right Wing".
Answer: Sorry, I cannot answer.
Permission: denied (All required columns are permitted)
Gold SQL: SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID WHERE T2.Position  =  "Right Wing"
##Instruction:
Database: sports_competition
Total Tables: 5
Total Columns: 26

Table Schemas:

sports_competition contains tables such as club, club_rank, player, competition, competition_result.
Table club has columns such as Club_ID, name, Region, Start_year.
Club_ID is the primary key.
Table club_rank has columns such as Rank, Club_ID, Gold, Silver, Bronze, Total.
Rank is the primary key.
Table player has columns such as Player_ID, name, Position, Club_ID, Apps, Tries, Goals, Points.
Player_ID is the primary key.
Table competition has columns such as Competition_ID, Year, Competition_type, Country.
Competition_ID is the primary key.
Table competition_result has columns such as Competition_ID, Club_ID_1, Club_ID_2, Score.
Competition_ID is the primary key.
The Club_ID of club_rank is the foreign key of Club_ID of club.
The Club_ID of player is the foreign key of Club_ID of club.
The Competition_ID of competition_result is the foreign key of Competition_ID of competition.
The Club_ID_2 of competition_result is the foreign key of Club_ID of club.
The Club_ID_1 of competition_result is the foreign key of Club_ID of club.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - club: * (all columns)
  - club_rank: Bronze, Club_ID, Rank, Silver, Total
  - competition: * (all columns)
  - competition_result: Club_ID_1, Club_ID_2, Competition_ID
  - player: Apps, Goals, Points, Position, Tries, name

Question: What are the names of the clubs that have players in the position of "Right Wing"?
Answer: Sorry, I cannot answer.
Permission: denied (All required columns are permitted)
Gold SQL: SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID WHERE T2.Position  =  "Right Wing"
##Instruction:
Database: sports_competition
Total Tables: 5
Total Columns: 26

Table Schemas:

sports_competition contains tables such as club, club_rank, player, competition, competition_result.
Table club has columns such as Club_ID, name, Region, Start_year.
Club_ID is the primary key.
Table club_rank has columns such as Rank, Club_ID, Gold, Silver, Bronze, Total.
Rank is the primary key.
Table player has columns such as Player_ID, name, Position, Club_ID, Apps, Tries, Goals, Points.
Player_ID is the primary key.
Table competition has columns such as Competition_ID, Year, Competition_type, Country.
Competition_ID is the primary key.
Table competition_result has columns such as Competition_ID, Club_ID_1, Club_ID_2, Score.
Competition_ID is the primary key.
The Club_ID of club_rank is the foreign key of Club_ID of club.
The Club_ID of player is the foreign key of Club_ID of club.
The Competition_ID of competition_result is the foreign key of Competition_ID of competition.
The Club_ID_2 of competition_result is the foreign key of Club_ID of club.
The Club_ID_1 of competition_result is the foreign key of Club_ID of club.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - club: * (all columns)
  - club_rank: Bronze, Club_ID, Rank, Silver, Total
  - competition: * (all columns)
  - competition_result: Club_ID_1, Club_ID_2, Competition_ID
  - player: Apps, Goals, Points, Position, Tries, name

Question: What is the average points of players from club with name "AIB".
Answer: Sorry, I cannot answer.
Permission: denied (All required columns are permitted)
Gold SQL: SELECT avg(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID WHERE T1.name  =  "AIB"
##Instruction:
Database: sports_competition
Total Tables: 5
Total Columns: 26

Table Schemas:

sports_competition contains tables such as club, club_rank, player, competition, competition_result.
Table club has columns such as Club_ID, name, Region, Start_year.
Club_ID is the primary key.
Table club_rank has columns such as Rank, Club_ID, Gold, Silver, Bronze, Total.
Rank is the primary key.
Table player has columns such as Player_ID, name, Position, Club_ID, Apps, Tries, Goals, Points.
Player_ID is the primary key.
Table competition has columns such as Competition_ID, Year, Competition_type, Country.
Competition_ID is the primary key.
Table competition_result has columns such as Competition_ID, Club_ID_1, Club_ID_2, Score.
Competition_ID is the primary key.
The Club_ID of club_rank is the foreign key of Club_ID of club.
The Club_ID of player is the foreign key of Club_ID of club.
The Competition_ID of competition_result is the foreign key of Competition_ID of competition.
The Club_ID_2 of competition_result is the foreign key of Club_ID of club.
The Club_ID_1 of competition_result is the foreign key of Club_ID of club.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - club: * (all columns)
  - club_rank: Bronze, Club_ID, Rank, Silver, Total
  - competition: * (all columns)
  - competition_result: Club_ID_1, Club_ID_2, Competition_ID
  - player: Apps, Goals, Points, Position, Tries, name

Question: What is the average number of points for players from the "AIB" club?
Answer: Sorry, I cannot answer.
Permission: denied (All required columns are permitted)
Gold SQL: SELECT avg(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID WHERE T1.name  =  "AIB"
##Instruction:
Database: sports_competition
Total Tables: 5
Total Columns: 26

Table Schemas:

sports_competition contains tables such as club, club_rank, player, competition, competition_result.
Table club has columns such as Club_ID, name, Region, Start_year.
Club_ID is the primary key.
Table club_rank has columns such as Rank, Club_ID, Gold, Silver, Bronze, Total.
Rank is the primary key.
Table player has columns such as Player_ID, name, Position, Club_ID, Apps, Tries, Goals, Points.
Player_ID is the primary key.
Table competition has columns such as Competition_ID, Year, Competition_type, Country.
Competition_ID is the primary key.
Table competition_result has columns such as Competition_ID, Club_ID_1, Club_ID_2, Score.
Competition_ID is the primary key.
The Club_ID of club_rank is the foreign key of Club_ID of club.
The Club_ID of player is the foreign key of Club_ID of club.
The Competition_ID of competition_result is the foreign key of Competition_ID of competition.
The Club_ID_2 of competition_result is the foreign key of Club_ID of club.
The Club_ID_1 of competition_result is the foreign key of Club_ID of club.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - club: * (all columns)
  - club_rank: Bronze, Club_ID, Rank, Silver, Total
  - competition: * (all columns)
  - competition_result: Club_ID_1, Club_ID_2, Competition_ID
  - player: Apps, Goals, Points, Position, Tries, name

Question: List the position of players and the average number of points of players of each position.
Answer: SELECT POSITION ,  avg(Points) FROM player GROUP BY POSITION
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT POSITION ,  avg(Points) FROM player GROUP BY POSITION
##Instruction:
Database: sports_competition
Total Tables: 5
Total Columns: 26

Table Schemas:

sports_competition contains tables such as club, club_rank, player, competition, competition_result.
Table club has columns such as Club_ID, name, Region, Start_year.
Club_ID is the primary key.
Table club_rank has columns such as Rank, Club_ID, Gold, Silver, Bronze, Total.
Rank is the primary key.
Table player has columns such as Player_ID, name, Position, Club_ID, Apps, Tries, Goals, Points.
Player_ID is the primary key.
Table competition has columns such as Competition_ID, Year, Competition_type, Country.
Competition_ID is the primary key.
Table competition_result has columns such as Competition_ID, Club_ID_1, Club_ID_2, Score.
Competition_ID is the primary key.
The Club_ID of club_rank is the foreign key of Club_ID of club.
The Club_ID of player is the foreign key of Club_ID of club.
The Competition_ID of competition_result is the foreign key of Competition_ID of competition.
The Club_ID_2 of competition_result is the foreign key of Club_ID of club.
The Club_ID_1 of competition_result is the foreign key of Club_ID of club.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - club: * (all columns)
  - club_rank: Bronze, Club_ID, Rank, Silver, Total
  - competition: * (all columns)
  - competition_result: Club_ID_1, Club_ID_2, Competition_ID
  - player: Apps, Goals, Points, Position, Tries, name

Question: For each position, what is the average number of points for players in that position?
Answer: SELECT POSITION ,  avg(Points) FROM player GROUP BY POSITION
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT POSITION ,  avg(Points) FROM player GROUP BY POSITION
##Instruction:
Database: sports_competition
Total Tables: 5
Total Columns: 26

Table Schemas:

sports_competition contains tables such as club, club_rank, player, competition, competition_result.
Table club has columns such as Club_ID, name, Region, Start_year.
Club_ID is the primary key.
Table club_rank has columns such as Rank, Club_ID, Gold, Silver, Bronze, Total.
Rank is the primary key.
Table player has columns such as Player_ID, name, Position, Club_ID, Apps, Tries, Goals, Points.
Player_ID is the primary key.
Table competition has columns such as Competition_ID, Year, Competition_type, Country.
Competition_ID is the primary key.
Table competition_result has columns such as Competition_ID, Club_ID_1, Club_ID_2, Score.
Competition_ID is the primary key.
The Club_ID of club_rank is the foreign key of Club_ID of club.
The Club_ID of player is the foreign key of Club_ID of club.
The Competition_ID of competition_result is the foreign key of Competition_ID of competition.
The Club_ID_2 of competition_result is the foreign key of Club_ID of club.
The Club_ID_1 of competition_result is the foreign key of Club_ID of club.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - club: * (all columns)
  - club_rank: Bronze, Club_ID, Rank, Silver, Total
  - competition: * (all columns)
  - competition_result: Club_ID_1, Club_ID_2, Competition_ID
  - player: Apps, Goals, Points, Position, Tries, name

Question: List the position of players with average number of points scored by players of that position bigger than 20.
Answer: SELECT POSITION FROM player GROUP BY name HAVING avg(Points)  >=  20
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT POSITION FROM player GROUP BY name HAVING avg(Points)  >=  20
##Instruction:
Database: sports_competition
Total Tables: 5
Total Columns: 26

Table Schemas:

sports_competition contains tables such as club, club_rank, player, competition, competition_result.
Table club has columns such as Club_ID, name, Region, Start_year.
Club_ID is the primary key.
Table club_rank has columns such as Rank, Club_ID, Gold, Silver, Bronze, Total.
Rank is the primary key.
Table player has columns such as Player_ID, name, Position, Club_ID, Apps, Tries, Goals, Points.
Player_ID is the primary key.
Table competition has columns such as Competition_ID, Year, Competition_type, Country.
Competition_ID is the primary key.
Table competition_result has columns such as Competition_ID, Club_ID_1, Club_ID_2, Score.
Competition_ID is the primary key.
The Club_ID of club_rank is the foreign key of Club_ID of club.
The Club_ID of player is the foreign key of Club_ID of club.
The Competition_ID of competition_result is the foreign key of Competition_ID of competition.
The Club_ID_2 of competition_result is the foreign key of Club_ID of club.
The Club_ID_1 of competition_result is the foreign key of Club_ID of club.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - club: * (all columns)
  - club_rank: Bronze, Club_ID, Rank, Silver, Total
  - competition: * (all columns)
  - competition_result: Club_ID_1, Club_ID_2, Competition_ID
  - player: Apps, Goals, Points, Position, Tries, name

Question: What are the positions of players whose average number of points scored by that position is larger than 20?
Answer: SELECT POSITION FROM player GROUP BY name HAVING avg(Points)  >=  20
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT POSITION FROM player GROUP BY name HAVING avg(Points)  >=  20
##Instruction:
Database: sports_competition
Total Tables: 5
Total Columns: 26

Table Schemas:

sports_competition contains tables such as club, club_rank, player, competition, competition_result.
Table club has columns such as Club_ID, name, Region, Start_year.
Club_ID is the primary key.
Table club_rank has columns such as Rank, Club_ID, Gold, Silver, Bronze, Total.
Rank is the primary key.
Table player has columns such as Player_ID, name, Position, Club_ID, Apps, Tries, Goals, Points.
Player_ID is the primary key.
Table competition has columns such as Competition_ID, Year, Competition_type, Country.
Competition_ID is the primary key.
Table competition_result has columns such as Competition_ID, Club_ID_1, Club_ID_2, Score.
Competition_ID is the primary key.
The Club_ID of club_rank is the foreign key of Club_ID of club.
The Club_ID of player is the foreign key of Club_ID of club.
The Competition_ID of competition_result is the foreign key of Competition_ID of competition.
The Club_ID_2 of competition_result is the foreign key of Club_ID of club.
The Club_ID_1 of competition_result is the foreign key of Club_ID of club.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - club: * (all columns)
  - club_rank: Bronze, Club_ID, Rank, Silver, Total
  - competition: * (all columns)
  - competition_result: Club_ID_1, Club_ID_2, Competition_ID
  - player: Apps, Goals, Points, Position, Tries, name

Question: List the types of competition and the number of competitions of each type.
Answer: SELECT Competition_type ,  COUNT(*) FROM competition GROUP BY Competition_type
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT Competition_type ,  COUNT(*) FROM competition GROUP BY Competition_type
##Instruction:
Database: sports_competition
Total Tables: 5
Total Columns: 26

Table Schemas:

sports_competition contains tables such as club, club_rank, player, competition, competition_result.
Table club has columns such as Club_ID, name, Region, Start_year.
Club_ID is the primary key.
Table club_rank has columns such as Rank, Club_ID, Gold, Silver, Bronze, Total.
Rank is the primary key.
Table player has columns such as Player_ID, name, Position, Club_ID, Apps, Tries, Goals, Points.
Player_ID is the primary key.
Table competition has columns such as Competition_ID, Year, Competition_type, Country.
Competition_ID is the primary key.
Table competition_result has columns such as Competition_ID, Club_ID_1, Club_ID_2, Score.
Competition_ID is the primary key.
The Club_ID of club_rank is the foreign key of Club_ID of club.
The Club_ID of player is the foreign key of Club_ID of club.
The Competition_ID of competition_result is the foreign key of Competition_ID of competition.
The Club_ID_2 of competition_result is the foreign key of Club_ID of club.
The Club_ID_1 of competition_result is the foreign key of Club_ID of club.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - club: * (all columns)
  - club_rank: Bronze, Club_ID, Rank, Silver, Total
  - competition: * (all columns)
  - competition_result: Club_ID_1, Club_ID_2, Competition_ID
  - player: Apps, Goals, Points, Position, Tries, name

Question: What are the types of competition and number of competitions for that type?
Answer: SELECT Competition_type ,  COUNT(*) FROM competition GROUP BY Competition_type
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT Competition_type ,  COUNT(*) FROM competition GROUP BY Competition_type
##Instruction:
Database: sports_competition
Total Tables: 5
Total Columns: 26

Table Schemas:

sports_competition contains tables such as club, club_rank, player, competition, competition_result.
Table club has columns such as Club_ID, name, Region, Start_year.
Club_ID is the primary key.
Table club_rank has columns such as Rank, Club_ID, Gold, Silver, Bronze, Total.
Rank is the primary key.
Table player has columns such as Player_ID, name, Position, Club_ID, Apps, Tries, Goals, Points.
Player_ID is the primary key.
Table competition has columns such as Competition_ID, Year, Competition_type, Country.
Competition_ID is the primary key.
Table competition_result has columns such as Competition_ID, Club_ID_1, Club_ID_2, Score.
Competition_ID is the primary key.
The Club_ID of club_rank is the foreign key of Club_ID of club.
The Club_ID of player is the foreign key of Club_ID of club.
The Competition_ID of competition_result is the foreign key of Competition_ID of competition.
The Club_ID_2 of competition_result is the foreign key of Club_ID of club.
The Club_ID_1 of competition_result is the foreign key of Club_ID of club.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - club: * (all columns)
  - club_rank: Bronze, Club_ID, Rank, Silver, Total
  - competition: * (all columns)
  - competition_result: Club_ID_1, Club_ID_2, Competition_ID
  - player: Apps, Goals, Points, Position, Tries, name

Question: List the most common type of competition.
Answer: SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1
##Instruction:
Database: sports_competition
Total Tables: 5
Total Columns: 26

Table Schemas:

sports_competition contains tables such as club, club_rank, player, competition, competition_result.
Table club has columns such as Club_ID, name, Region, Start_year.
Club_ID is the primary key.
Table club_rank has columns such as Rank, Club_ID, Gold, Silver, Bronze, Total.
Rank is the primary key.
Table player has columns such as Player_ID, name, Position, Club_ID, Apps, Tries, Goals, Points.
Player_ID is the primary key.
Table competition has columns such as Competition_ID, Year, Competition_type, Country.
Competition_ID is the primary key.
Table competition_result has columns such as Competition_ID, Club_ID_1, Club_ID_2, Score.
Competition_ID is the primary key.
The Club_ID of club_rank is the foreign key of Club_ID of club.
The Club_ID of player is the foreign key of Club_ID of club.
The Competition_ID of competition_result is the foreign key of Competition_ID of competition.
The Club_ID_2 of competition_result is the foreign key of Club_ID of club.
The Club_ID_1 of competition_result is the foreign key of Club_ID of club.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - club: * (all columns)
  - club_rank: Bronze, Club_ID, Rank, Silver, Total
  - competition: * (all columns)
  - competition_result: Club_ID_1, Club_ID_2, Competition_ID
  - player: Apps, Goals, Points, Position, Tries, name

Question: What is the most common competition type?
Answer: SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1
##Instruction:
Database: sports_competition
Total Tables: 5
Total Columns: 26

Table Schemas:

sports_competition contains tables such as club, club_rank, player, competition, competition_result.
Table club has columns such as Club_ID, name, Region, Start_year.
Club_ID is the primary key.
Table club_rank has columns such as Rank, Club_ID, Gold, Silver, Bronze, Total.
Rank is the primary key.
Table player has columns such as Player_ID, name, Position, Club_ID, Apps, Tries, Goals, Points.
Player_ID is the primary key.
Table competition has columns such as Competition_ID, Year, Competition_type, Country.
Competition_ID is the primary key.
Table competition_result has columns such as Competition_ID, Club_ID_1, Club_ID_2, Score.
Competition_ID is the primary key.
The Club_ID of club_rank is the foreign key of Club_ID of club.
The Club_ID of player is the foreign key of Club_ID of club.
The Competition_ID of competition_result is the foreign key of Competition_ID of competition.
The Club_ID_2 of competition_result is the foreign key of Club_ID of club.
The Club_ID_1 of competition_result is the foreign key of Club_ID of club.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - club: * (all columns)
  - club_rank: Bronze, Club_ID, Rank, Silver, Total
  - competition: * (all columns)
  - competition_result: Club_ID_1, Club_ID_2, Competition_ID
  - player: Apps, Goals, Points, Position, Tries, name

Question: List the types of competition that have at most five competitions of that type.
Answer: SELECT Competition_type FROM competition GROUP BY Competition_type HAVING COUNT(*)  <=  5
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT Competition_type FROM competition GROUP BY Competition_type HAVING COUNT(*)  <=  5