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

Table Schemas:

aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft.
Table pilot has columns such as Pilot_Id, Name, Age.
Pilot_Id is the primary key.
Table aircraft has columns such as Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading.
Aircraft_ID is the primary key.
Table match has columns such as Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft.
Round is the primary key.
Table airport has columns such as Airport_ID, Airport_Name, Total_Passengers, %_Change_2007, International_Passengers, Domestic_Passengers, Transit_Passengers, Aircraft_Movements, Freight_Metric_Tonnes.
Airport_ID is the primary key.
Table airport_aircraft has columns such as ID, Airport_ID, Aircraft_ID.
Airport_ID is the primary key.
The Winning_Pilot of match is the foreign key of Pilot_Id of pilot.
The Winning_Aircraft of match is the foreign key of Aircraft_ID of aircraft.
The Aircraft_ID of airport_aircraft is the foreign key of Aircraft_ID of aircraft.
The Airport_ID of airport_aircraft is the foreign key of Airport_ID of airport.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - aircraft: Aircraft, Aircraft_ID, Description, Max_disk_Loading
  - airport: %_Change_2007, Aircraft_Movements, Airport_ID, Airport_Name, Freight_Metric_Tonnes, Location, Total_Passengers, Transit_Passengers
  - airport_aircraft: * (all columns)
  - match: * (all columns)
  - pilot: * (all columns)

Question: What is the average total number of passengers of airports that are associated with aircraft "Robinson R-22"?
Answer: SELECT avg(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID  =  T3.Airport_ID WHERE T1.Aircraft  =  "Robinson R-22"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT avg(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID  =  T3.Airport_ID WHERE T1.Aircraft  =  "Robinson R-22"
##Instruction:
Database: aircraft
Total Tables: 5
Total Columns: 28

Table Schemas:

aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft.
Table pilot has columns such as Pilot_Id, Name, Age.
Pilot_Id is the primary key.
Table aircraft has columns such as Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading.
Aircraft_ID is the primary key.
Table match has columns such as Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft.
Round is the primary key.
Table airport has columns such as Airport_ID, Airport_Name, Total_Passengers, %_Change_2007, International_Passengers, Domestic_Passengers, Transit_Passengers, Aircraft_Movements, Freight_Metric_Tonnes.
Airport_ID is the primary key.
Table airport_aircraft has columns such as ID, Airport_ID, Aircraft_ID.
Airport_ID is the primary key.
The Winning_Pilot of match is the foreign key of Pilot_Id of pilot.
The Winning_Aircraft of match is the foreign key of Aircraft_ID of aircraft.
The Aircraft_ID of airport_aircraft is the foreign key of Aircraft_ID of aircraft.
The Airport_ID of airport_aircraft is the foreign key of Airport_ID of airport.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - aircraft: Aircraft, Aircraft_ID, Description, Max_disk_Loading
  - airport: %_Change_2007, Aircraft_Movements, Airport_ID, Airport_Name, Freight_Metric_Tonnes, Location, Total_Passengers, Transit_Passengers
  - airport_aircraft: * (all columns)
  - match: * (all columns)
  - pilot: * (all columns)

Question: What is the average total number of passengers for all airports that the aircraft "Robinson R-22" visits?
Answer: SELECT avg(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID  =  T3.Airport_ID WHERE T1.Aircraft  =  "Robinson R-22"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT avg(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID  =  T3.Airport_ID WHERE T1.Aircraft  =  "Robinson R-22"
##Instruction:
Database: aircraft
Total Tables: 5
Total Columns: 28

Table Schemas:

aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft.
Table pilot has columns such as Pilot_Id, Name, Age.
Pilot_Id is the primary key.
Table aircraft has columns such as Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading.
Aircraft_ID is the primary key.
Table match has columns such as Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft.
Round is the primary key.
Table airport has columns such as Airport_ID, Airport_Name, Total_Passengers, %_Change_2007, International_Passengers, Domestic_Passengers, Transit_Passengers, Aircraft_Movements, Freight_Metric_Tonnes.
Airport_ID is the primary key.
Table airport_aircraft has columns such as ID, Airport_ID, Aircraft_ID.
Airport_ID is the primary key.
The Winning_Pilot of match is the foreign key of Pilot_Id of pilot.
The Winning_Aircraft of match is the foreign key of Aircraft_ID of aircraft.
The Aircraft_ID of airport_aircraft is the foreign key of Aircraft_ID of aircraft.
The Airport_ID of airport_aircraft is the foreign key of Airport_ID of airport.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - aircraft: Aircraft, Aircraft_ID, Description, Max_disk_Loading
  - airport: %_Change_2007, Aircraft_Movements, Airport_ID, Airport_Name, Freight_Metric_Tonnes, Location, Total_Passengers, Transit_Passengers
  - airport_aircraft: * (all columns)
  - match: * (all columns)
  - pilot: * (all columns)

Question: Please list the location and the winning aircraft name.
Answer: SELECT T2.Location ,  T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT T2.Location ,  T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft
##Instruction:
Database: aircraft
Total Tables: 5
Total Columns: 28

Table Schemas:

aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft.
Table pilot has columns such as Pilot_Id, Name, Age.
Pilot_Id is the primary key.
Table aircraft has columns such as Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading.
Aircraft_ID is the primary key.
Table match has columns such as Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft.
Round is the primary key.
Table airport has columns such as Airport_ID, Airport_Name, Total_Passengers, %_Change_2007, International_Passengers, Domestic_Passengers, Transit_Passengers, Aircraft_Movements, Freight_Metric_Tonnes.
Airport_ID is the primary key.
Table airport_aircraft has columns such as ID, Airport_ID, Aircraft_ID.
Airport_ID is the primary key.
The Winning_Pilot of match is the foreign key of Pilot_Id of pilot.
The Winning_Aircraft of match is the foreign key of Aircraft_ID of aircraft.
The Aircraft_ID of airport_aircraft is the foreign key of Aircraft_ID of aircraft.
The Airport_ID of airport_aircraft is the foreign key of Airport_ID of airport.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - aircraft: Aircraft, Aircraft_ID, Description, Max_disk_Loading
  - airport: %_Change_2007, Aircraft_Movements, Airport_ID, Airport_Name, Freight_Metric_Tonnes, Location, Total_Passengers, Transit_Passengers
  - airport_aircraft: * (all columns)
  - match: * (all columns)
  - pilot: * (all columns)

Question: What is the location and name of the winning aircraft?
Answer: SELECT T2.Location ,  T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT T2.Location ,  T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft
##Instruction:
Database: aircraft
Total Tables: 5
Total Columns: 28

Table Schemas:

aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft.
Table pilot has columns such as Pilot_Id, Name, Age.
Pilot_Id is the primary key.
Table aircraft has columns such as Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading.
Aircraft_ID is the primary key.
Table match has columns such as Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft.
Round is the primary key.
Table airport has columns such as Airport_ID, Airport_Name, Total_Passengers, %_Change_2007, International_Passengers, Domestic_Passengers, Transit_Passengers, Aircraft_Movements, Freight_Metric_Tonnes.
Airport_ID is the primary key.
Table airport_aircraft has columns such as ID, Airport_ID, Aircraft_ID.
Airport_ID is the primary key.
The Winning_Pilot of match is the foreign key of Pilot_Id of pilot.
The Winning_Aircraft of match is the foreign key of Aircraft_ID of aircraft.
The Aircraft_ID of airport_aircraft is the foreign key of Aircraft_ID of aircraft.
The Airport_ID of airport_aircraft is the foreign key of Airport_ID of airport.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - aircraft: Aircraft, Aircraft_ID, Description, Max_disk_Loading
  - airport: %_Change_2007, Aircraft_Movements, Airport_ID, Airport_Name, Freight_Metric_Tonnes, Location, Total_Passengers, Transit_Passengers
  - airport_aircraft: * (all columns)
  - match: * (all columns)
  - pilot: * (all columns)

Question: List the name of the aircraft that has been named winning aircraft the most number of times.
Answer: SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) DESC LIMIT 1
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) DESC LIMIT 1
##Instruction:
Database: aircraft
Total Tables: 5
Total Columns: 28

Table Schemas:

aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft.
Table pilot has columns such as Pilot_Id, Name, Age.
Pilot_Id is the primary key.
Table aircraft has columns such as Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading.
Aircraft_ID is the primary key.
Table match has columns such as Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft.
Round is the primary key.
Table airport has columns such as Airport_ID, Airport_Name, Total_Passengers, %_Change_2007, International_Passengers, Domestic_Passengers, Transit_Passengers, Aircraft_Movements, Freight_Metric_Tonnes.
Airport_ID is the primary key.
Table airport_aircraft has columns such as ID, Airport_ID, Aircraft_ID.
Airport_ID is the primary key.
The Winning_Pilot of match is the foreign key of Pilot_Id of pilot.
The Winning_Aircraft of match is the foreign key of Aircraft_ID of aircraft.
The Aircraft_ID of airport_aircraft is the foreign key of Aircraft_ID of aircraft.
The Airport_ID of airport_aircraft is the foreign key of Airport_ID of airport.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - aircraft: Aircraft, Aircraft_ID, Description, Max_disk_Loading
  - airport: %_Change_2007, Aircraft_Movements, Airport_ID, Airport_Name, Freight_Metric_Tonnes, Location, Total_Passengers, Transit_Passengers
  - airport_aircraft: * (all columns)
  - match: * (all columns)
  - pilot: * (all columns)

Question: What is the name of the aircraft that has won an award the most?
Answer: SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) DESC LIMIT 1
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) DESC LIMIT 1
##Instruction:
Database: aircraft
Total Tables: 5
Total Columns: 28

Table Schemas:

aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft.
Table pilot has columns such as Pilot_Id, Name, Age.
Pilot_Id is the primary key.
Table aircraft has columns such as Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading.
Aircraft_ID is the primary key.
Table match has columns such as Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft.
Round is the primary key.
Table airport has columns such as Airport_ID, Airport_Name, Total_Passengers, %_Change_2007, International_Passengers, Domestic_Passengers, Transit_Passengers, Aircraft_Movements, Freight_Metric_Tonnes.
Airport_ID is the primary key.
Table airport_aircraft has columns such as ID, Airport_ID, Aircraft_ID.
Airport_ID is the primary key.
The Winning_Pilot of match is the foreign key of Pilot_Id of pilot.
The Winning_Aircraft of match is the foreign key of Aircraft_ID of aircraft.
The Aircraft_ID of airport_aircraft is the foreign key of Aircraft_ID of aircraft.
The Airport_ID of airport_aircraft is the foreign key of Airport_ID of airport.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - aircraft: Aircraft, Aircraft_ID, Description, Max_disk_Loading
  - airport: %_Change_2007, Aircraft_Movements, Airport_ID, Airport_Name, Freight_Metric_Tonnes, Location, Total_Passengers, Transit_Passengers
  - airport_aircraft: * (all columns)
  - match: * (all columns)
  - pilot: * (all columns)

Question: List the names of aircrafts and the number of times it won matches.
Answer: SELECT T1.Aircraft ,  COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT T1.Aircraft ,  COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft
##Instruction:
Database: aircraft
Total Tables: 5
Total Columns: 28

Table Schemas:

aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft.
Table pilot has columns such as Pilot_Id, Name, Age.
Pilot_Id is the primary key.
Table aircraft has columns such as Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading.
Aircraft_ID is the primary key.
Table match has columns such as Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft.
Round is the primary key.
Table airport has columns such as Airport_ID, Airport_Name, Total_Passengers, %_Change_2007, International_Passengers, Domestic_Passengers, Transit_Passengers, Aircraft_Movements, Freight_Metric_Tonnes.
Airport_ID is the primary key.
Table airport_aircraft has columns such as ID, Airport_ID, Aircraft_ID.
Airport_ID is the primary key.
The Winning_Pilot of match is the foreign key of Pilot_Id of pilot.
The Winning_Aircraft of match is the foreign key of Aircraft_ID of aircraft.
The Aircraft_ID of airport_aircraft is the foreign key of Aircraft_ID of aircraft.
The Airport_ID of airport_aircraft is the foreign key of Airport_ID of airport.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - aircraft: Aircraft, Aircraft_ID, Description, Max_disk_Loading
  - airport: %_Change_2007, Aircraft_Movements, Airport_ID, Airport_Name, Freight_Metric_Tonnes, Location, Total_Passengers, Transit_Passengers
  - airport_aircraft: * (all columns)
  - match: * (all columns)
  - pilot: * (all columns)

Question: For each aircraft that has won an award, what is its name and how many time has it won?
Answer: SELECT T1.Aircraft ,  COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT T1.Aircraft ,  COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft
##Instruction:
Database: aircraft
Total Tables: 5
Total Columns: 28

Table Schemas:

aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft.
Table pilot has columns such as Pilot_Id, Name, Age.
Pilot_Id is the primary key.
Table aircraft has columns such as Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading.
Aircraft_ID is the primary key.
Table match has columns such as Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft.
Round is the primary key.
Table airport has columns such as Airport_ID, Airport_Name, Total_Passengers, %_Change_2007, International_Passengers, Domestic_Passengers, Transit_Passengers, Aircraft_Movements, Freight_Metric_Tonnes.
Airport_ID is the primary key.
Table airport_aircraft has columns such as ID, Airport_ID, Aircraft_ID.
Airport_ID is the primary key.
The Winning_Pilot of match is the foreign key of Pilot_Id of pilot.
The Winning_Aircraft of match is the foreign key of Aircraft_ID of aircraft.
The Aircraft_ID of airport_aircraft is the foreign key of Aircraft_ID of aircraft.
The Airport_ID of airport_aircraft is the foreign key of Airport_ID of airport.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - aircraft: Aircraft, Aircraft_ID, Description, Max_disk_Loading
  - airport: %_Change_2007, Aircraft_Movements, Airport_ID, Airport_Name, Freight_Metric_Tonnes, Location, Total_Passengers, Transit_Passengers
  - airport_aircraft: * (all columns)
  - match: * (all columns)
  - pilot: * (all columns)

Question: List names of all pilot in descending order of age.
Answer: SELECT Name FROM pilot ORDER BY Age DESC
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT Name FROM pilot ORDER BY Age DESC
##Instruction:
Database: aircraft
Total Tables: 5
Total Columns: 28

Table Schemas:

aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft.
Table pilot has columns such as Pilot_Id, Name, Age.
Pilot_Id is the primary key.
Table aircraft has columns such as Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading.
Aircraft_ID is the primary key.
Table match has columns such as Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft.
Round is the primary key.
Table airport has columns such as Airport_ID, Airport_Name, Total_Passengers, %_Change_2007, International_Passengers, Domestic_Passengers, Transit_Passengers, Aircraft_Movements, Freight_Metric_Tonnes.
Airport_ID is the primary key.
Table airport_aircraft has columns such as ID, Airport_ID, Aircraft_ID.
Airport_ID is the primary key.
The Winning_Pilot of match is the foreign key of Pilot_Id of pilot.
The Winning_Aircraft of match is the foreign key of Aircraft_ID of aircraft.
The Aircraft_ID of airport_aircraft is the foreign key of Aircraft_ID of aircraft.
The Airport_ID of airport_aircraft is the foreign key of Airport_ID of airport.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - aircraft: Aircraft, Aircraft_ID, Description, Max_disk_Loading
  - airport: %_Change_2007, Aircraft_Movements, Airport_ID, Airport_Name, Freight_Metric_Tonnes, Location, Total_Passengers, Transit_Passengers
  - airport_aircraft: * (all columns)
  - match: * (all columns)
  - pilot: * (all columns)

Question: What are the names of all pilots listed by descending age?
Answer: SELECT Name FROM pilot ORDER BY Age DESC
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT Name FROM pilot ORDER BY Age DESC
##Instruction:
Database: aircraft
Total Tables: 5
Total Columns: 28

Table Schemas:

aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft.
Table pilot has columns such as Pilot_Id, Name, Age.
Pilot_Id is the primary key.
Table aircraft has columns such as Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading.
Aircraft_ID is the primary key.
Table match has columns such as Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft.
Round is the primary key.
Table airport has columns such as Airport_ID, Airport_Name, Total_Passengers, %_Change_2007, International_Passengers, Domestic_Passengers, Transit_Passengers, Aircraft_Movements, Freight_Metric_Tonnes.
Airport_ID is the primary key.
Table airport_aircraft has columns such as ID, Airport_ID, Aircraft_ID.
Airport_ID is the primary key.
The Winning_Pilot of match is the foreign key of Pilot_Id of pilot.
The Winning_Aircraft of match is the foreign key of Aircraft_ID of aircraft.
The Aircraft_ID of airport_aircraft is the foreign key of Aircraft_ID of aircraft.
The Airport_ID of airport_aircraft is the foreign key of Airport_ID of airport.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - aircraft: Aircraft, Aircraft_ID, Description, Max_disk_Loading
  - airport: %_Change_2007, Aircraft_Movements, Airport_ID, Airport_Name, Freight_Metric_Tonnes, Location, Total_Passengers, Transit_Passengers
  - airport_aircraft: * (all columns)
  - match: * (all columns)
  - pilot: * (all columns)

Question: List the names of aircrafts and that won matches at least twice.
Answer: SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*)  >=  2
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*)  >=  2
##Instruction:
Database: aircraft
Total Tables: 5
Total Columns: 28

Table Schemas:

aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft.
Table pilot has columns such as Pilot_Id, Name, Age.
Pilot_Id is the primary key.
Table aircraft has columns such as Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading.
Aircraft_ID is the primary key.
Table match has columns such as Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft.
Round is the primary key.
Table airport has columns such as Airport_ID, Airport_Name, Total_Passengers, %_Change_2007, International_Passengers, Domestic_Passengers, Transit_Passengers, Aircraft_Movements, Freight_Metric_Tonnes.
Airport_ID is the primary key.
Table airport_aircraft has columns such as ID, Airport_ID, Aircraft_ID.
Airport_ID is the primary key.
The Winning_Pilot of match is the foreign key of Pilot_Id of pilot.
The Winning_Aircraft of match is the foreign key of Aircraft_ID of aircraft.
The Aircraft_ID of airport_aircraft is the foreign key of Aircraft_ID of aircraft.
The Airport_ID of airport_aircraft is the foreign key of Airport_ID of airport.

##Role Access Policy (Column-Level):
Role: DataOperator_1
Accessible Columns:
  - aircraft: Aircraft, Aircraft_ID, Description, Max_disk_Loading
  - airport: %_Change_2007, Aircraft_Movements, Airport_ID, Airport_Name, Freight_Metric_Tonnes, Location, Total_Passengers, Transit_Passengers
  - airport_aircraft: * (all columns)
  - match: * (all columns)
  - pilot: * (all columns)

Question: What are the names of all aircrafts that have won a match at least twice?
Answer: SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*)  >=  2
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*)  >=  2