human
Schema:
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, typical_buying_price, typical_selling_price, product_description, other_product_details)
Product_Characteristics (product_id, characteristic_id, product_characteristic_value)
Please answer with SQL.
assistant
Sure, I understand.
human
What is the unit of measurement of product named 'cumin'?
assistant
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'
human
Find the product category description of the product category with code 'Spices'.
assistant
SELECT product_category_description FROM ref_product_categories WHERE product_category_code = 'Spices'
human
Find the unit of measurement and product category code of product named 'chervil'.
assistant
SELECT t2.unit_of_measure , t2.product_category_code FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = 'chervil'
human
List the names, color descriptions and product descriptions of products with category 'Herbs'.
assistant
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'
human
What is the unit of measuerment of the product category code 'Herbs'?
assistant
SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = 'Herbs'
human
Return the description and unit of measurement for products in the 'Herbs' category.
assistant
SELECT product_category_description , unit_of_measure FROM ref_product_categories WHERE product_category_code = "Herbs" ;