Skip to content

commit changes to dim_orgs #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions models/core/dim_orgs.sql
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
WITH orgs AS (
--prod
SELECT
org_id
, MIN(event_timestamp) AS created_at
FROM {{ ref('signed_in') }}
GROUP BY 1

-- --dev
-- SELECT
-- org_id
-- , org_name
-- , employee_range
-- , created_at
-- FROM {{ ref('org_created') }}
-- org_id
-- , MIN(event_timestamp) AS created_at
-- FROM {{ ref('signed_in') }}
-- GROUP BY 1

--dev
SELECT
org_id
, org_name
, employee_range
, created_at
FROM {{ ref('org_created') }}
)

, user_count AS (
Expand All @@ -36,7 +36,7 @@ WITH orgs AS (
SELECT
orgs.org_id
, created_at
, num_users
, case when num_users > 10 then 10 else num_users end as num_users
, sub_created_at
, sub_plan
, sub_price
Expand Down