select id as id,
       NULL as sales_area_id,
       NULL as leaf_flag_code,
       NULL as global_area_id,
       NULL as grouping_flag_code,
       id as disp_sort,
       disp_name as disp_name,
       j_name as j_name,
       e_name as e_name,
       NULL as kana_name,
       NULL as note,
       IF(deleted_at is NULL, 0, 1) as invalid_flag_code,
       NULL as deleted_at,
       created_at as created_at,
       updated_at as updated_at
FROM areas
INTO OUTFILE "/tmp/sales_areas.csv" FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\';
