Below is the list of tables from the database along with their columns and datatype. Need to generate an accurate SQL query for the question.
Only use the columns present in the respective table. Only use the columns which are required to generate the SQL query. Only use table joins if required and not otherwise.

### Tables ###
TABLE: CREATE TABLE departments ( department_id number, dept_store_id number, department_name text )
TABLE: CREATE TABLE staff_department_assignments ( staff_id number, department_id number, date_assigned_from time, job_title_code text, date_assigned_to time )
TABLE: CREATE TABLE supplier_addresses ( supplier_id number, address_id number, date_from time, date_to time )
TABLE: CREATE TABLE addresses ( address_id number, address_details text )
TABLE: CREATE TABLE customer_orders ( order_id number, customer_id number, order_status_code text, order_date time )
TABLE: CREATE TABLE suppliers ( supplier_id number, supplier_name text, supplier_phone text )
TABLE: CREATE TABLE product_suppliers ( product_id number, supplier_id number, date_supplied_from time, date_supplied_to time, total_amount_purchased text, total_value_purchased number )
TABLE: CREATE TABLE department_stores ( dept_store_id number, dept_store_chain_id number, store_name text, store_address text, store_phone text, store_email text )
TABLE: CREATE TABLE order_items ( order_item_id number, order_id number, product_id number )
TABLE: CREATE TABLE customer_addresses ( customer_id number, address_id number, date_from time, date_to time )
TABLE: CREATE TABLE department_store_chain ( dept_store_chain_id number, dept_store_chain_name text )
TABLE: CREATE TABLE customers ( customer_id number, payment_method_code text, customer_code text, customer_name text, customer_address text, customer_phone text, customer_email text )
TABLE: CREATE TABLE staff ( staff_id number, staff_gender text, staff_name text )
TABLE: CREATE TABLE products ( product_id number, product_type_code text, product_name text, product_price number )

### Question ###
Find the id of suppliers whose average amount purchased for each product is above 50000 or below 30000.

### Accurate SQL ###

SELECT supplier_id FROM product_suppliers GROUP BY supplier_id HAVING AVG(total_amount_purchased) > 50000 OR AVG(total_amount_purchased) < 30000