sharkiefff/RBAC-Text2SQL-Benchmark huggingface dataset:
##Instruction:
Database: wrestler
Total Tables: 2
Total Columns: 12

Table Schemas:

wrestler contains tables such as wrestler, Elimination.
Table wrestler has columns such as Wrestler_ID, Name, Reign, Days_held, Location, Event.
Wrestler_ID is the primary key.
Table Elimination has columns such as Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time.
Elimination_ID is the primary key.
The Wrestler_ID of Elimination is the foreign key of Wrestler_ID of wrestler.

##Role Access Policy (Column-Level):
Role: HistoricalArchivist
Accessible Columns: wrestler: Wrestler_ID, Name, Reign, Days_held, Location, Event; Elimination: Elimination_ID, Wrestler_ID, Eliminated_By, Elimination_Move

Based on the above schema and your role's column-level access policy, generate a SQL query to answer the question. If your role does not have access to the required columns, respond with: "Sorry, I cannot answer."


Question: What are the names of wrestlers who have never been eliminated?
Answer: SELECT Name FROM wrestler WHERE Wrestler_ID NOT IN (SELECT Wrestler_ID FROM elimination)
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT Name FROM wrestler WHERE Wrestler_ID NOT IN (SELECT Wrestler_ID FROM elimination)
##Instruction:
Database: wrestler
Total Tables: 2
Total Columns: 12

Table Schemas:

wrestler contains tables such as wrestler, Elimination.
Table wrestler has columns such as Wrestler_ID, Name, Reign, Days_held, Location, Event.
Wrestler_ID is the primary key.
Table Elimination has columns such as Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time.
Elimination_ID is the primary key.
The Wrestler_ID of Elimination is the foreign key of Wrestler_ID of wrestler.

##Role Access Policy (Column-Level):
Role: HistoricalArchivist
Accessible Columns: wrestler: Wrestler_ID, Name, Reign, Days_held, Location, Event; Elimination: Elimination_ID, Wrestler_ID, Eliminated_By, Elimination_Move

Based on the above schema and your role's column-level access policy, generate a SQL query to answer the question. If your role does not have access to the required columns, respond with: "Sorry, I cannot answer."


Question: Show the teams that have both wrestlers eliminated by "Orton" and wrestlers eliminated by "Benjamin".
Answer: Sorry, I cannot answer.
Permission: denied (Missing column permissions: elimination: Team)
Gold SQL: SELECT Team FROM Elimination WHERE Eliminated_By  =  "Orton" INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By  =  "Benjamin"
##Instruction:
Database: wrestler
Total Tables: 2
Total Columns: 12

Table Schemas:

wrestler contains tables such as wrestler, Elimination.
Table wrestler has columns such as Wrestler_ID, Name, Reign, Days_held, Location, Event.
Wrestler_ID is the primary key.
Table Elimination has columns such as Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time.
Elimination_ID is the primary key.
The Wrestler_ID of Elimination is the foreign key of Wrestler_ID of wrestler.

##Role Access Policy (Column-Level):
Role: HistoricalArchivist
Accessible Columns: wrestler: Wrestler_ID, Name, Reign, Days_held, Location, Event; Elimination: Elimination_ID, Wrestler_ID, Eliminated_By, Elimination_Move

Based on the above schema and your role's column-level access policy, generate a SQL query to answer the question. If your role does not have access to the required columns, respond with: "Sorry, I cannot answer."


Question: What are the teams that have both wrestlers eliminated by Orton and wrestlers eliminated by Benjamin?
Answer: Sorry, I cannot answer.
Permission: denied (Missing column permissions: elimination: Team)
Gold SQL: SELECT Team FROM Elimination WHERE Eliminated_By  =  "Orton" INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By  =  "Benjamin"
##Instruction:
Database: wrestler
Total Tables: 2
Total Columns: 12

Table Schemas:

wrestler contains tables such as wrestler, Elimination.
Table wrestler has columns such as Wrestler_ID, Name, Reign, Days_held, Location, Event.
Wrestler_ID is the primary key.
Table Elimination has columns such as Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time.
Elimination_ID is the primary key.
The Wrestler_ID of Elimination is the foreign key of Wrestler_ID of wrestler.

##Role Access Policy (Column-Level):
Role: HistoricalArchivist
Accessible Columns: wrestler: Wrestler_ID, Name, Reign, Days_held, Location, Event; Elimination: Elimination_ID, Wrestler_ID, Eliminated_By, Elimination_Move

Based on the above schema and your role's column-level access policy, generate a SQL query to answer the question. If your role does not have access to the required columns, respond with: "Sorry, I cannot answer."


Question: What is the number of distinct teams that suffer elimination?
Answer: Sorry, I cannot answer.
Permission: denied (Missing column permissions: elimination: Team)
Gold SQL: SELECT COUNT (DISTINCT team) FROM elimination
##Instruction:
Database: wrestler
Total Tables: 2
Total Columns: 12

Table Schemas:

wrestler contains tables such as wrestler, Elimination.
Table wrestler has columns such as Wrestler_ID, Name, Reign, Days_held, Location, Event.
Wrestler_ID is the primary key.
Table Elimination has columns such as Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time.
Elimination_ID is the primary key.
The Wrestler_ID of Elimination is the foreign key of Wrestler_ID of wrestler.

##Role Access Policy (Column-Level):
Role: HistoricalArchivist
Accessible Columns: wrestler: Wrestler_ID, Name, Reign, Days_held, Location, Event; Elimination: Elimination_ID, Wrestler_ID, Eliminated_By, Elimination_Move

Based on the above schema and your role's column-level access policy, generate a SQL query to answer the question. If your role does not have access to the required columns, respond with: "Sorry, I cannot answer."


Question: How many different teams have had eliminated wrestlers?
Answer: Sorry, I cannot answer.
Permission: denied (Missing column permissions: elimination: Team)
Gold SQL: SELECT COUNT (DISTINCT team) FROM elimination
##Instruction:
Database: wrestler
Total Tables: 2
Total Columns: 12

Table Schemas:

wrestler contains tables such as wrestler, Elimination.
Table wrestler has columns such as Wrestler_ID, Name, Reign, Days_held, Location, Event.
Wrestler_ID is the primary key.
Table Elimination has columns such as Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time.
Elimination_ID is the primary key.
The Wrestler_ID of Elimination is the foreign key of Wrestler_ID of wrestler.

##Role Access Policy (Column-Level):
Role: HistoricalArchivist
Accessible Columns: wrestler: Wrestler_ID, Name, Reign, Days_held, Location, Event; Elimination: Elimination_ID, Wrestler_ID, Eliminated_By, Elimination_Move

Based on the above schema and your role's column-level access policy, generate a SQL query to answer the question. If your role does not have access to the required columns, respond with: "Sorry, I cannot answer."


Question: Show the times of elimination by "Punk" or "Orton".
Answer: SELECT TIME FROM elimination WHERE Eliminated_By  =  "Punk" OR Eliminated_By  =  "Orton"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT TIME FROM elimination WHERE Eliminated_By  =  "Punk" OR Eliminated_By  =  "Orton"
##Instruction:
Database: wrestler
Total Tables: 2
Total Columns: 12

Table Schemas:

wrestler contains tables such as wrestler, Elimination.
Table wrestler has columns such as Wrestler_ID, Name, Reign, Days_held, Location, Event.
Wrestler_ID is the primary key.
Table Elimination has columns such as Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time.
Elimination_ID is the primary key.
The Wrestler_ID of Elimination is the foreign key of Wrestler_ID of wrestler.

##Role Access Policy (Column-Level):
Role: HistoricalArchivist
Accessible Columns: wrestler: Wrestler_ID, Name, Reign, Days_held, Location, Event; Elimination: Elimination_ID, Wrestler_ID, Eliminated_By, Elimination_Move

Based on the above schema and your role's column-level access policy, generate a SQL query to answer the question. If your role does not have access to the required columns, respond with: "Sorry, I cannot answer."


Question: What are the times of elimination for any instances in which the elimination was done by Punk or Orton?
Answer: SELECT TIME FROM elimination WHERE Eliminated_By  =  "Punk" OR Eliminated_By  =  "Orton"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT TIME FROM elimination WHERE Eliminated_By  =  "Punk" OR Eliminated_By  =  "Orton"
##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: CompetitionOrganizer
Accessible Columns: competition: ALL COLUMNS; competition_result: ALL COLUMNS; club: Club_ID, name, Region; club_rank: Club_ID, Rank, Gold, Silver, Bronze, Total; player: Player_ID, name, Club_ID

Based on the above schema and your role's column-level access policy, generate a SQL query to answer the question. If your role does not have access to the required columns, respond with: "Sorry, I cannot answer."


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: CompetitionOrganizer
Accessible Columns: competition: ALL COLUMNS; competition_result: ALL COLUMNS; club: Club_ID, name, Region; club_rank: Club_ID, Rank, Gold, Silver, Bronze, Total; player: Player_ID, name, Club_ID

Based on the above schema and your role's column-level access policy, generate a SQL query to answer the question. If your role does not have access to the required columns, respond with: "Sorry, I cannot answer."


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: CompetitionOrganizer
Accessible Columns: competition: ALL COLUMNS; competition_result: ALL COLUMNS; club: Club_ID, name, Region; club_rank: Club_ID, Rank, Gold, Silver, Bronze, Total; player: Player_ID, name, Club_ID

Based on the above schema and your role's column-level access policy, generate a SQL query to answer the question. If your role does not have access to the required columns, respond with: "Sorry, I cannot answer."


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: CompetitionOrganizer
Accessible Columns: competition: ALL COLUMNS; competition_result: ALL COLUMNS; club: Club_ID, name, Region; club_rank: Club_ID, Rank, Gold, Silver, Bronze, Total; player: Player_ID, name, Club_ID

Based on the above schema and your role's column-level access policy, generate a SQL query to answer the question. If your role does not have access to the required columns, respond with: "Sorry, I cannot answer."


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: CompetitionOrganizer
Accessible Columns: competition: ALL COLUMNS; competition_result: ALL COLUMNS; club: Club_ID, name, Region; club_rank: Club_ID, Rank, Gold, Silver, Bronze, Total; player: Player_ID, name, Club_ID

Based on the above schema and your role's column-level access policy, generate a SQL query to answer the question. If your role does not have access to the required columns, respond with: "Sorry, I cannot answer."


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: CompetitionOrganizer
Accessible Columns: competition: ALL COLUMNS; competition_result: ALL COLUMNS; club: Club_ID, name, Region; club_rank: Club_ID, Rank, Gold, Silver, Bronze, Total; player: Player_ID, name, Club_ID

Based on the above schema and your role's column-level access policy, generate a SQL query to answer the question. If your role does not have access to the required columns, respond with: "Sorry, I cannot answer."


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: CompetitionOrganizer
Accessible Columns: competition: ALL COLUMNS; competition_result: ALL COLUMNS; club: Club_ID, name, Region; club_rank: Club_ID, Rank, Gold, Silver, Bronze, Total; player: Player_ID, name, Club_ID

Based on the above schema and your role's column-level access policy, generate a SQL query to answer the question. If your role does not have access to the required columns, respond with: "Sorry, I cannot answer."


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: CompetitionOrganizer
Accessible Columns: competition: ALL COLUMNS; competition_result: ALL COLUMNS; club: Club_ID, name, Region; club_rank: Club_ID, Rank, Gold, Silver, Bronze, Total; player: Player_ID, name, Club_ID

Based on the above schema and your role's column-level access policy, generate a SQL query to answer the question. If your role does not have access to the required columns, respond with: "Sorry, I cannot answer."


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