-
Notifications
You must be signed in to change notification settings - Fork 0
/
constant.py
38 lines (37 loc) · 1.31 KB
/
constant.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
SQL1 = """select case SEX when 1 then 1 else 0 END as male
, case SEX when 0 then 1 else 0 END as female
, AGE
, cast(educa as SIGNED INTEGER) as educa
, case when income_ann <= 3 then 1
when income_ann <= 8 then 2
when income_ann <= 15 then 3
when income_ann <= 30 then 4
when income_ann <= 50 then 5
when income_ann <= 100 then 6
else 7 end as income_ann
, OCC_CODE
, ACTS
, OPEN_DAY
, CRED_LIMIT
, ROUND(USE_RATE, 3)
, HI_PURCHSE
, OCT_COUNT
, AGE_CNT as DUE_CNT
, AGE_MAX as DUE_MA_CNT
, ROUND(DET_CRE,3)
, cast(DUE_CRE*CRED_LIMIT as signed integer) AS DUE_AMT
, cast(PMT_DUE*DUE_CRE*CRED_LIMIT as signed integer) AS PMT_AMT
, PMT_DAY
, CT_MP_Y
, CASH_CT
, cast(CASH_AV as signed integer)
, M_PRECIOUS
, M_SPORTSCLUB
, M_FURNITURE
, M_AUTOSERVICE
, RES
from a00_ccb_res
where EDUCA != ''
and INCOME_ANN != ''
and OCC_CATGRY != ''
and occ_code !='';"""