human
Schema:
Addresses (address_id, address_details)
Staff (staff_id, staff_gender, staff_name)
Suppliers (supplier_id, supplier_name, supplier_phone)
Department_Store_Chain (dept_store_chain_id, dept_store_chain_name)
Customers (customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email)
Products (product_id, product_type_code, product_name, product_price)
Supplier_Addresses (supplier_id, address_id, date_from, date_to)
Customer_Addresses (customer_id, address_id, date_from, date_to)
Customer_Orders (order_id, customer_id, order_status_code, order_date)
Department_Stores (dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email)
Departments (department_id, dept_store_id, department_name)
Order_Items (order_item_id, order_id, product_id)
Product_Suppliers (product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased)
Staff_Department_Assignments (staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to)
Please answer with SQL.
assistant
Sure, I understand.
human
Hello! Can you provide me with a list of all the different product types?
assistant
SELECT distinct product_type_code FROM products GROUP BY product_type_code;
human
Sweet! Can you update this list to show what the maximum product price is for both Clothes and Hardware, and include the minimum product price for each?
assistant
SELECT product_type_code , MAX( product_price ) , MIN( product_price ) FROM products GROUP BY product_type_code;
human
Cool! Can you show me a list of all of the different product names?
assistant
SELECT distinct product_name FROM products ;