Skip to content

Commit

Permalink
Metaplex: add unique signers and new holders (#611)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwes authored Nov 13, 2024
1 parent 8c8a3a2 commit 126c80f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions models/projects/metaplex/core/ez_metaplex_metrics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ with revenue as (
from {{ ref("fact_metaplex_active_wallets") }}
group by 1
)
, unique_signers as (
select
date
, sum(unique_signers) as unique_signers
from {{ ref("fact_metaplex_unique_signers") }}
group by 1
)
, new_holders as (
select
date
, sum(daily_new_holders) as daily_new_holders
from {{ ref("fact_metaplex_new_holders") }}
group by 1
)
, transactions as (
select
date
Expand Down Expand Up @@ -57,6 +71,8 @@ SELECT
, coalesce(mints.daily_mints, 0) as daily_mints
, coalesce(active_wallets.dau, 0) as dau
, coalesce(transactions.txns, 0) as txns
, coalesce(unique_signers.unique_signers, 0) as unique_signers
, coalesce(new_holders.daily_new_holders, 0) as daily_new_holders
, coalesce(price.price, 0) as price
, coalesce(price.market_cap, 0) as market_cap
, price.fdmc
Expand All @@ -69,4 +85,6 @@ LEFT JOIN buybacks USING (date)
LEFT JOIN mints USING (date)
LEFT JOIN active_wallets USING (date)
LEFT JOIN transactions USING (date)
LEFT JOIN unique_signers USING (date)
LEFT JOIN new_holders USING (date)
where coalesce(price.date, revenue.date, buybacks.date, transactions.date) < to_date(sysdate())

0 comments on commit 126c80f

Please sign in to comment.