Skip to content

Commit

Permalink
Update datamart_query.sql
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillZhul authored May 29, 2023
1 parent d77e3e0 commit a28066a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion datamart_query.sql
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@

INCERT INTO analysis.dm_rfm_segments (user_id, recency, frequency, monetary_value)
SELECT u.id,
r.recency,
f.frequency,
m.monetary_value
FROM analysis.users u
LEFT JOIN analysis.tmp_rfm_recency r ON u.id = r.user_id
LEFT JOIN analysis.tmp_rfm_frequency f ON u.id = f.user_id
LEFT JOIN analysis.tmp_rfm_monetary_value m ON u.id = m.user_id;

0 comments on commit a28066a

Please sign in to comment.