mirror of
https://gitlab.com/cief-data/dbt_cloud.git
synced 2026-08-19 04:14:00 +00:00
Enhance company detail only
This commit is contained in:
@@ -347,13 +347,32 @@ generate_cumulative_count AS (
|
|||||||
FROM union_all_activities_flag_migrated_company
|
FROM union_all_activities_flag_migrated_company
|
||||||
|
|
||||||
ORDER BY activity_datetime
|
ORDER BY activity_datetime
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
|
-- Include additional details for companies
|
||||||
|
enhance_company_details AS (
|
||||||
|
|
||||||
|
SELECT
|
||||||
|
generate_cumulative_count.*,
|
||||||
|
|
||||||
|
companies.company_marking_id,
|
||||||
|
companies.company_created_datetime AS company_register_datetime
|
||||||
|
|
||||||
|
FROM generate_cumulative_count
|
||||||
|
|
||||||
|
LEFT JOIN companies
|
||||||
|
ON (generate_cumulative_count.company_id = companies.company_id)
|
||||||
|
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
-- FINAL
|
-- FINAL
|
||||||
final__rep_exchange__company_conversion_funnels AS (
|
final__rep_exchange__company_conversion_funnels AS (
|
||||||
SELECT
|
SELECT
|
||||||
-- ids
|
-- ids
|
||||||
company_id,
|
company_id,
|
||||||
|
company_marking_id,
|
||||||
|
|
||||||
-- dimensions
|
-- dimensions
|
||||||
is_data_cleansing_generate_row,
|
is_data_cleansing_generate_row,
|
||||||
@@ -372,6 +391,7 @@ final__rep_exchange__company_conversion_funnels AS (
|
|||||||
cumulative_first_time_order_completed_activity,
|
cumulative_first_time_order_completed_activity,
|
||||||
cumulative_repeat_completed_order_after_30days_activity,
|
cumulative_repeat_completed_order_after_30days_activity,
|
||||||
cumulative_repeat_completed_order_after_60days_activity,
|
cumulative_repeat_completed_order_after_60days_activity,
|
||||||
|
|
||||||
include_migrated_cumulative_register_activity,
|
include_migrated_cumulative_register_activity,
|
||||||
include_migrated_cumulative_email_verified_activity,
|
include_migrated_cumulative_email_verified_activity,
|
||||||
include_migrated_cumulative_identity_document_uploaded_activity,
|
include_migrated_cumulative_identity_document_uploaded_activity,
|
||||||
@@ -383,13 +403,13 @@ final__rep_exchange__company_conversion_funnels AS (
|
|||||||
include_migrated_cumulative_repeat_completed_order_after_60days_activity,
|
include_migrated_cumulative_repeat_completed_order_after_60days_activity,
|
||||||
|
|
||||||
-- date/times
|
-- date/times
|
||||||
|
company_register_datetime,
|
||||||
activity_datetime,
|
activity_datetime,
|
||||||
|
|
||||||
-- metadata
|
-- metadata
|
||||||
_dbt_ran_datetime
|
_dbt_ran_datetime
|
||||||
|
|
||||||
FROM generate_cumulative_count
|
FROM enhance_company_details
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
SELECT * FROM final__rep_exchange__company_conversion_funnels
|
SELECT * FROM final__rep_exchange__company_conversion_funnels
|
||||||
Reference in New Issue
Block a user