Write a SQL query to combine customer records from multiple tables and return a unified profile with the latest attributes at Acxiom.
Use the provided customer master, profile history, and preference history tables. Return every customer, including customers without matching history records.
Output
- One row per customer with
customer_id, external_id, first_name, last_name, email, phone, preferred_channel, marketing_opt_in, profile_updated_at, and preference_updated_at.
- Use the latest profile and preference record for each customer; retain NULLs when no matching record exists.
- Order by
customer_id ascending.