select id as id,
       customer_group_id as customer_group_id,
       payment_condition_code as payment_condition_code,
       payment_type_code as payment_type_code,
       payment_month_code as payment_month_code,
       payment_date_code as payment_date_code,
       encach_month_code as encach_month_code,
       encach_date_code as encach_date_code,
       note as note,
       created_at as created_at,
       updated_at as updated_at
FROM customer_payments
INTO OUTFILE "/tmp/customer_group_payments.csv" FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\';
