Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ latest_churn AS (
SELECT DISTINCT ON (c.member_id)
c.member_id,
c.churn_score,
c.churn_tier
c.risk_level AS churn_tier
FROM churn_score_snapshot c
ORDER BY c.member_id, c.snapshot_date DESC
ORDER BY c.member_id, c.base_date DESC
Comment thread
bon0512 marked this conversation as resolved.
),
latest_logs_14d AS (
-- 행동 로그는 최근 14일 이내 데이터만 허용하고 그중 최신 1건을 사용한다.
Expand Down Expand Up @@ -338,4 +338,4 @@ ON CONFLICT (member_id) DO UPDATE SET
product_type_clicks = EXCLUDED.product_type_clicks,
recent_viewed_tags_top_3 = EXCLUDED.recent_viewed_tags_top_3,
contract_expiry_within_3m = EXCLUDED.contract_expiry_within_3m,
updated_at = EXCLUDED.updated_at;
updated_at = EXCLUDED.updated_at;
Loading