sharkiefff/RBAC-Text2SQL-Benchmark huggingface dataset:
##Instruction:
Database: products_gen_characteristics
Total Tables: 6
Total Columns: 23

Table Schemas:

products_gen_characteristics contains tables such as Ref_Characteristic_Types, Ref_Colors, Ref_Product_Categories, Characteristics, Products, Product_Characteristics.
Table Ref_Characteristic_Types has columns such as characteristic_type_code, characteristic_type_description.
characteristic_type_code is the primary key.
Table Ref_Colors has columns such as color_code, color_description.
color_code is the primary key.
Table Ref_Product_Categories has columns such as product_category_code, product_category_description, unit_of_measure.
product_category_code is the primary key.
Table Characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details.
characteristic_id is the primary key.
Table Products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details.
product_id is the primary key.
Table Product_Characteristics has columns such as product_id, characteristic_id, product_characteristic_value.
The characteristic_type_code of Characteristics is the foreign key of characteristic_type_code of Ref_Characteristic_Types.
The color_code of Products is the foreign key of color_code of Ref_Colors.
The product_category_code of Products is the foreign key of product_category_code of Ref_Product_Categories.
The product_id of Product_Characteristics is the foreign key of product_id of Products.
The characteristic_id of Product_Characteristics is the foreign key of characteristic_id of Characteristics.

##Role Access Policy (Column-Level):
Role: ProductResearcher
Accessible Columns: Ref_Characteristic_Types: characteristic_type_code, characteristic_type_description; Ref_Colors: color_code, color_description; Ref_Product_Categories: product_category_code, product_category_description, unit_of_measure; Characteristics: characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details; Products: product_id, color_code, product_category_code, product_name, product_description, other_product_details; Product_Characteristics: 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: What are the different product names for products that have the 'warm' characteristic:?
Answer: SELECT DISTINCT t1.product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id WHERE t3.characteristic_name  =  "warm"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT DISTINCT t1.product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id WHERE t3.characteristic_name  =  "warm"
##Instruction:
Database: products_gen_characteristics
Total Tables: 6
Total Columns: 23

Table Schemas:

products_gen_characteristics contains tables such as Ref_Characteristic_Types, Ref_Colors, Ref_Product_Categories, Characteristics, Products, Product_Characteristics.
Table Ref_Characteristic_Types has columns such as characteristic_type_code, characteristic_type_description.
characteristic_type_code is the primary key.
Table Ref_Colors has columns such as color_code, color_description.
color_code is the primary key.
Table Ref_Product_Categories has columns such as product_category_code, product_category_description, unit_of_measure.
product_category_code is the primary key.
Table Characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details.
characteristic_id is the primary key.
Table Products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details.
product_id is the primary key.
Table Product_Characteristics has columns such as product_id, characteristic_id, product_characteristic_value.
The characteristic_type_code of Characteristics is the foreign key of characteristic_type_code of Ref_Characteristic_Types.
The color_code of Products is the foreign key of color_code of Ref_Colors.
The product_category_code of Products is the foreign key of product_category_code of Ref_Product_Categories.
The product_id of Product_Characteristics is the foreign key of product_id of Products.
The characteristic_id of Product_Characteristics is the foreign key of characteristic_id of Characteristics.

##Role Access Policy (Column-Level):
Role: ProductResearcher
Accessible Columns: Ref_Characteristic_Types: characteristic_type_code, characteristic_type_description; Ref_Colors: color_code, color_description; Ref_Product_Categories: product_category_code, product_category_description, unit_of_measure; Characteristics: characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details; Products: product_id, color_code, product_category_code, product_name, product_description, other_product_details; Product_Characteristics: 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: What is the unit of measuerment of the product category code "Herbs"?
Answer: SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code  =  "Herbs"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code  =  "Herbs"
##Instruction:
Database: products_gen_characteristics
Total Tables: 6
Total Columns: 23

Table Schemas:

products_gen_characteristics contains tables such as Ref_Characteristic_Types, Ref_Colors, Ref_Product_Categories, Characteristics, Products, Product_Characteristics.
Table Ref_Characteristic_Types has columns such as characteristic_type_code, characteristic_type_description.
characteristic_type_code is the primary key.
Table Ref_Colors has columns such as color_code, color_description.
color_code is the primary key.
Table Ref_Product_Categories has columns such as product_category_code, product_category_description, unit_of_measure.
product_category_code is the primary key.
Table Characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details.
characteristic_id is the primary key.
Table Products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details.
product_id is the primary key.
Table Product_Characteristics has columns such as product_id, characteristic_id, product_characteristic_value.
The characteristic_type_code of Characteristics is the foreign key of characteristic_type_code of Ref_Characteristic_Types.
The color_code of Products is the foreign key of color_code of Ref_Colors.
The product_category_code of Products is the foreign key of product_category_code of Ref_Product_Categories.
The product_id of Product_Characteristics is the foreign key of product_id of Products.
The characteristic_id of Product_Characteristics is the foreign key of characteristic_id of Characteristics.

##Role Access Policy (Column-Level):
Role: ProductResearcher
Accessible Columns: Ref_Characteristic_Types: characteristic_type_code, characteristic_type_description; Ref_Colors: color_code, color_description; Ref_Product_Categories: product_category_code, product_category_description, unit_of_measure; Characteristics: characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details; Products: product_id, color_code, product_category_code, product_name, product_description, other_product_details; Product_Characteristics: 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 unit of measure for 'Herb' products.
Answer: SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code  =  "Herbs"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code  =  "Herbs"
##Instruction:
Database: products_gen_characteristics
Total Tables: 6
Total Columns: 23

Table Schemas:

products_gen_characteristics contains tables such as Ref_Characteristic_Types, Ref_Colors, Ref_Product_Categories, Characteristics, Products, Product_Characteristics.
Table Ref_Characteristic_Types has columns such as characteristic_type_code, characteristic_type_description.
characteristic_type_code is the primary key.
Table Ref_Colors has columns such as color_code, color_description.
color_code is the primary key.
Table Ref_Product_Categories has columns such as product_category_code, product_category_description, unit_of_measure.
product_category_code is the primary key.
Table Characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details.
characteristic_id is the primary key.
Table Products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details.
product_id is the primary key.
Table Product_Characteristics has columns such as product_id, characteristic_id, product_characteristic_value.
The characteristic_type_code of Characteristics is the foreign key of characteristic_type_code of Ref_Characteristic_Types.
The color_code of Products is the foreign key of color_code of Ref_Colors.
The product_category_code of Products is the foreign key of product_category_code of Ref_Product_Categories.
The product_id of Product_Characteristics is the foreign key of product_id of Products.
The characteristic_id of Product_Characteristics is the foreign key of characteristic_id of Characteristics.

##Role Access Policy (Column-Level):
Role: ProductResearcher
Accessible Columns: Ref_Characteristic_Types: characteristic_type_code, characteristic_type_description; Ref_Colors: color_code, color_description; Ref_Product_Categories: product_category_code, product_category_description, unit_of_measure; Characteristics: characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details; Products: product_id, color_code, product_category_code, product_name, product_description, other_product_details; Product_Characteristics: 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: Find the product category description of the product category with code "Spices".
Answer: SELECT product_category_description FROM ref_product_categories WHERE product_category_code  =  "Spices"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT product_category_description FROM ref_product_categories WHERE product_category_code  =  "Spices"
##Instruction:
Database: products_gen_characteristics
Total Tables: 6
Total Columns: 23

Table Schemas:

products_gen_characteristics contains tables such as Ref_Characteristic_Types, Ref_Colors, Ref_Product_Categories, Characteristics, Products, Product_Characteristics.
Table Ref_Characteristic_Types has columns such as characteristic_type_code, characteristic_type_description.
characteristic_type_code is the primary key.
Table Ref_Colors has columns such as color_code, color_description.
color_code is the primary key.
Table Ref_Product_Categories has columns such as product_category_code, product_category_description, unit_of_measure.
product_category_code is the primary key.
Table Characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details.
characteristic_id is the primary key.
Table Products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details.
product_id is the primary key.
Table Product_Characteristics has columns such as product_id, characteristic_id, product_characteristic_value.
The characteristic_type_code of Characteristics is the foreign key of characteristic_type_code of Ref_Characteristic_Types.
The color_code of Products is the foreign key of color_code of Ref_Colors.
The product_category_code of Products is the foreign key of product_category_code of Ref_Product_Categories.
The product_id of Product_Characteristics is the foreign key of product_id of Products.
The characteristic_id of Product_Characteristics is the foreign key of characteristic_id of Characteristics.

##Role Access Policy (Column-Level):
Role: ProductResearcher
Accessible Columns: Ref_Characteristic_Types: characteristic_type_code, characteristic_type_description; Ref_Colors: color_code, color_description; Ref_Product_Categories: product_category_code, product_category_description, unit_of_measure; Characteristics: characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details; Products: product_id, color_code, product_category_code, product_name, product_description, other_product_details; Product_Characteristics: 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: What is the description of the product category with the code 'Spices'?
Answer: SELECT product_category_description FROM ref_product_categories WHERE product_category_code  =  "Spices"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT product_category_description FROM ref_product_categories WHERE product_category_code  =  "Spices"
##Instruction:
Database: products_gen_characteristics
Total Tables: 6
Total Columns: 23

Table Schemas:

products_gen_characteristics contains tables such as Ref_Characteristic_Types, Ref_Colors, Ref_Product_Categories, Characteristics, Products, Product_Characteristics.
Table Ref_Characteristic_Types has columns such as characteristic_type_code, characteristic_type_description.
characteristic_type_code is the primary key.
Table Ref_Colors has columns such as color_code, color_description.
color_code is the primary key.
Table Ref_Product_Categories has columns such as product_category_code, product_category_description, unit_of_measure.
product_category_code is the primary key.
Table Characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details.
characteristic_id is the primary key.
Table Products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details.
product_id is the primary key.
Table Product_Characteristics has columns such as product_id, characteristic_id, product_characteristic_value.
The characteristic_type_code of Characteristics is the foreign key of characteristic_type_code of Ref_Characteristic_Types.
The color_code of Products is the foreign key of color_code of Ref_Colors.
The product_category_code of Products is the foreign key of product_category_code of Ref_Product_Categories.
The product_id of Product_Characteristics is the foreign key of product_id of Products.
The characteristic_id of Product_Characteristics is the foreign key of characteristic_id of Characteristics.

##Role Access Policy (Column-Level):
Role: ProductResearcher
Accessible Columns: Ref_Characteristic_Types: characteristic_type_code, characteristic_type_description; Ref_Colors: color_code, color_description; Ref_Product_Categories: product_category_code, product_category_description, unit_of_measure; Characteristics: characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details; Products: product_id, color_code, product_category_code, product_name, product_description, other_product_details; Product_Characteristics: 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: What is the product category description and unit of measurement of category "Herbs"?
Answer: SELECT product_category_description ,  unit_of_measure FROM ref_product_categories WHERE product_category_code  =  "Herbs"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT product_category_description ,  unit_of_measure FROM ref_product_categories WHERE product_category_code  =  "Herbs"
##Instruction:
Database: products_gen_characteristics
Total Tables: 6
Total Columns: 23

Table Schemas:

products_gen_characteristics contains tables such as Ref_Characteristic_Types, Ref_Colors, Ref_Product_Categories, Characteristics, Products, Product_Characteristics.
Table Ref_Characteristic_Types has columns such as characteristic_type_code, characteristic_type_description.
characteristic_type_code is the primary key.
Table Ref_Colors has columns such as color_code, color_description.
color_code is the primary key.
Table Ref_Product_Categories has columns such as product_category_code, product_category_description, unit_of_measure.
product_category_code is the primary key.
Table Characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details.
characteristic_id is the primary key.
Table Products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details.
product_id is the primary key.
Table Product_Characteristics has columns such as product_id, characteristic_id, product_characteristic_value.
The characteristic_type_code of Characteristics is the foreign key of characteristic_type_code of Ref_Characteristic_Types.
The color_code of Products is the foreign key of color_code of Ref_Colors.
The product_category_code of Products is the foreign key of product_category_code of Ref_Product_Categories.
The product_id of Product_Characteristics is the foreign key of product_id of Products.
The characteristic_id of Product_Characteristics is the foreign key of characteristic_id of Characteristics.

##Role Access Policy (Column-Level):
Role: ProductResearcher
Accessible Columns: Ref_Characteristic_Types: characteristic_type_code, characteristic_type_description; Ref_Colors: color_code, color_description; Ref_Product_Categories: product_category_code, product_category_description, unit_of_measure; Characteristics: characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details; Products: product_id, color_code, product_category_code, product_name, product_description, other_product_details; Product_Characteristics: 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 description and unit of measurement for products in the 'Herbs' category.
Answer: SELECT product_category_description ,  unit_of_measure FROM ref_product_categories WHERE product_category_code  =  "Herbs"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT product_category_description ,  unit_of_measure FROM ref_product_categories WHERE product_category_code  =  "Herbs"
##Instruction:
Database: products_gen_characteristics
Total Tables: 6
Total Columns: 23

Table Schemas:

products_gen_characteristics contains tables such as Ref_Characteristic_Types, Ref_Colors, Ref_Product_Categories, Characteristics, Products, Product_Characteristics.
Table Ref_Characteristic_Types has columns such as characteristic_type_code, characteristic_type_description.
characteristic_type_code is the primary key.
Table Ref_Colors has columns such as color_code, color_description.
color_code is the primary key.
Table Ref_Product_Categories has columns such as product_category_code, product_category_description, unit_of_measure.
product_category_code is the primary key.
Table Characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details.
characteristic_id is the primary key.
Table Products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details.
product_id is the primary key.
Table Product_Characteristics has columns such as product_id, characteristic_id, product_characteristic_value.
The characteristic_type_code of Characteristics is the foreign key of characteristic_type_code of Ref_Characteristic_Types.
The color_code of Products is the foreign key of color_code of Ref_Colors.
The product_category_code of Products is the foreign key of product_category_code of Ref_Product_Categories.
The product_id of Product_Characteristics is the foreign key of product_id of Products.
The characteristic_id of Product_Characteristics is the foreign key of characteristic_id of Characteristics.

##Role Access Policy (Column-Level):
Role: ProductResearcher
Accessible Columns: Ref_Characteristic_Types: characteristic_type_code, characteristic_type_description; Ref_Colors: color_code, color_description; Ref_Product_Categories: product_category_code, product_category_description, unit_of_measure; Characteristics: characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details; Products: product_id, color_code, product_category_code, product_name, product_description, other_product_details; Product_Characteristics: 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: What is the unit of measurement of product named "cumin"?
Answer: SELECT t2.unit_of_measure FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code  =  t2.product_category_code WHERE t1.product_name  =  "cumin"
Permission: allowed (All required columns are permitted)
Gold SQL: SELECT t2.unit_of_measure FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code  =  t2.product_category_code WHERE t1.product_name  =  "cumin"