mirror of
https://gitlab.com/cief-data/dbt_cloud.git
synced 2026-08-19 04:14:00 +00:00
Merge branch 'YAM_rep_shipping_company_purchase_frequency' into 'main'
Remove super high usage See merge request cief-data/dbt_cloud!18
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{% set time_grain_list = ["month", "quarter", "year"] %}
|
||||
{% set monthly_cbm_rank_list = [1.25, 5, 20] %} -- 0->1.25 40% 1.25->5 40% 5->20 15% 20->onward 5%
|
||||
{% set quarterly_cbm_rank_list = [1.75, 10, 30] %}
|
||||
{% set yearly_cbm_rank_list = [2.5, 20, 60] %}
|
||||
{% set monthly_cbm_rank_list = [1.25, 5] %} -- 0->1.25 40% 1.25->5 40% 5->20 20%
|
||||
{% set quarterly_cbm_rank_list = [1.75, 10] %}
|
||||
{% set yearly_cbm_rank_list = [2.5, 20] %}
|
||||
|
||||
-- IMPORT
|
||||
WITH shipping_companies AS (
|
||||
@@ -99,10 +99,8 @@ dates AS (
|
||||
THEN 'LOW_USAGE'
|
||||
WHEN (total_cbm_completed_approved > {{cbm_rank_list[0]}} AND total_cbm_completed_approved <= {{cbm_rank_list[1]}})
|
||||
THEN 'MEDIUM_USAGE'
|
||||
WHEN (total_cbm_completed_approved > {{cbm_rank_list[1]}} AND total_cbm_completed_approved <= {{cbm_rank_list[2]}})
|
||||
WHEN (total_cbm_completed_approved > {{cbm_rank_list[1]}})
|
||||
THEN 'HIGH_USAGE'
|
||||
WHEN total_cbm_completed_approved > {{cbm_rank_list[2]}}
|
||||
THEN 'SUPER_HIGH_USAGE'
|
||||
ELSE 'ERROR'
|
||||
END AS company_usage_type,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user