Skip to content

Commit

Permalink
Adjust threshold of value segment
Browse files Browse the repository at this point in the history
Signed-off-by: Even Wei <shinycockorach@gmail.com>
  • Loading branch information
even-wei committed Mar 6, 2024
1 parent fb23c05 commit ea62d5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions models/customer_segments.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ SELECT
ELSE 'Rare Buyer'
END AS order_frequency_segment,
CASE
WHEN customer_lifetime_value > 10 THEN 'High Value'
WHEN customer_lifetime_value BETWEEN 50 AND 10 THEN 'Medium Value'
WHEN customer_lifetime_value > 4000 THEN 'High Value'
WHEN customer_lifetime_value BETWEEN 1500 AND 4000 THEN 'Medium Value'
ELSE 'Low Value'
END AS value_segment
FROM {{ ref('customers') }}

0 comments on commit ea62d5d

Please sign in to comment.