innovationacademy-kr / 42seoul-info

42 Cadet 정보를 확인할 수 있는 프로젝트
8 stars 3 forks source link

[REFACTOR] 블랙홀 컬럼 추출 #14

Open kenu opened 3 years ago

kenu commented 3 years ago

select username, active, blackholed_at, datediff(blackholed_at, now()) toblack from (select username, active, str_to_date(json_extract(data, '$.cursus_users[1].blackholed_at'),'"%Y-%m-%dT%T.%fZ"') blackholed_at from users where active = true) a where datediff(blackholed_at, now()) > -10