lianghsun/spider-text2sql-bench huggingface dataset:
### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)

CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)

CREATE TABLE `Ref_Product_Categories` (
`product_category_code` VARCHAR(15) PRIMARY KEY,
`product_category_description` VARCHAR(80),
`unit_of_measure` VARCHAR(20)
)

CREATE TABLE `Characteristics` (
`characteristic_id` INTEGER PRIMARY KEY,
`characteristic_type_code` VARCHAR(15) NOT NULL,
`characteristic_data_type` VARCHAR(10),
`characteristic_name` VARCHAR(80),
`other_characteristic_details` VARCHAR(255),
FOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )
)

CREATE TABLE `Products` (
`product_id` INTEGER PRIMARY KEY,
`color_code` VARCHAR(15) NOT NULL,
`product_category_code` VARCHAR(15) NOT NULL,
`product_name` VARCHAR(80),
`typical_buying_price` VARCHAR(20),
`typical_selling_price` VARCHAR(20),
`product_description` VARCHAR(255),
`other_product_details` VARCHAR(255),
FOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )
)

CREATE TABLE `Product_Characteristics` (
`product_id` INTEGER NOT NULL,
`characteristic_id` INTEGER NOT NULL,
`product_characteristic_value` VARCHAR(50),
FOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
)

### Question
What are the names of products with category "Spices"?

### SQL
SELECT product_name FROM products WHERE product_category_code  =  "Spices"
### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)

CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)

CREATE TABLE `Ref_Product_Categories` (
`product_category_code` VARCHAR(15) PRIMARY KEY,
`product_category_description` VARCHAR(80),
`unit_of_measure` VARCHAR(20)
)

CREATE TABLE `Characteristics` (
`characteristic_id` INTEGER PRIMARY KEY,
`characteristic_type_code` VARCHAR(15) NOT NULL,
`characteristic_data_type` VARCHAR(10),
`characteristic_name` VARCHAR(80),
`other_characteristic_details` VARCHAR(255),
FOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )
)

CREATE TABLE `Products` (
`product_id` INTEGER PRIMARY KEY,
`color_code` VARCHAR(15) NOT NULL,
`product_category_code` VARCHAR(15) NOT NULL,
`product_name` VARCHAR(80),
`typical_buying_price` VARCHAR(20),
`typical_selling_price` VARCHAR(20),
`product_description` VARCHAR(255),
`other_product_details` VARCHAR(255),
FOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )
)

CREATE TABLE `Product_Characteristics` (
`product_id` INTEGER NOT NULL,
`characteristic_id` INTEGER NOT NULL,
`product_characteristic_value` VARCHAR(50),
FOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
)

### Question
Return the names of products in the category 'Spices'.

### SQL
SELECT product_name FROM products WHERE product_category_code  =  "Spices"
### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)

CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)

CREATE TABLE `Ref_Product_Categories` (
`product_category_code` VARCHAR(15) PRIMARY KEY,
`product_category_description` VARCHAR(80),
`unit_of_measure` VARCHAR(20)
)

CREATE TABLE `Characteristics` (
`characteristic_id` INTEGER PRIMARY KEY,
`characteristic_type_code` VARCHAR(15) NOT NULL,
`characteristic_data_type` VARCHAR(10),
`characteristic_name` VARCHAR(80),
`other_characteristic_details` VARCHAR(255),
FOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )
)

CREATE TABLE `Products` (
`product_id` INTEGER PRIMARY KEY,
`color_code` VARCHAR(15) NOT NULL,
`product_category_code` VARCHAR(15) NOT NULL,
`product_name` VARCHAR(80),
`typical_buying_price` VARCHAR(20),
`typical_selling_price` VARCHAR(20),
`product_description` VARCHAR(255),
`other_product_details` VARCHAR(255),
FOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )
)

CREATE TABLE `Product_Characteristics` (
`product_id` INTEGER NOT NULL,
`characteristic_id` INTEGER NOT NULL,
`product_characteristic_value` VARCHAR(50),
FOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
)

### Question
List the names, color descriptions and product descriptions of products with category "Herbs".

### SQL
SELECT T1.product_name ,  T2.color_description ,  T1.product_description FROM products AS T1 JOIN Ref_colors AS T2 ON T1.color_code  =  T2.color_code WHERE product_category_code  =  "Herbs"
### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)

CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)

CREATE TABLE `Ref_Product_Categories` (
`product_category_code` VARCHAR(15) PRIMARY KEY,
`product_category_description` VARCHAR(80),
`unit_of_measure` VARCHAR(20)
)

CREATE TABLE `Characteristics` (
`characteristic_id` INTEGER PRIMARY KEY,
`characteristic_type_code` VARCHAR(15) NOT NULL,
`characteristic_data_type` VARCHAR(10),
`characteristic_name` VARCHAR(80),
`other_characteristic_details` VARCHAR(255),
FOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )
)

CREATE TABLE `Products` (
`product_id` INTEGER PRIMARY KEY,
`color_code` VARCHAR(15) NOT NULL,
`product_category_code` VARCHAR(15) NOT NULL,
`product_name` VARCHAR(80),
`typical_buying_price` VARCHAR(20),
`typical_selling_price` VARCHAR(20),
`product_description` VARCHAR(255),
`other_product_details` VARCHAR(255),
FOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )
)

CREATE TABLE `Product_Characteristics` (
`product_id` INTEGER NOT NULL,
`characteristic_id` INTEGER NOT NULL,
`product_characteristic_value` VARCHAR(50),
FOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
)

### Question
What are the names, color descriptions, and product descriptions for products in the 'Herbs' category?

### SQL
SELECT T1.product_name ,  T2.color_description ,  T1.product_description FROM products AS T1 JOIN Ref_colors AS T2 ON T1.color_code  =  T2.color_code WHERE product_category_code  =  "Herbs"
### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)

CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)

CREATE TABLE `Ref_Product_Categories` (
`product_category_code` VARCHAR(15) PRIMARY KEY,
`product_category_description` VARCHAR(80),
`unit_of_measure` VARCHAR(20)
)

CREATE TABLE `Characteristics` (
`characteristic_id` INTEGER PRIMARY KEY,
`characteristic_type_code` VARCHAR(15) NOT NULL,
`characteristic_data_type` VARCHAR(10),
`characteristic_name` VARCHAR(80),
`other_characteristic_details` VARCHAR(255),
FOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )
)

CREATE TABLE `Products` (
`product_id` INTEGER PRIMARY KEY,
`color_code` VARCHAR(15) NOT NULL,
`product_category_code` VARCHAR(15) NOT NULL,
`product_name` VARCHAR(80),
`typical_buying_price` VARCHAR(20),
`typical_selling_price` VARCHAR(20),
`product_description` VARCHAR(255),
`other_product_details` VARCHAR(255),
FOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )
)

CREATE TABLE `Product_Characteristics` (
`product_id` INTEGER NOT NULL,
`characteristic_id` INTEGER NOT NULL,
`product_characteristic_value` VARCHAR(50),
FOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
)

### Question
How many products are there under the category "Seeds"?

### SQL
SELECT count(*) FROM products WHERE product_category_code  =  "Seeds"
### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)

CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)

CREATE TABLE `Ref_Product_Categories` (
`product_category_code` VARCHAR(15) PRIMARY KEY,
`product_category_description` VARCHAR(80),
`unit_of_measure` VARCHAR(20)
)

CREATE TABLE `Characteristics` (
`characteristic_id` INTEGER PRIMARY KEY,
`characteristic_type_code` VARCHAR(15) NOT NULL,
`characteristic_data_type` VARCHAR(10),
`characteristic_name` VARCHAR(80),
`other_characteristic_details` VARCHAR(255),
FOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )
)

CREATE TABLE `Products` (
`product_id` INTEGER PRIMARY KEY,
`color_code` VARCHAR(15) NOT NULL,
`product_category_code` VARCHAR(15) NOT NULL,
`product_name` VARCHAR(80),
`typical_buying_price` VARCHAR(20),
`typical_selling_price` VARCHAR(20),
`product_description` VARCHAR(255),
`other_product_details` VARCHAR(255),
FOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )
)

CREATE TABLE `Product_Characteristics` (
`product_id` INTEGER NOT NULL,
`characteristic_id` INTEGER NOT NULL,
`product_characteristic_value` VARCHAR(50),
FOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
)

### Question
Count the number of products in the category 'Seeds'.

### SQL
SELECT count(*) FROM products WHERE product_category_code  =  "Seeds"
### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)

CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)

CREATE TABLE `Ref_Product_Categories` (
`product_category_code` VARCHAR(15) PRIMARY KEY,
`product_category_description` VARCHAR(80),
`unit_of_measure` VARCHAR(20)
)

CREATE TABLE `Characteristics` (
`characteristic_id` INTEGER PRIMARY KEY,
`characteristic_type_code` VARCHAR(15) NOT NULL,
`characteristic_data_type` VARCHAR(10),
`characteristic_name` VARCHAR(80),
`other_characteristic_details` VARCHAR(255),
FOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )
)

CREATE TABLE `Products` (
`product_id` INTEGER PRIMARY KEY,
`color_code` VARCHAR(15) NOT NULL,
`product_category_code` VARCHAR(15) NOT NULL,
`product_name` VARCHAR(80),
`typical_buying_price` VARCHAR(20),
`typical_selling_price` VARCHAR(20),
`product_description` VARCHAR(255),
`other_product_details` VARCHAR(255),
FOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )
)

CREATE TABLE `Product_Characteristics` (
`product_id` INTEGER NOT NULL,
`characteristic_id` INTEGER NOT NULL,
`product_characteristic_value` VARCHAR(50),
FOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
)

### Question
Find the number of products with category "Spices" and typically sold above 1000.

### SQL
SELECT count(*) FROM products WHERE product_category_code  =  "Spices" AND typical_buying_price  >  1000
### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)

CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)

CREATE TABLE `Ref_Product_Categories` (
`product_category_code` VARCHAR(15) PRIMARY KEY,
`product_category_description` VARCHAR(80),
`unit_of_measure` VARCHAR(20)
)

CREATE TABLE `Characteristics` (
`characteristic_id` INTEGER PRIMARY KEY,
`characteristic_type_code` VARCHAR(15) NOT NULL,
`characteristic_data_type` VARCHAR(10),
`characteristic_name` VARCHAR(80),
`other_characteristic_details` VARCHAR(255),
FOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )
)

CREATE TABLE `Products` (
`product_id` INTEGER PRIMARY KEY,
`color_code` VARCHAR(15) NOT NULL,
`product_category_code` VARCHAR(15) NOT NULL,
`product_name` VARCHAR(80),
`typical_buying_price` VARCHAR(20),
`typical_selling_price` VARCHAR(20),
`product_description` VARCHAR(255),
`other_product_details` VARCHAR(255),
FOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )
)

CREATE TABLE `Product_Characteristics` (
`product_id` INTEGER NOT NULL,
`characteristic_id` INTEGER NOT NULL,
`product_characteristic_value` VARCHAR(50),
FOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
)

### Question
How many products are in the 'Spices' category and have a typical price of over 1000?

### SQL
SELECT count(*) FROM products WHERE product_category_code  =  "Spices" AND typical_buying_price  >  1000
### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)

CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)

CREATE TABLE `Ref_Product_Categories` (
`product_category_code` VARCHAR(15) PRIMARY KEY,
`product_category_description` VARCHAR(80),
`unit_of_measure` VARCHAR(20)
)

CREATE TABLE `Characteristics` (
`characteristic_id` INTEGER PRIMARY KEY,
`characteristic_type_code` VARCHAR(15) NOT NULL,
`characteristic_data_type` VARCHAR(10),
`characteristic_name` VARCHAR(80),
`other_characteristic_details` VARCHAR(255),
FOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )
)

CREATE TABLE `Products` (
`product_id` INTEGER PRIMARY KEY,
`color_code` VARCHAR(15) NOT NULL,
`product_category_code` VARCHAR(15) NOT NULL,
`product_name` VARCHAR(80),
`typical_buying_price` VARCHAR(20),
`typical_selling_price` VARCHAR(20),
`product_description` VARCHAR(255),
`other_product_details` VARCHAR(255),
FOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )
)

CREATE TABLE `Product_Characteristics` (
`product_id` INTEGER NOT NULL,
`characteristic_id` INTEGER NOT NULL,
`product_characteristic_value` VARCHAR(50),
FOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
)

### Question
What is the category and typical buying price  of the product with name "cumin"?

### SQL
SELECT product_category_code ,  typical_buying_price FROM products WHERE product_name  =  "cumin"
### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)

CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)

CREATE TABLE `Ref_Product_Categories` (
`product_category_code` VARCHAR(15) PRIMARY KEY,
`product_category_description` VARCHAR(80),
`unit_of_measure` VARCHAR(20)
)

CREATE TABLE `Characteristics` (
`characteristic_id` INTEGER PRIMARY KEY,
`characteristic_type_code` VARCHAR(15) NOT NULL,
`characteristic_data_type` VARCHAR(10),
`characteristic_name` VARCHAR(80),
`other_characteristic_details` VARCHAR(255),
FOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )
)

CREATE TABLE `Products` (
`product_id` INTEGER PRIMARY KEY,
`color_code` VARCHAR(15) NOT NULL,
`product_category_code` VARCHAR(15) NOT NULL,
`product_name` VARCHAR(80),
`typical_buying_price` VARCHAR(20),
`typical_selling_price` VARCHAR(20),
`product_description` VARCHAR(255),
`other_product_details` VARCHAR(255),
FOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )
)

CREATE TABLE `Product_Characteristics` (
`product_id` INTEGER NOT NULL,
`characteristic_id` INTEGER NOT NULL,
`product_characteristic_value` VARCHAR(50),
FOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
)

### Question
Return the category code and typical price of 'cumin'.

### SQL
SELECT product_category_code ,  typical_buying_price FROM products WHERE product_name  =  "cumin"
### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)

CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)

CREATE TABLE `Ref_Product_Categories` (
`product_category_code` VARCHAR(15) PRIMARY KEY,
`product_category_description` VARCHAR(80),
`unit_of_measure` VARCHAR(20)
)

CREATE TABLE `Characteristics` (
`characteristic_id` INTEGER PRIMARY KEY,
`characteristic_type_code` VARCHAR(15) NOT NULL,
`characteristic_data_type` VARCHAR(10),
`characteristic_name` VARCHAR(80),
`other_characteristic_details` VARCHAR(255),
FOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )
)

CREATE TABLE `Products` (
`product_id` INTEGER PRIMARY KEY,
`color_code` VARCHAR(15) NOT NULL,
`product_category_code` VARCHAR(15) NOT NULL,
`product_name` VARCHAR(80),
`typical_buying_price` VARCHAR(20),
`typical_selling_price` VARCHAR(20),
`product_description` VARCHAR(255),
`other_product_details` VARCHAR(255),
FOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )
)

CREATE TABLE `Product_Characteristics` (
`product_id` INTEGER NOT NULL,
`characteristic_id` INTEGER NOT NULL,
`product_characteristic_value` VARCHAR(50),
FOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
)

### Question
Which category does the product named "flax" belong to?

### SQL
SELECT product_category_code FROM products WHERE product_name  =  "flax"
### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)

CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)

CREATE TABLE `Ref_Product_Categories` (
`product_category_code` VARCHAR(15) PRIMARY KEY,
`product_category_description` VARCHAR(80),
`unit_of_measure` VARCHAR(20)
)

CREATE TABLE `Characteristics` (
`characteristic_id` INTEGER PRIMARY KEY,
`characteristic_type_code` VARCHAR(15) NOT NULL,
`characteristic_data_type` VARCHAR(10),
`characteristic_name` VARCHAR(80),
`other_characteristic_details` VARCHAR(255),
FOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )
)

CREATE TABLE `Products` (
`product_id` INTEGER PRIMARY KEY,
`color_code` VARCHAR(15) NOT NULL,
`product_category_code` VARCHAR(15) NOT NULL,
`product_name` VARCHAR(80),
`typical_buying_price` VARCHAR(20),
`typical_selling_price` VARCHAR(20),
`product_description` VARCHAR(255),
`other_product_details` VARCHAR(255),
FOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )
)

CREATE TABLE `Product_Characteristics` (
`product_id` INTEGER NOT NULL,
`characteristic_id` INTEGER NOT NULL,
`product_characteristic_value` VARCHAR(50),
FOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
)

### Question
What is the code of the category that the product with the name 'flax' belongs to?

### SQL
SELECT product_category_code FROM products WHERE product_name  =  "flax"
### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)

CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)

CREATE TABLE `Ref_Product_Categories` (
`product_category_code` VARCHAR(15) PRIMARY KEY,
`product_category_description` VARCHAR(80),
`unit_of_measure` VARCHAR(20)
)

CREATE TABLE `Characteristics` (
`characteristic_id` INTEGER PRIMARY KEY,
`characteristic_type_code` VARCHAR(15) NOT NULL,
`characteristic_data_type` VARCHAR(10),
`characteristic_name` VARCHAR(80),
`other_characteristic_details` VARCHAR(255),
FOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )
)

CREATE TABLE `Products` (
`product_id` INTEGER PRIMARY KEY,
`color_code` VARCHAR(15) NOT NULL,
`product_category_code` VARCHAR(15) NOT NULL,
`product_name` VARCHAR(80),
`typical_buying_price` VARCHAR(20),
`typical_selling_price` VARCHAR(20),
`product_description` VARCHAR(255),
`other_product_details` VARCHAR(255),
FOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )
)

CREATE TABLE `Product_Characteristics` (
`product_id` INTEGER NOT NULL,
`characteristic_id` INTEGER NOT NULL,
`product_characteristic_value` VARCHAR(50),
FOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
)

### Question
What is the name of the product with the color description 'yellow'?

### SQL
SELECT T1.product_name FROM products AS T1 JOIN ref_colors AS T2 ON T1.color_code  =  T2.color_code WHERE T2.color_description  =  'yellow'
### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)

CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)

CREATE TABLE `Ref_Product_Categories` (
`product_category_code` VARCHAR(15) PRIMARY KEY,
`product_category_description` VARCHAR(80),
`unit_of_measure` VARCHAR(20)
)

CREATE TABLE `Characteristics` (
`characteristic_id` INTEGER PRIMARY KEY,
`characteristic_type_code` VARCHAR(15) NOT NULL,
`characteristic_data_type` VARCHAR(10),
`characteristic_name` VARCHAR(80),
`other_characteristic_details` VARCHAR(255),
FOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )
)

CREATE TABLE `Products` (
`product_id` INTEGER PRIMARY KEY,
`color_code` VARCHAR(15) NOT NULL,
`product_category_code` VARCHAR(15) NOT NULL,
`product_name` VARCHAR(80),
`typical_buying_price` VARCHAR(20),
`typical_selling_price` VARCHAR(20),
`product_description` VARCHAR(255),
`other_product_details` VARCHAR(255),
FOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )
)

CREATE TABLE `Product_Characteristics` (
`product_id` INTEGER NOT NULL,
`characteristic_id` INTEGER NOT NULL,
`product_characteristic_value` VARCHAR(50),
FOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
)

### Question
Give the name of the products that have a color description 'yellow'.

### SQL
SELECT T1.product_name FROM products AS T1 JOIN ref_colors AS T2 ON T1.color_code  =  T2.color_code WHERE T2.color_description  =  'yellow'
### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)

CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)

CREATE TABLE `Ref_Product_Categories` (
`product_category_code` VARCHAR(15) PRIMARY KEY,
`product_category_description` VARCHAR(80),
`unit_of_measure` VARCHAR(20)
)

CREATE TABLE `Characteristics` (
`characteristic_id` INTEGER PRIMARY KEY,
`characteristic_type_code` VARCHAR(15) NOT NULL,
`characteristic_data_type` VARCHAR(10),
`characteristic_name` VARCHAR(80),
`other_characteristic_details` VARCHAR(255),
FOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )
)

CREATE TABLE `Products` (
`product_id` INTEGER PRIMARY KEY,
`color_code` VARCHAR(15) NOT NULL,
`product_category_code` VARCHAR(15) NOT NULL,
`product_name` VARCHAR(80),
`typical_buying_price` VARCHAR(20),
`typical_selling_price` VARCHAR(20),
`product_description` VARCHAR(255),
`other_product_details` VARCHAR(255),
FOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )
)

CREATE TABLE `Product_Characteristics` (
`product_id` INTEGER NOT NULL,
`characteristic_id` INTEGER NOT NULL,
`product_characteristic_value` VARCHAR(50),
FOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
)

### Question
Find the category descriptions of the products whose descriptions include letter 't'.

### SQL
SELECT T1.product_category_description FROM ref_product_categories AS T1 JOIN products AS T2 ON T1.product_category_code  =  T2.product_category_code WHERE T2.product_description LIKE '%t%'
### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)

CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)

CREATE TABLE `Ref_Product_Categories` (
`product_category_code` VARCHAR(15) PRIMARY KEY,
`product_category_description` VARCHAR(80),
`unit_of_measure` VARCHAR(20)
)

CREATE TABLE `Characteristics` (
`characteristic_id` INTEGER PRIMARY KEY,
`characteristic_type_code` VARCHAR(15) NOT NULL,
`characteristic_data_type` VARCHAR(10),
`characteristic_name` VARCHAR(80),
`other_characteristic_details` VARCHAR(255),
FOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )
)

CREATE TABLE `Products` (
`product_id` INTEGER PRIMARY KEY,
`color_code` VARCHAR(15) NOT NULL,
`product_category_code` VARCHAR(15) NOT NULL,
`product_name` VARCHAR(80),
`typical_buying_price` VARCHAR(20),
`typical_selling_price` VARCHAR(20),
`product_description` VARCHAR(255),
`other_product_details` VARCHAR(255),
FOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )
)

CREATE TABLE `Product_Characteristics` (
`product_id` INTEGER NOT NULL,
`characteristic_id` INTEGER NOT NULL,
`product_characteristic_value` VARCHAR(50),
FOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
)

### Question
What are the descriptions of the categories that products with product descriptions that contain the letter t are in?

### SQL
SELECT T1.product_category_description FROM ref_product_categories AS T1 JOIN products AS T2 ON T1.product_category_code  =  T2.product_category_code WHERE T2.product_description LIKE '%t%'
### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)

CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)

CREATE TABLE `Ref_Product_Categories` (
`product_category_code` VARCHAR(15) PRIMARY KEY,
`product_category_description` VARCHAR(80),
`unit_of_measure` VARCHAR(20)
)

CREATE TABLE `Characteristics` (
`characteristic_id` INTEGER PRIMARY KEY,
`characteristic_type_code` VARCHAR(15) NOT NULL,
`characteristic_data_type` VARCHAR(10),
`characteristic_name` VARCHAR(80),
`other_characteristic_details` VARCHAR(255),
FOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )
)

CREATE TABLE `Products` (
`product_id` INTEGER PRIMARY KEY,
`color_code` VARCHAR(15) NOT NULL,
`product_category_code` VARCHAR(15) NOT NULL,
`product_name` VARCHAR(80),
`typical_buying_price` VARCHAR(20),
`typical_selling_price` VARCHAR(20),
`product_description` VARCHAR(255),
`other_product_details` VARCHAR(255),
FOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )
)

CREATE TABLE `Product_Characteristics` (
`product_id` INTEGER NOT NULL,
`characteristic_id` INTEGER NOT NULL,
`product_characteristic_value` VARCHAR(50),
FOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
)

### Question
What is the color description of the product with name "catnip"?

### SQL
SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code WHERE t1.product_name  =  "catnip"
### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)

CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)

CREATE TABLE `Ref_Product_Categories` (
`product_category_code` VARCHAR(15) PRIMARY KEY,
`product_category_description` VARCHAR(80),
`unit_of_measure` VARCHAR(20)
)

CREATE TABLE `Characteristics` (
`characteristic_id` INTEGER PRIMARY KEY,
`characteristic_type_code` VARCHAR(15) NOT NULL,
`characteristic_data_type` VARCHAR(10),
`characteristic_name` VARCHAR(80),
`other_characteristic_details` VARCHAR(255),
FOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )
)

CREATE TABLE `Products` (
`product_id` INTEGER PRIMARY KEY,
`color_code` VARCHAR(15) NOT NULL,
`product_category_code` VARCHAR(15) NOT NULL,
`product_name` VARCHAR(80),
`typical_buying_price` VARCHAR(20),
`typical_selling_price` VARCHAR(20),
`product_description` VARCHAR(255),
`other_product_details` VARCHAR(255),
FOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )
)

CREATE TABLE `Product_Characteristics` (
`product_id` INTEGER NOT NULL,
`characteristic_id` INTEGER NOT NULL,
`product_characteristic_value` VARCHAR(50),
FOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
)

### Question
Give the color description for the product 'catnip'.

### SQL
SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code WHERE t1.product_name  =  "catnip"
### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)

CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)

CREATE TABLE `Ref_Product_Categories` (
`product_category_code` VARCHAR(15) PRIMARY KEY,
`product_category_description` VARCHAR(80),
`unit_of_measure` VARCHAR(20)
)

CREATE TABLE `Characteristics` (
`characteristic_id` INTEGER PRIMARY KEY,
`characteristic_type_code` VARCHAR(15) NOT NULL,
`characteristic_data_type` VARCHAR(10),
`characteristic_name` VARCHAR(80),
`other_characteristic_details` VARCHAR(255),
FOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )
)

CREATE TABLE `Products` (
`product_id` INTEGER PRIMARY KEY,
`color_code` VARCHAR(15) NOT NULL,
`product_category_code` VARCHAR(15) NOT NULL,
`product_name` VARCHAR(80),
`typical_buying_price` VARCHAR(20),
`typical_selling_price` VARCHAR(20),
`product_description` VARCHAR(255),
`other_product_details` VARCHAR(255),
FOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )
)

CREATE TABLE `Product_Characteristics` (
`product_id` INTEGER NOT NULL,
`characteristic_id` INTEGER NOT NULL,
`product_characteristic_value` VARCHAR(50),
FOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
)

### Question
What is the color code and description of the product named "chervil"?

### SQL
SELECT t1.color_code ,  t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code WHERE t1.product_name  =  "chervil"
### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)

CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)

CREATE TABLE `Ref_Product_Categories` (
`product_category_code` VARCHAR(15) PRIMARY KEY,
`product_category_description` VARCHAR(80),
`unit_of_measure` VARCHAR(20)
)

CREATE TABLE `Characteristics` (
`characteristic_id` INTEGER PRIMARY KEY,
`characteristic_type_code` VARCHAR(15) NOT NULL,
`characteristic_data_type` VARCHAR(10),
`characteristic_name` VARCHAR(80),
`other_characteristic_details` VARCHAR(255),
FOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )
)

CREATE TABLE `Products` (
`product_id` INTEGER PRIMARY KEY,
`color_code` VARCHAR(15) NOT NULL,
`product_category_code` VARCHAR(15) NOT NULL,
`product_name` VARCHAR(80),
`typical_buying_price` VARCHAR(20),
`typical_selling_price` VARCHAR(20),
`product_description` VARCHAR(255),
`other_product_details` VARCHAR(255),
FOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )
)

CREATE TABLE `Product_Characteristics` (
`product_id` INTEGER NOT NULL,
`characteristic_id` INTEGER NOT NULL,
`product_characteristic_value` VARCHAR(50),
FOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
)

### Question
Return the color code and description for the product with the name 'chervil'.

### SQL
SELECT t1.color_code ,  t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code WHERE t1.product_name  =  "chervil"
### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)

CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)

CREATE TABLE `Ref_Product_Categories` (
`product_category_code` VARCHAR(15) PRIMARY KEY,
`product_category_description` VARCHAR(80),
`unit_of_measure` VARCHAR(20)
)

CREATE TABLE `Characteristics` (
`characteristic_id` INTEGER PRIMARY KEY,
`characteristic_type_code` VARCHAR(15) NOT NULL,
`characteristic_data_type` VARCHAR(10),
`characteristic_name` VARCHAR(80),
`other_characteristic_details` VARCHAR(255),
FOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )
)

CREATE TABLE `Products` (
`product_id` INTEGER PRIMARY KEY,
`color_code` VARCHAR(15) NOT NULL,
`product_category_code` VARCHAR(15) NOT NULL,
`product_name` VARCHAR(80),
`typical_buying_price` VARCHAR(20),
`typical_selling_price` VARCHAR(20),
`product_description` VARCHAR(255),
`other_product_details` VARCHAR(255),
FOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )
)

CREATE TABLE `Product_Characteristics` (
`product_id` INTEGER NOT NULL,
`characteristic_id` INTEGER NOT NULL,
`product_characteristic_value` VARCHAR(50),
FOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
)

### Question
Find the id and color description of the products with at least 2 characteristics.

### SQL
SELECT t1.product_id ,  t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code JOIN product_characteristics AS t3 ON t1.product_id  =  t3.product_id GROUP BY t1.product_id HAVING count(*)  >=  2
### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)

CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)

CREATE TABLE `Ref_Product_Categories` (
`product_category_code` VARCHAR(15) PRIMARY KEY,
`product_category_description` VARCHAR(80),
`unit_of_measure` VARCHAR(20)
)

CREATE TABLE `Characteristics` (
`characteristic_id` INTEGER PRIMARY KEY,
`characteristic_type_code` VARCHAR(15) NOT NULL,
`characteristic_data_type` VARCHAR(10),
`characteristic_name` VARCHAR(80),
`other_characteristic_details` VARCHAR(255),
FOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )
)

CREATE TABLE `Products` (
`product_id` INTEGER PRIMARY KEY,
`color_code` VARCHAR(15) NOT NULL,
`product_category_code` VARCHAR(15) NOT NULL,
`product_name` VARCHAR(80),
`typical_buying_price` VARCHAR(20),
`typical_selling_price` VARCHAR(20),
`product_description` VARCHAR(255),
`other_product_details` VARCHAR(255),
FOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )
)

CREATE TABLE `Product_Characteristics` (
`product_id` INTEGER NOT NULL,
`characteristic_id` INTEGER NOT NULL,
`product_characteristic_value` VARCHAR(50),
FOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
)

### Question
What are the product ids and color descriptions for products with two or more characteristics?

### SQL
SELECT t1.product_id ,  t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code JOIN product_characteristics AS t3 ON t1.product_id  =  t3.product_id GROUP BY t1.product_id HAVING count(*)  >=  2
### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)

CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)

CREATE TABLE `Ref_Product_Categories` (
`product_category_code` VARCHAR(15) PRIMARY KEY,
`product_category_description` VARCHAR(80),
`unit_of_measure` VARCHAR(20)
)

CREATE TABLE `Characteristics` (
`characteristic_id` INTEGER PRIMARY KEY,
`characteristic_type_code` VARCHAR(15) NOT NULL,
`characteristic_data_type` VARCHAR(10),
`characteristic_name` VARCHAR(80),
`other_characteristic_details` VARCHAR(255),
FOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )
)

CREATE TABLE `Products` (
`product_id` INTEGER PRIMARY KEY,
`color_code` VARCHAR(15) NOT NULL,
`product_category_code` VARCHAR(15) NOT NULL,
`product_name` VARCHAR(80),
`typical_buying_price` VARCHAR(20),
`typical_selling_price` VARCHAR(20),
`product_description` VARCHAR(255),
`other_product_details` VARCHAR(255),
FOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )
)

CREATE TABLE `Product_Characteristics` (
`product_id` INTEGER NOT NULL,
`characteristic_id` INTEGER NOT NULL,
`product_characteristic_value` VARCHAR(50),
FOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
)

### Question
List all the product names with the color description "white".

### SQL
SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code WHERE t2.color_description  =  "white"
### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)

CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)

CREATE TABLE `Ref_Product_Categories` (
`product_category_code` VARCHAR(15) PRIMARY KEY,
`product_category_description` VARCHAR(80),
`unit_of_measure` VARCHAR(20)
)

CREATE TABLE `Characteristics` (
`characteristic_id` INTEGER PRIMARY KEY,
`characteristic_type_code` VARCHAR(15) NOT NULL,
`characteristic_data_type` VARCHAR(10),
`characteristic_name` VARCHAR(80),
`other_characteristic_details` VARCHAR(255),
FOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )
)

CREATE TABLE `Products` (
`product_id` INTEGER PRIMARY KEY,
`color_code` VARCHAR(15) NOT NULL,
`product_category_code` VARCHAR(15) NOT NULL,
`product_name` VARCHAR(80),
`typical_buying_price` VARCHAR(20),
`typical_selling_price` VARCHAR(20),
`product_description` VARCHAR(255),
`other_product_details` VARCHAR(255),
FOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )
)

CREATE TABLE `Product_Characteristics` (
`product_id` INTEGER NOT NULL,
`characteristic_id` INTEGER NOT NULL,
`product_characteristic_value` VARCHAR(50),
FOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
)

### Question
What are the names of products with 'white' as their color description?

### SQL
SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code WHERE t2.color_description  =  "white"
### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)

CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)

CREATE TABLE `Ref_Product_Categories` (
`product_category_code` VARCHAR(15) PRIMARY KEY,
`product_category_description` VARCHAR(80),
`unit_of_measure` VARCHAR(20)
)

CREATE TABLE `Characteristics` (
`characteristic_id` INTEGER PRIMARY KEY,
`characteristic_type_code` VARCHAR(15) NOT NULL,
`characteristic_data_type` VARCHAR(10),
`characteristic_name` VARCHAR(80),
`other_characteristic_details` VARCHAR(255),
FOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )
)

CREATE TABLE `Products` (
`product_id` INTEGER PRIMARY KEY,
`color_code` VARCHAR(15) NOT NULL,
`product_category_code` VARCHAR(15) NOT NULL,
`product_name` VARCHAR(80),
`typical_buying_price` VARCHAR(20),
`typical_selling_price` VARCHAR(20),
`product_description` VARCHAR(255),
`other_product_details` VARCHAR(255),
FOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )
)

CREATE TABLE `Product_Characteristics` (
`product_id` INTEGER NOT NULL,
`characteristic_id` INTEGER NOT NULL,
`product_characteristic_value` VARCHAR(50),
FOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
)

### Question
What are the name and typical buying and selling prices of the products that have color described as "yellow"?

### SQL
SELECT t1.product_name ,  t1.typical_buying_price ,  t1.typical_selling_price FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code WHERE t2.color_description  =  "yellow"
### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)

CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)

CREATE TABLE `Ref_Product_Categories` (
`product_category_code` VARCHAR(15) PRIMARY KEY,
`product_category_description` VARCHAR(80),
`unit_of_measure` VARCHAR(20)
)

CREATE TABLE `Characteristics` (
`characteristic_id` INTEGER PRIMARY KEY,
`characteristic_type_code` VARCHAR(15) NOT NULL,
`characteristic_data_type` VARCHAR(10),
`characteristic_name` VARCHAR(80),
`other_characteristic_details` VARCHAR(255),
FOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )
)

CREATE TABLE `Products` (
`product_id` INTEGER PRIMARY KEY,
`color_code` VARCHAR(15) NOT NULL,
`product_category_code` VARCHAR(15) NOT NULL,
`product_name` VARCHAR(80),
`typical_buying_price` VARCHAR(20),
`typical_selling_price` VARCHAR(20),
`product_description` VARCHAR(255),
`other_product_details` VARCHAR(255),
FOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )
)

CREATE TABLE `Product_Characteristics` (
`product_id` INTEGER NOT NULL,
`characteristic_id` INTEGER NOT NULL,
`product_characteristic_value` VARCHAR(50),
FOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
)

### Question
Return the names and typical buying and selling prices for products that have 'yellow' as their color description.

### SQL
SELECT t1.product_name ,  t1.typical_buying_price ,  t1.typical_selling_price FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code WHERE t2.color_description  =  "yellow"