Skip to content

Commit

Permalink
Revert "test changes (#5)"
Browse files Browse the repository at this point in the history
This reverts commit c2c29ce.
  • Loading branch information
sungchun12 authored Feb 7, 2024
1 parent c2c29ce commit e00f454
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions models/core/dim_orgs.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ WITH orgs AS (
--prod
SELECT
org_id
, org_name
, employee_range
, created_at
FROM {{ ref('org_created') }}
, MIN(event_timestamp) AS created_at
FROM {{ ref('signed_in') }}
GROUP BY 1

-- --dev
-- SELECT
Expand All @@ -29,7 +28,7 @@ WITH orgs AS (
org_id
, event_timestamp AS sub_created_at
, plan as sub_plan
, coalesce(price, 0) as sub_price
, price as sub_price
FROM {{ ref('subscription_created') }}
)

Expand All @@ -39,8 +38,8 @@ SELECT
, created_at
, num_users
, sub_created_at
, case when num_users = 1 then 'Individual' else sub_plan end as sub_plan
, sub_plan
, sub_price
FROM orgs
LEFT JOIN user_count USING (org_id)
LEFT JOIN subscriptions USING (org_id)
LEFT JOIN subscriptions USING (org_id)
2 changes: 1 addition & 1 deletion models/syncs/sales_sync.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ WITH org_events AS (
*
FROM {{ ref('dim_orgs') }}
LEFT JOIN {{ ref('feature_used') }} USING (org_id)
WHERE sub_plan IS NULL or sub_plan = 'Individual'
WHERE sub_plan IS NULL
)

, final AS (
Expand Down

0 comments on commit e00f454

Please sign in to comment.