sharkiefff/RBAC-Text2SQL-Benchmark huggingface dataset:
##Instruction:
Database: flight_2
Total Tables: 3
Total Columns: 13

Table Schemas:

flight_2 contains tables such as airlines, airports, flights.
Table airlines has columns such as uid, Airline, Abbreviation, Country.
uid is the primary key.
Table airports has columns such as City, AirportCode, AirportName, Country, CountryAbbrev.
AirportCode is the primary key.
Table flights has columns such as Airline, FlightNo, SourceAirport, DestAirport.
Airline is the primary key.
The DestAirport of flights is the foreign key of AirportCode of airports.
The SourceAirport of flights is the foreign key of AirportCode of airports.

##Role Access Policy (Column-Level):
Role: FlightOperationsManager
Accessible Columns: airlines: uid, Airline, Abbreviation, Country; airports: AirportCode, AirportName, City, Country, CountryAbbrev; flights: ALL COLUMNS

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: Count the number of flights departing from 'APG'.
Answer: SELECT count(*) FROM FLIGHTS WHERE SourceAirport  =  "APG"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(*) FROM FLIGHTS WHERE SourceAirport  =  "APG"
##Instruction:
Database: flight_2
Total Tables: 3
Total Columns: 13

Table Schemas:

flight_2 contains tables such as airlines, airports, flights.
Table airlines has columns such as uid, Airline, Abbreviation, Country.
uid is the primary key.
Table airports has columns such as City, AirportCode, AirportName, Country, CountryAbbrev.
AirportCode is the primary key.
Table flights has columns such as Airline, FlightNo, SourceAirport, DestAirport.
Airline is the primary key.
The DestAirport of flights is the foreign key of AirportCode of airports.
The SourceAirport of flights is the foreign key of AirportCode of airports.

##Role Access Policy (Column-Level):
Role: FlightOperationsManager
Accessible Columns: airlines: uid, Airline, Abbreviation, Country; airports: AirportCode, AirportName, City, Country, CountryAbbrev; flights: ALL COLUMNS

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 flights have destination ATO?
Answer: SELECT count(*) FROM FLIGHTS WHERE DestAirport  =  "ATO"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(*) FROM FLIGHTS WHERE DestAirport  =  "ATO"
##Instruction:
Database: flight_2
Total Tables: 3
Total Columns: 13

Table Schemas:

flight_2 contains tables such as airlines, airports, flights.
Table airlines has columns such as uid, Airline, Abbreviation, Country.
uid is the primary key.
Table airports has columns such as City, AirportCode, AirportName, Country, CountryAbbrev.
AirportCode is the primary key.
Table flights has columns such as Airline, FlightNo, SourceAirport, DestAirport.
Airline is the primary key.
The DestAirport of flights is the foreign key of AirportCode of airports.
The SourceAirport of flights is the foreign key of AirportCode of airports.

##Role Access Policy (Column-Level):
Role: FlightOperationsManager
Accessible Columns: airlines: uid, Airline, Abbreviation, Country; airports: AirportCode, AirportName, City, Country, CountryAbbrev; flights: ALL COLUMNS

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: Count the number of flights into ATO.
Answer: SELECT count(*) FROM FLIGHTS WHERE DestAirport  =  "ATO"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(*) FROM FLIGHTS WHERE DestAirport  =  "ATO"
##Instruction:
Database: flight_2
Total Tables: 3
Total Columns: 13

Table Schemas:

flight_2 contains tables such as airlines, airports, flights.
Table airlines has columns such as uid, Airline, Abbreviation, Country.
uid is the primary key.
Table airports has columns such as City, AirportCode, AirportName, Country, CountryAbbrev.
AirportCode is the primary key.
Table flights has columns such as Airline, FlightNo, SourceAirport, DestAirport.
Airline is the primary key.
The DestAirport of flights is the foreign key of AirportCode of airports.
The SourceAirport of flights is the foreign key of AirportCode of airports.

##Role Access Policy (Column-Level):
Role: FlightOperationsManager
Accessible Columns: airlines: uid, Airline, Abbreviation, Country; airports: AirportCode, AirportName, City, Country, CountryAbbrev; flights: ALL COLUMNS

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 flights depart from City Aberdeen?
Answer: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport  =  T2.AirportCode WHERE T2.City  =  "Aberdeen"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport  =  T2.AirportCode WHERE T2.City  =  "Aberdeen"
##Instruction:
Database: flight_2
Total Tables: 3
Total Columns: 13

Table Schemas:

flight_2 contains tables such as airlines, airports, flights.
Table airlines has columns such as uid, Airline, Abbreviation, Country.
uid is the primary key.
Table airports has columns such as City, AirportCode, AirportName, Country, CountryAbbrev.
AirportCode is the primary key.
Table flights has columns such as Airline, FlightNo, SourceAirport, DestAirport.
Airline is the primary key.
The DestAirport of flights is the foreign key of AirportCode of airports.
The SourceAirport of flights is the foreign key of AirportCode of airports.

##Role Access Policy (Column-Level):
Role: FlightOperationsManager
Accessible Columns: airlines: uid, Airline, Abbreviation, Country; airports: AirportCode, AirportName, City, Country, CountryAbbrev; flights: ALL COLUMNS

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: Return the number of flights departing from Aberdeen.
Answer: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport  =  T2.AirportCode WHERE T2.City  =  "Aberdeen"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport  =  T2.AirportCode WHERE T2.City  =  "Aberdeen"
##Instruction:
Database: flight_2
Total Tables: 3
Total Columns: 13

Table Schemas:

flight_2 contains tables such as airlines, airports, flights.
Table airlines has columns such as uid, Airline, Abbreviation, Country.
uid is the primary key.
Table airports has columns such as City, AirportCode, AirportName, Country, CountryAbbrev.
AirportCode is the primary key.
Table flights has columns such as Airline, FlightNo, SourceAirport, DestAirport.
Airline is the primary key.
The DestAirport of flights is the foreign key of AirportCode of airports.
The SourceAirport of flights is the foreign key of AirportCode of airports.

##Role Access Policy (Column-Level):
Role: FlightOperationsManager
Accessible Columns: airlines: uid, Airline, Abbreviation, Country; airports: AirportCode, AirportName, City, Country, CountryAbbrev; flights: ALL COLUMNS

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 flights arriving in Aberdeen city?
Answer: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport  =  T2.AirportCode WHERE T2.City  =  "Aberdeen"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport  =  T2.AirportCode WHERE T2.City  =  "Aberdeen"
##Instruction:
Database: flight_2
Total Tables: 3
Total Columns: 13

Table Schemas:

flight_2 contains tables such as airlines, airports, flights.
Table airlines has columns such as uid, Airline, Abbreviation, Country.
uid is the primary key.
Table airports has columns such as City, AirportCode, AirportName, Country, CountryAbbrev.
AirportCode is the primary key.
Table flights has columns such as Airline, FlightNo, SourceAirport, DestAirport.
Airline is the primary key.
The DestAirport of flights is the foreign key of AirportCode of airports.
The SourceAirport of flights is the foreign key of AirportCode of airports.

##Role Access Policy (Column-Level):
Role: FlightOperationsManager
Accessible Columns: airlines: uid, Airline, Abbreviation, Country; airports: AirportCode, AirportName, City, Country, CountryAbbrev; flights: ALL COLUMNS

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: Return the number of flights arriving in Aberdeen.
Answer: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport  =  T2.AirportCode WHERE T2.City  =  "Aberdeen"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport  =  T2.AirportCode WHERE T2.City  =  "Aberdeen"
##Instruction:
Database: flight_2
Total Tables: 3
Total Columns: 13

Table Schemas:

flight_2 contains tables such as airlines, airports, flights.
Table airlines has columns such as uid, Airline, Abbreviation, Country.
uid is the primary key.
Table airports has columns such as City, AirportCode, AirportName, Country, CountryAbbrev.
AirportCode is the primary key.
Table flights has columns such as Airline, FlightNo, SourceAirport, DestAirport.
Airline is the primary key.
The DestAirport of flights is the foreign key of AirportCode of airports.
The SourceAirport of flights is the foreign key of AirportCode of airports.

##Role Access Policy (Column-Level):
Role: FlightOperationsManager
Accessible Columns: airlines: uid, Airline, Abbreviation, Country; airports: AirportCode, AirportName, City, Country, CountryAbbrev; flights: ALL COLUMNS

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 flights depart from City 'Aberdeen' and have destination City 'Ashley'?
Answer: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport  =  T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport  =  T3.AirportCode WHERE T2.City  =  "Ashley" AND T3.City  =  "Aberdeen"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport  =  T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport  =  T3.AirportCode WHERE T2.City  =  "Ashley" AND T3.City  =  "Aberdeen"
##Instruction:
Database: flight_2
Total Tables: 3
Total Columns: 13

Table Schemas:

flight_2 contains tables such as airlines, airports, flights.
Table airlines has columns such as uid, Airline, Abbreviation, Country.
uid is the primary key.
Table airports has columns such as City, AirportCode, AirportName, Country, CountryAbbrev.
AirportCode is the primary key.
Table flights has columns such as Airline, FlightNo, SourceAirport, DestAirport.
Airline is the primary key.
The DestAirport of flights is the foreign key of AirportCode of airports.
The SourceAirport of flights is the foreign key of AirportCode of airports.

##Role Access Policy (Column-Level):
Role: FlightOperationsManager
Accessible Columns: airlines: uid, Airline, Abbreviation, Country; airports: AirportCode, AirportName, City, Country, CountryAbbrev; flights: ALL COLUMNS

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 flights fly from Aberdeen to Ashley?
Answer: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport  =  T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport  =  T3.AirportCode WHERE T2.City  =  "Ashley" AND T3.City  =  "Aberdeen"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport  =  T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport  =  T3.AirportCode WHERE T2.City  =  "Ashley" AND T3.City  =  "Aberdeen"
##Instruction:
Database: flight_2
Total Tables: 3
Total Columns: 13

Table Schemas:

flight_2 contains tables such as airlines, airports, flights.
Table airlines has columns such as uid, Airline, Abbreviation, Country.
uid is the primary key.
Table airports has columns such as City, AirportCode, AirportName, Country, CountryAbbrev.
AirportCode is the primary key.
Table flights has columns such as Airline, FlightNo, SourceAirport, DestAirport.
Airline is the primary key.
The DestAirport of flights is the foreign key of AirportCode of airports.
The SourceAirport of flights is the foreign key of AirportCode of airports.

##Role Access Policy (Column-Level):
Role: FlightOperationsManager
Accessible Columns: airlines: uid, Airline, Abbreviation, Country; airports: AirportCode, AirportName, City, Country, CountryAbbrev; flights: ALL COLUMNS

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 flights does airline 'JetBlue Airways' have?
Answer: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline  =  T2.uid WHERE T2.Airline = "JetBlue Airways"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline  =  T2.uid WHERE T2.Airline = "JetBlue Airways"
##Instruction:
Database: flight_2
Total Tables: 3
Total Columns: 13

Table Schemas:

flight_2 contains tables such as airlines, airports, flights.
Table airlines has columns such as uid, Airline, Abbreviation, Country.
uid is the primary key.
Table airports has columns such as City, AirportCode, AirportName, Country, CountryAbbrev.
AirportCode is the primary key.
Table flights has columns such as Airline, FlightNo, SourceAirport, DestAirport.
Airline is the primary key.
The DestAirport of flights is the foreign key of AirportCode of airports.
The SourceAirport of flights is the foreign key of AirportCode of airports.

##Role Access Policy (Column-Level):
Role: FlightOperationsManager
Accessible Columns: airlines: uid, Airline, Abbreviation, Country; airports: AirportCode, AirportName, City, Country, CountryAbbrev; flights: ALL COLUMNS

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: Give the number of Jetblue Airways flights.
Answer: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline  =  T2.uid WHERE T2.Airline = "JetBlue Airways"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline  =  T2.uid WHERE T2.Airline = "JetBlue Airways"
##Instruction:
Database: flight_2
Total Tables: 3
Total Columns: 13

Table Schemas:

flight_2 contains tables such as airlines, airports, flights.
Table airlines has columns such as uid, Airline, Abbreviation, Country.
uid is the primary key.
Table airports has columns such as City, AirportCode, AirportName, Country, CountryAbbrev.
AirportCode is the primary key.
Table flights has columns such as Airline, FlightNo, SourceAirport, DestAirport.
Airline is the primary key.
The DestAirport of flights is the foreign key of AirportCode of airports.
The SourceAirport of flights is the foreign key of AirportCode of airports.

##Role Access Policy (Column-Level):
Role: FlightOperationsManager
Accessible Columns: airlines: uid, Airline, Abbreviation, Country; airports: AirportCode, AirportName, City, Country, CountryAbbrev; flights: ALL COLUMNS

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 'United Airlines' flights go to Airport 'ASY'?
Answer: SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline  =  T1.uid WHERE T1.Airline  =  "United Airlines" AND T2.DestAirport  =  "ASY"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline  =  T1.uid WHERE T1.Airline  =  "United Airlines" AND T2.DestAirport  =  "ASY"
##Instruction:
Database: flight_2
Total Tables: 3
Total Columns: 13

Table Schemas:

flight_2 contains tables such as airlines, airports, flights.
Table airlines has columns such as uid, Airline, Abbreviation, Country.
uid is the primary key.
Table airports has columns such as City, AirportCode, AirportName, Country, CountryAbbrev.
AirportCode is the primary key.
Table flights has columns such as Airline, FlightNo, SourceAirport, DestAirport.
Airline is the primary key.
The DestAirport of flights is the foreign key of AirportCode of airports.
The SourceAirport of flights is the foreign key of AirportCode of airports.

##Role Access Policy (Column-Level):
Role: FlightOperationsManager
Accessible Columns: airlines: uid, Airline, Abbreviation, Country; airports: AirportCode, AirportName, City, Country, CountryAbbrev; flights: ALL COLUMNS

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: Count the number of United Airlines flights arriving in ASY Airport.
Answer: SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline  =  T1.uid WHERE T1.Airline  =  "United Airlines" AND T2.DestAirport  =  "ASY"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline  =  T1.uid WHERE T1.Airline  =  "United Airlines" AND T2.DestAirport  =  "ASY"
##Instruction:
Database: flight_2
Total Tables: 3
Total Columns: 13

Table Schemas:

flight_2 contains tables such as airlines, airports, flights.
Table airlines has columns such as uid, Airline, Abbreviation, Country.
uid is the primary key.
Table airports has columns such as City, AirportCode, AirportName, Country, CountryAbbrev.
AirportCode is the primary key.
Table flights has columns such as Airline, FlightNo, SourceAirport, DestAirport.
Airline is the primary key.
The DestAirport of flights is the foreign key of AirportCode of airports.
The SourceAirport of flights is the foreign key of AirportCode of airports.

##Role Access Policy (Column-Level):
Role: FlightOperationsManager
Accessible Columns: airlines: uid, Airline, Abbreviation, Country; airports: AirportCode, AirportName, City, Country, CountryAbbrev; flights: ALL COLUMNS

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 'United Airlines' flights depart from Airport 'AHD'?
Answer: SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline  =  T1.uid WHERE T1.Airline  =  "United Airlines" AND T2.SourceAirport  =  "AHD"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline  =  T1.uid WHERE T1.Airline  =  "United Airlines" AND T2.SourceAirport  =  "AHD"
##Instruction:
Database: flight_2
Total Tables: 3
Total Columns: 13

Table Schemas:

flight_2 contains tables such as airlines, airports, flights.
Table airlines has columns such as uid, Airline, Abbreviation, Country.
uid is the primary key.
Table airports has columns such as City, AirportCode, AirportName, Country, CountryAbbrev.
AirportCode is the primary key.
Table flights has columns such as Airline, FlightNo, SourceAirport, DestAirport.
Airline is the primary key.
The DestAirport of flights is the foreign key of AirportCode of airports.
The SourceAirport of flights is the foreign key of AirportCode of airports.

##Role Access Policy (Column-Level):
Role: FlightOperationsManager
Accessible Columns: airlines: uid, Airline, Abbreviation, Country; airports: AirportCode, AirportName, City, Country, CountryAbbrev; flights: ALL COLUMNS

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: Return the number of United Airlines flights leaving from AHD Airport.
Answer: SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline  =  T1.uid WHERE T1.Airline  =  "United Airlines" AND T2.SourceAirport  =  "AHD"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline  =  T1.uid WHERE T1.Airline  =  "United Airlines" AND T2.SourceAirport  =  "AHD"
##Instruction:
Database: flight_2
Total Tables: 3
Total Columns: 13

Table Schemas:

flight_2 contains tables such as airlines, airports, flights.
Table airlines has columns such as uid, Airline, Abbreviation, Country.
uid is the primary key.
Table airports has columns such as City, AirportCode, AirportName, Country, CountryAbbrev.
AirportCode is the primary key.
Table flights has columns such as Airline, FlightNo, SourceAirport, DestAirport.
Airline is the primary key.
The DestAirport of flights is the foreign key of AirportCode of airports.
The SourceAirport of flights is the foreign key of AirportCode of airports.

##Role Access Policy (Column-Level):
Role: FlightOperationsManager
Accessible Columns: airlines: uid, Airline, Abbreviation, Country; airports: AirportCode, AirportName, City, Country, CountryAbbrev; flights: ALL COLUMNS

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 United Airlines flights go to City 'Aberdeen'?
Answer: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport  =  T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid  =  T1.Airline WHERE T2.City  =  "Aberdeen" AND T3.Airline  =  "United Airlines"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport  =  T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid  =  T1.Airline WHERE T2.City  =  "Aberdeen" AND T3.Airline  =  "United Airlines"