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

Table Schemas:

game_1 contains tables such as Student, Video_Games, Plays_Games, SportsInfo.
Table Student has columns such as StuID, LName, Fname, Age, Sex, Major, Advisor, city_code.
StuID is the primary key.
Table Video_Games has columns such as GameID, GName, GType.
GameID is the primary key.
Table Plays_Games has columns such as StuID, GameID, Hours_Played.
Table SportsInfo has columns such as StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship.
The StuID of Plays_Games is the foreign key of StuID of Student.
The GameID of Plays_Games is the foreign key of GameID of Video_Games.
The StuID of SportsInfo is the foreign key of StuID of Student.

##Role Access Policy (Column-Level):
Role: StudentCounselor
Accessible Columns: Student: StuID, LName, Fname, Age, Sex, Major, Advisor, city_code; SportsInfo: StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship; Plays_Games: StuID, GameID, Hours_Played; Video_Games: GameID, GName, GType

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 all video game types and the number of video games in each type.
Answer: SELECT gtype ,  count(*) FROM Video_games GROUP BY gtype
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT gtype ,  count(*) FROM Video_games GROUP BY gtype
##Instruction:
Database: game_1
Total Tables: 4
Total Columns: 19

Table Schemas:

game_1 contains tables such as Student, Video_Games, Plays_Games, SportsInfo.
Table Student has columns such as StuID, LName, Fname, Age, Sex, Major, Advisor, city_code.
StuID is the primary key.
Table Video_Games has columns such as GameID, GName, GType.
GameID is the primary key.
Table Plays_Games has columns such as StuID, GameID, Hours_Played.
Table SportsInfo has columns such as StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship.
The StuID of Plays_Games is the foreign key of StuID of Student.
The GameID of Plays_Games is the foreign key of GameID of Video_Games.
The StuID of SportsInfo is the foreign key of StuID of Student.

##Role Access Policy (Column-Level):
Role: StudentCounselor
Accessible Columns: Student: StuID, LName, Fname, Age, Sex, Major, Advisor, city_code; SportsInfo: StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship; Plays_Games: StuID, GameID, Hours_Played; Video_Games: GameID, GName, GType

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 video games and how many are in each type?
Answer: SELECT gtype ,  count(*) FROM Video_games GROUP BY gtype
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT gtype ,  count(*) FROM Video_games GROUP BY gtype
##Instruction:
Database: game_1
Total Tables: 4
Total Columns: 19

Table Schemas:

game_1 contains tables such as Student, Video_Games, Plays_Games, SportsInfo.
Table Student has columns such as StuID, LName, Fname, Age, Sex, Major, Advisor, city_code.
StuID is the primary key.
Table Video_Games has columns such as GameID, GName, GType.
GameID is the primary key.
Table Plays_Games has columns such as StuID, GameID, Hours_Played.
Table SportsInfo has columns such as StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship.
The StuID of Plays_Games is the foreign key of StuID of Student.
The GameID of Plays_Games is the foreign key of GameID of Video_Games.
The StuID of SportsInfo is the foreign key of StuID of Student.

##Role Access Policy (Column-Level):
Role: StudentCounselor
Accessible Columns: Student: StuID, LName, Fname, Age, Sex, Major, Advisor, city_code; SportsInfo: StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship; Plays_Games: StuID, GameID, Hours_Played; Video_Games: GameID, GName, GType

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: Which game type has most number of games?
Answer: SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) DESC LIMIT 1
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) DESC LIMIT 1
##Instruction:
Database: game_1
Total Tables: 4
Total Columns: 19

Table Schemas:

game_1 contains tables such as Student, Video_Games, Plays_Games, SportsInfo.
Table Student has columns such as StuID, LName, Fname, Age, Sex, Major, Advisor, city_code.
StuID is the primary key.
Table Video_Games has columns such as GameID, GName, GType.
GameID is the primary key.
Table Plays_Games has columns such as StuID, GameID, Hours_Played.
Table SportsInfo has columns such as StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship.
The StuID of Plays_Games is the foreign key of StuID of Student.
The GameID of Plays_Games is the foreign key of GameID of Video_Games.
The StuID of SportsInfo is the foreign key of StuID of Student.

##Role Access Policy (Column-Level):
Role: StudentCounselor
Accessible Columns: Student: StuID, LName, Fname, Age, Sex, Major, Advisor, city_code; SportsInfo: StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship; Plays_Games: StuID, GameID, Hours_Played; Video_Games: GameID, GName, GType

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 type has the most games?
Answer: SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) DESC LIMIT 1
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) DESC LIMIT 1
##Instruction:
Database: game_1
Total Tables: 4
Total Columns: 19

Table Schemas:

game_1 contains tables such as Student, Video_Games, Plays_Games, SportsInfo.
Table Student has columns such as StuID, LName, Fname, Age, Sex, Major, Advisor, city_code.
StuID is the primary key.
Table Video_Games has columns such as GameID, GName, GType.
GameID is the primary key.
Table Plays_Games has columns such as StuID, GameID, Hours_Played.
Table SportsInfo has columns such as StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship.
The StuID of Plays_Games is the foreign key of StuID of Student.
The GameID of Plays_Games is the foreign key of GameID of Video_Games.
The StuID of SportsInfo is the foreign key of StuID of Student.

##Role Access Policy (Column-Level):
Role: StudentCounselor
Accessible Columns: Student: StuID, LName, Fname, Age, Sex, Major, Advisor, city_code; SportsInfo: StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship; Plays_Games: StuID, GameID, Hours_Played; Video_Games: GameID, GName, GType

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: Which game type has least number of games?
Answer: SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) LIMIT 1
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) LIMIT 1
##Instruction:
Database: game_1
Total Tables: 4
Total Columns: 19

Table Schemas:

game_1 contains tables such as Student, Video_Games, Plays_Games, SportsInfo.
Table Student has columns such as StuID, LName, Fname, Age, Sex, Major, Advisor, city_code.
StuID is the primary key.
Table Video_Games has columns such as GameID, GName, GType.
GameID is the primary key.
Table Plays_Games has columns such as StuID, GameID, Hours_Played.
Table SportsInfo has columns such as StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship.
The StuID of Plays_Games is the foreign key of StuID of Student.
The GameID of Plays_Games is the foreign key of GameID of Video_Games.
The StuID of SportsInfo is the foreign key of StuID of Student.

##Role Access Policy (Column-Level):
Role: StudentCounselor
Accessible Columns: Student: StuID, LName, Fname, Age, Sex, Major, Advisor, city_code; SportsInfo: StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship; Plays_Games: StuID, GameID, Hours_Played; Video_Games: GameID, GName, GType

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 type with the fewest games?
Answer: SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) LIMIT 1
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) LIMIT 1
##Instruction:
Database: game_1
Total Tables: 4
Total Columns: 19

Table Schemas:

game_1 contains tables such as Student, Video_Games, Plays_Games, SportsInfo.
Table Student has columns such as StuID, LName, Fname, Age, Sex, Major, Advisor, city_code.
StuID is the primary key.
Table Video_Games has columns such as GameID, GName, GType.
GameID is the primary key.
Table Plays_Games has columns such as StuID, GameID, Hours_Played.
Table SportsInfo has columns such as StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship.
The StuID of Plays_Games is the foreign key of StuID of Student.
The GameID of Plays_Games is the foreign key of GameID of Video_Games.
The StuID of SportsInfo is the foreign key of StuID of Student.

##Role Access Policy (Column-Level):
Role: StudentCounselor
Accessible Columns: Student: StuID, LName, Fname, Age, Sex, Major, Advisor, city_code; SportsInfo: StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship; Plays_Games: StuID, GameID, Hours_Played; Video_Games: GameID, GName, GType

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 ids for all students who live in CHI.
Answer: SELECT StuID FROM Student WHERE city_code  =  "CHI"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT StuID FROM Student WHERE city_code  =  "CHI"
##Instruction:
Database: game_1
Total Tables: 4
Total Columns: 19

Table Schemas:

game_1 contains tables such as Student, Video_Games, Plays_Games, SportsInfo.
Table Student has columns such as StuID, LName, Fname, Age, Sex, Major, Advisor, city_code.
StuID is the primary key.
Table Video_Games has columns such as GameID, GName, GType.
GameID is the primary key.
Table Plays_Games has columns such as StuID, GameID, Hours_Played.
Table SportsInfo has columns such as StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship.
The StuID of Plays_Games is the foreign key of StuID of Student.
The GameID of Plays_Games is the foreign key of GameID of Video_Games.
The StuID of SportsInfo is the foreign key of StuID of Student.

##Role Access Policy (Column-Level):
Role: StudentCounselor
Accessible Columns: Student: StuID, LName, Fname, Age, Sex, Major, Advisor, city_code; SportsInfo: StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship; Plays_Games: StuID, GameID, Hours_Played; Video_Games: GameID, GName, GType

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 ids of all students who live in CHI?
Answer: SELECT StuID FROM Student WHERE city_code  =  "CHI"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT StuID FROM Student WHERE city_code  =  "CHI"
##Instruction:
Database: game_1
Total Tables: 4
Total Columns: 19

Table Schemas:

game_1 contains tables such as Student, Video_Games, Plays_Games, SportsInfo.
Table Student has columns such as StuID, LName, Fname, Age, Sex, Major, Advisor, city_code.
StuID is the primary key.
Table Video_Games has columns such as GameID, GName, GType.
GameID is the primary key.
Table Plays_Games has columns such as StuID, GameID, Hours_Played.
Table SportsInfo has columns such as StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship.
The StuID of Plays_Games is the foreign key of StuID of Student.
The GameID of Plays_Games is the foreign key of GameID of Video_Games.
The StuID of SportsInfo is the foreign key of StuID of Student.

##Role Access Policy (Column-Level):
Role: StudentCounselor
Accessible Columns: Student: StuID, LName, Fname, Age, Sex, Major, Advisor, city_code; SportsInfo: StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship; Plays_Games: StuID, GameID, Hours_Played; Video_Games: GameID, GName, GType

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 ids for all students who have advisor 1121.
Answer: SELECT StuID FROM Student WHERE Advisor  =  1121
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT StuID FROM Student WHERE Advisor  =  1121
##Instruction:
Database: game_1
Total Tables: 4
Total Columns: 19

Table Schemas:

game_1 contains tables such as Student, Video_Games, Plays_Games, SportsInfo.
Table Student has columns such as StuID, LName, Fname, Age, Sex, Major, Advisor, city_code.
StuID is the primary key.
Table Video_Games has columns such as GameID, GName, GType.
GameID is the primary key.
Table Plays_Games has columns such as StuID, GameID, Hours_Played.
Table SportsInfo has columns such as StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship.
The StuID of Plays_Games is the foreign key of StuID of Student.
The GameID of Plays_Games is the foreign key of GameID of Video_Games.
The StuID of SportsInfo is the foreign key of StuID of Student.

##Role Access Policy (Column-Level):
Role: StudentCounselor
Accessible Columns: Student: StuID, LName, Fname, Age, Sex, Major, Advisor, city_code; SportsInfo: StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship; Plays_Games: StuID, GameID, Hours_Played; Video_Games: GameID, GName, GType

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 ids of all students who have advisor number 1121?
Answer: SELECT StuID FROM Student WHERE Advisor  =  1121
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT StuID FROM Student WHERE Advisor  =  1121
##Instruction:
Database: game_1
Total Tables: 4
Total Columns: 19

Table Schemas:

game_1 contains tables such as Student, Video_Games, Plays_Games, SportsInfo.
Table Student has columns such as StuID, LName, Fname, Age, Sex, Major, Advisor, city_code.
StuID is the primary key.
Table Video_Games has columns such as GameID, GName, GType.
GameID is the primary key.
Table Plays_Games has columns such as StuID, GameID, Hours_Played.
Table SportsInfo has columns such as StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship.
The StuID of Plays_Games is the foreign key of StuID of Student.
The GameID of Plays_Games is the foreign key of GameID of Video_Games.
The StuID of SportsInfo is the foreign key of StuID of Student.

##Role Access Policy (Column-Level):
Role: StudentCounselor
Accessible Columns: Student: StuID, LName, Fname, Age, Sex, Major, Advisor, city_code; SportsInfo: StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship; Plays_Games: StuID, GameID, Hours_Played; Video_Games: GameID, GName, GType

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 first name for all students with major 600.
Answer: SELECT Fname FROM Student WHERE Major  =  600
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT Fname FROM Student WHERE Major  =  600
##Instruction:
Database: game_1
Total Tables: 4
Total Columns: 19

Table Schemas:

game_1 contains tables such as Student, Video_Games, Plays_Games, SportsInfo.
Table Student has columns such as StuID, LName, Fname, Age, Sex, Major, Advisor, city_code.
StuID is the primary key.
Table Video_Games has columns such as GameID, GName, GType.
GameID is the primary key.
Table Plays_Games has columns such as StuID, GameID, Hours_Played.
Table SportsInfo has columns such as StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship.
The StuID of Plays_Games is the foreign key of StuID of Student.
The GameID of Plays_Games is the foreign key of GameID of Video_Games.
The StuID of SportsInfo is the foreign key of StuID of Student.

##Role Access Policy (Column-Level):
Role: StudentCounselor
Accessible Columns: Student: StuID, LName, Fname, Age, Sex, Major, Advisor, city_code; SportsInfo: StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship; Plays_Games: StuID, GameID, Hours_Played; Video_Games: GameID, GName, GType

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 first names for all students who are from the major numbered 600?
Answer: SELECT Fname FROM Student WHERE Major  =  600
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT Fname FROM Student WHERE Major  =  600
##Instruction:
Database: game_1
Total Tables: 4
Total Columns: 19

Table Schemas:

game_1 contains tables such as Student, Video_Games, Plays_Games, SportsInfo.
Table Student has columns such as StuID, LName, Fname, Age, Sex, Major, Advisor, city_code.
StuID is the primary key.
Table Video_Games has columns such as GameID, GName, GType.
GameID is the primary key.
Table Plays_Games has columns such as StuID, GameID, Hours_Played.
Table SportsInfo has columns such as StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship.
The StuID of Plays_Games is the foreign key of StuID of Student.
The GameID of Plays_Games is the foreign key of GameID of Video_Games.
The StuID of SportsInfo is the foreign key of StuID of Student.

##Role Access Policy (Column-Level):
Role: StudentCounselor
Accessible Columns: Student: StuID, LName, Fname, Age, Sex, Major, Advisor, city_code; SportsInfo: StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship; Plays_Games: StuID, GameID, Hours_Played; Video_Games: GameID, GName, GType

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 average, minimum, and maximum age for different majors.
Answer: SELECT major ,  avg(age) ,  min(age) ,  max(age) FROM Student GROUP BY major
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT major ,  avg(age) ,  min(age) ,  max(age) FROM Student GROUP BY major
##Instruction:
Database: game_1
Total Tables: 4
Total Columns: 19

Table Schemas:

game_1 contains tables such as Student, Video_Games, Plays_Games, SportsInfo.
Table Student has columns such as StuID, LName, Fname, Age, Sex, Major, Advisor, city_code.
StuID is the primary key.
Table Video_Games has columns such as GameID, GName, GType.
GameID is the primary key.
Table Plays_Games has columns such as StuID, GameID, Hours_Played.
Table SportsInfo has columns such as StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship.
The StuID of Plays_Games is the foreign key of StuID of Student.
The GameID of Plays_Games is the foreign key of GameID of Video_Games.
The StuID of SportsInfo is the foreign key of StuID of Student.

##Role Access Policy (Column-Level):
Role: StudentCounselor
Accessible Columns: Student: StuID, LName, Fname, Age, Sex, Major, Advisor, city_code; SportsInfo: StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship; Plays_Games: StuID, GameID, Hours_Played; Video_Games: GameID, GName, GType

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 average, minimum, and max ages for each of the different majors?
Answer: SELECT major ,  avg(age) ,  min(age) ,  max(age) FROM Student GROUP BY major
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT major ,  avg(age) ,  min(age) ,  max(age) FROM Student GROUP BY major
##Instruction:
Database: game_1
Total Tables: 4
Total Columns: 19

Table Schemas:

game_1 contains tables such as Student, Video_Games, Plays_Games, SportsInfo.
Table Student has columns such as StuID, LName, Fname, Age, Sex, Major, Advisor, city_code.
StuID is the primary key.
Table Video_Games has columns such as GameID, GName, GType.
GameID is the primary key.
Table Plays_Games has columns such as StuID, GameID, Hours_Played.
Table SportsInfo has columns such as StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship.
The StuID of Plays_Games is the foreign key of StuID of Student.
The GameID of Plays_Games is the foreign key of GameID of Video_Games.
The StuID of SportsInfo is the foreign key of StuID of Student.

##Role Access Policy (Column-Level):
Role: StudentCounselor
Accessible Columns: Student: StuID, LName, Fname, Age, Sex, Major, Advisor, city_code; SportsInfo: StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship; Plays_Games: StuID, GameID, Hours_Played; Video_Games: GameID, GName, GType

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 all advisors who have at least two students.
Answer: SELECT advisor FROM Student GROUP BY advisor HAVING count(*)  >=  2
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT advisor FROM Student GROUP BY advisor HAVING count(*)  >=  2
##Instruction:
Database: game_1
Total Tables: 4
Total Columns: 19

Table Schemas:

game_1 contains tables such as Student, Video_Games, Plays_Games, SportsInfo.
Table Student has columns such as StuID, LName, Fname, Age, Sex, Major, Advisor, city_code.
StuID is the primary key.
Table Video_Games has columns such as GameID, GName, GType.
GameID is the primary key.
Table Plays_Games has columns such as StuID, GameID, Hours_Played.
Table SportsInfo has columns such as StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship.
The StuID of Plays_Games is the foreign key of StuID of Student.
The GameID of Plays_Games is the foreign key of GameID of Video_Games.
The StuID of SportsInfo is the foreign key of StuID of Student.

##Role Access Policy (Column-Level):
Role: StudentCounselor
Accessible Columns: Student: StuID, LName, Fname, Age, Sex, Major, Advisor, city_code; SportsInfo: StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship; Plays_Games: StuID, GameID, Hours_Played; Video_Games: GameID, GName, GType

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 advisors
Answer: SELECT advisor FROM Student GROUP BY advisor HAVING count(*)  >=  2
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT advisor FROM Student GROUP BY advisor HAVING count(*)  >=  2