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_2
Accessible Columns:
  - club: * (all columns)
  - club_rank: * (all columns)
  - competition: * (all columns)
  - competition_result: * (all columns)
  - player: * (all columns)

Question: What are the countries that have never participated in any friendly-type competitions?
Answer: SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type  =  'Friendly'
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type  =  'Friendly'
##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_3
Accessible Columns:
  - club: * (all columns)
  - club_rank: Bronze, Gold, Rank, Silver
  - competition: * (all columns)
  - competition_result: Club_ID_2, Competition_ID, Score
  - player: * (all columns)

Question: How many clubs are there?
Answer: SELECT count(*) FROM club
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(*) FROM club
##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_3
Accessible Columns:
  - club: * (all columns)
  - club_rank: Bronze, Gold, Rank, Silver
  - competition: * (all columns)
  - competition_result: Club_ID_2, Competition_ID, Score
  - player: * (all columns)

Question: What is the total number of clubs?
Answer: SELECT count(*) FROM club
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(*) FROM club
##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_3
Accessible Columns:
  - club: * (all columns)
  - club_rank: Bronze, Gold, Rank, Silver
  - competition: * (all columns)
  - competition_result: Club_ID_2, Competition_ID, Score
  - player: * (all columns)

Question: List the distinct region of clubs in ascending alphabetical order.
Answer: SELECT DISTINCT Region FROM club ORDER BY Region ASC
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT DISTINCT Region FROM club ORDER BY Region ASC
##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_3
Accessible Columns:
  - club: * (all columns)
  - club_rank: Bronze, Gold, Rank, Silver
  - competition: * (all columns)
  - competition_result: Club_ID_2, Competition_ID, Score
  - player: * (all columns)

Question: What are the different regions of clubs in ascending alphabetical order?
Answer: SELECT DISTINCT Region FROM club ORDER BY Region ASC
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT DISTINCT Region FROM club ORDER BY Region ASC
##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_3
Accessible Columns:
  - club: * (all columns)
  - club_rank: Bronze, Gold, Rank, Silver
  - competition: * (all columns)
  - competition_result: Club_ID_2, Competition_ID, Score
  - player: * (all columns)

Question: What is the average number of gold medals for clubs?
Answer: SELECT avg(Gold) FROM club_rank
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT avg(Gold) FROM club_rank
##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_3
Accessible Columns:
  - club: * (all columns)
  - club_rank: Bronze, Gold, Rank, Silver
  - competition: * (all columns)
  - competition_result: Club_ID_2, Competition_ID, Score
  - player: * (all columns)

Question: What is the average number of gold medals for a club?
Answer: SELECT avg(Gold) FROM club_rank
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT avg(Gold) FROM club_rank
##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_3
Accessible Columns:
  - club: * (all columns)
  - club_rank: Bronze, Gold, Rank, Silver
  - competition: * (all columns)
  - competition_result: Club_ID_2, Competition_ID, Score
  - player: * (all columns)

Question: What are the types and countries of competitions?
Answer: SELECT Competition_type ,  Country FROM competition
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT Competition_type ,  Country FROM competition
##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_3
Accessible Columns:
  - club: * (all columns)
  - club_rank: Bronze, Gold, Rank, Silver
  - competition: * (all columns)
  - competition_result: Club_ID_2, Competition_ID, Score
  - player: * (all columns)

Question: What are the types of every competition and in which countries are they located?
Answer: SELECT Competition_type ,  Country FROM competition
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT Competition_type ,  Country FROM competition
##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_3
Accessible Columns:
  - club: * (all columns)
  - club_rank: Bronze, Gold, Rank, Silver
  - competition: * (all columns)
  - competition_result: Club_ID_2, Competition_ID, Score
  - player: * (all columns)

Question: What are the distinct years in which the competitions type is not "Tournament"?
Answer: SELECT DISTINCT YEAR FROM competition WHERE Competition_type != "Tournament"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT DISTINCT YEAR FROM competition WHERE Competition_type != "Tournament"
##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_3
Accessible Columns:
  - club: * (all columns)
  - club_rank: Bronze, Gold, Rank, Silver
  - competition: * (all columns)
  - competition_result: Club_ID_2, Competition_ID, Score
  - player: * (all columns)

Question: What are the different years for all competitions that are not of type equal to tournament?
Answer: SELECT DISTINCT YEAR FROM competition WHERE Competition_type != "Tournament"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT DISTINCT YEAR FROM competition WHERE Competition_type != "Tournament"
##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_3
Accessible Columns:
  - club: * (all columns)
  - club_rank: Bronze, Gold, Rank, Silver
  - competition: * (all columns)
  - competition_result: Club_ID_2, Competition_ID, Score
  - player: * (all columns)

Question: What are the maximum and minimum number of silver medals for clubs.
Answer: SELECT max(Silver) ,  min(Silver) FROM club_rank
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT max(Silver) ,  min(Silver) FROM club_rank
##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_3
Accessible Columns:
  - club: * (all columns)
  - club_rank: Bronze, Gold, Rank, Silver
  - competition: * (all columns)
  - competition_result: Club_ID_2, Competition_ID, Score
  - player: * (all columns)

Question: What are the maximum and minimum number of silver medals for all the clubs?
Answer: SELECT max(Silver) ,  min(Silver) FROM club_rank
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT max(Silver) ,  min(Silver) FROM club_rank
##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_3
Accessible Columns:
  - club: * (all columns)
  - club_rank: Bronze, Gold, Rank, Silver
  - competition: * (all columns)
  - competition_result: Club_ID_2, Competition_ID, Score
  - player: * (all columns)

Question: How many clubs have total medals less than 10?
Answer: Sorry, I cannot answer.
Permission: denied (All required columns are permitted)
Gold SQL: SELECT count(*) FROM club_rank WHERE Total  <  10