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

Return the id of the staff whose Staff Department Assignment was earlier than that of any Clerical Staff.
SELECT staff_id FROM staff_department_assignments WHERE date_assigned_to < (SELECT MAX(date_assigned_to) FROM staff_department_assignments WHERE job_title_code = 'Clerical Staff')
SELECT "staff_id" FROM "staff_department_assignments" WHERE "date_assigned_to" < (SELECT MAX("date_assigned_to") FROM "staff_department_assignments" WHERE "job_title_code" = 'Clerical Staff')