통계 최종쿼리
select * from (select /* business.usr.sub.lifewtrcy.dao.LifewtRcyDAO.selectRcyRecord */ tfi.fclt_sn , tra.fclt_sn , tra.fclt_nm , TO_CHAR(tra.reg_date, 'yyyy-mm-dd')AS "reg_date" , tra.fclt_year || '.' || tra.fclt_mthAS "yearMth" , tcc.comm_nmAS "sgg_nm" , a.comm_nm AS "pr_mthd_dp1" , b.comm_nm as "pr_mthd_dp2" , tra.sgg_cdAs "sggCd" , max(case when tra.sts_wst_type_cd = 'RCY0501' then tra.tot_a..
2021. 11. 11.
코드 매핑작업; a_code에 해당하는 b_code를 매핑테이블을 활용해 넣어주기
코드테이블 CREATE TABLE public.t_comm_cd ( comm_code varchar(20) NOT NULL, category varchar(20) NULL, comm_nm varchar(200) NULL, use bool NULL, p_code varchar(20) NULL, reg_date timestamp(6) NULL, upd_date timestamp(6) NULL, eng_nm varchar(20) NULL, sort_ordr int4 NULL, CONSTRAINT t_comm_cd_pk PRIMARY KEY (comm_code), CONSTRAINT t_comm_cd_fk1 FOREIGN KEY (category) REFERENCES public.t_category_cd(ctg..
2021. 11. 10.