CREATE TABLE customers (customer_id NUMBER, payment_method CLOB, customer_name CLOB, date_became_customer TIME, other_customer_details CLOB)
CREATE TABLE addresses (address_id NUMBER, address_content CLOB, city CLOB, zip_postcode CLOB, state_province_county CLOB, country CLOB, other_address_details CLOB)
CREATE TABLE products (product_id NUMBER, product_details CLOB)
CREATE TABLE customer_orders (order_id NUMBER, customer_id NUMBER, order_status CLOB, order_date TIME, order_details CLOB)
CREATE TABLE customer_contact_channels (customer_id NUMBER, channel_code CLOB, active_from_date TIME, active_to_date TIME, contact_number CLOB)
CREATE TABLE order_items (order_id NUMBER, product_id NUMBER, order_quantity CLOB)
CREATE TABLE customer_addresses (customer_id NUMBER, address_id NUMBER, date_address_from TIME, address_type CLOB, date_address_to TIME)

Return the channel code and contact number of the customer contact channel whose active duration was the longest.
SELECT channel_code, contact_number FROM customer_contact_channels WHERE active_to_date - active_from_date = (SELECT active_to_date - active_from_date FROM customer_contact_channels ORDER BY (active_to_date - active_from_date) DESC LIMIT 1)
SELECT "channel_code", "contact_number" FROM "customer_contact_channels" WHERE "active_to_date" - "active_from_date" = (SELECT "active_to_date" - "active_from_date" FROM "customer_contact_channels" ORDER BY "active_to_date" - "active_from_date" DESC FETCH FIRST 1 ROWS ONLY)