SELECT c.customer_code, c.customer_name1, c.customer_name2, c.note1, CASE WHEN rgc.customer_code IS NULL THEN 0 ELSE 1 END, c.status FROM customer c LEFT OUTER JOIN reading_group_customer rgc ON rgc.customer_group = '03040000' AND rgc.any_code = '03043001' AND rgc.customer_code = c.customer_code WHERE c.status <> -1 AND c.customer_group = '03040000' ORDER BY c.customer_code