Skip to content

Commit

Permalink
Stablecoins: unifying token holder name to tokenholder (#576)
Browse files Browse the repository at this point in the history
  • Loading branch information
SebMelendez01 authored Oct 28, 2024
1 parent 8f73dad commit 35a5f24
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 30 deletions.
12 changes: 6 additions & 6 deletions macros/metrics/get_stablecoin_metrics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ with mau as (
, p2p_stablecoin_daily_txns as p2p_stablecoin_txns
, p2p_stablecoin_dau

, stablecoin_token_holder_count
, p2p_stablecoin_token_holder_count
, stablecoin_tokenholder_count
, p2p_stablecoin_tokenholder_count

, p2p_stablecoin_supply as p2p_stablecoin_total_supply
, stablecoin_supply as stablecoin_total_supply
Expand All @@ -58,11 +58,11 @@ select
, p2p_stablecoin_dau
, p2p_stablecoin_mau
{% if breakdown == "chain" %}
, stablecoin_token_holder_count
, p2p_stablecoin_token_holder_count
, stablecoin_tokenholder_count
, p2p_stablecoin_tokenholder_count
{% elif breakdown == "symbol" %}
, stablecoin_token_holder_count as token_holder_count
, p2p_stablecoin_token_holder_count as p2p_token_holder_count
, stablecoin_tokenholder_count as tokenholder_count
, p2p_stablecoin_tokenholder_count as p2p_tokenholder_count
{% endif %}
, p2p_stablecoin_total_supply
, stablecoin_total_supply
Expand Down
4 changes: 2 additions & 2 deletions macros/stablecoins/stablecoin_breakdown.sql
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ select
else 0
end as p2p_stablecoin_avg_txn_value
{% if granularity == 'day' and breakdowns | length == 1 and (breakdowns[0] == 'symbol' or breakdowns[0] == 'chain') %}
, count(distinct case when stablecoin_supply > 0 then from_address end) as stablecoin_token_holder_count
, count(distinct case when is_wallet::number = 1 and stablecoin_supply > 0 then from_address end) as p2p_stablecoin_token_holder_count
, count(distinct case when stablecoin_supply > 0 then from_address end) as stablecoin_tokenholder_count
, count(distinct case when is_wallet::number = 1 and stablecoin_supply > 0 then from_address end) as p2p_stablecoin_tokenholder_count
{% endif %}
{% if granularity == 'day' %}
, sum(stablecoin_supply) as stablecoin_supply
Expand Down
4 changes: 2 additions & 2 deletions models/projects/arbitrum/core/ez_arbitrum_metrics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ select
p2p_stablecoin_dau,
p2p_stablecoin_mau,
stablecoin_data.p2p_stablecoin_transfer_volume,
stablecoin_token_holder_count,
p2p_stablecoin_token_holder_count,
stablecoin_tokenholder_count,
p2p_stablecoin_tokenholder_count,
nft_trading_volume,
p2p_native_transfer_volume,
p2p_token_transfer_volume,
Expand Down
4 changes: 2 additions & 2 deletions models/projects/avalanche/core/ez_avalanche_metrics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ select
p2p_stablecoin_dau,
p2p_stablecoin_mau,
stablecoin_data.p2p_stablecoin_transfer_volume,
stablecoin_token_holder_count,
p2p_stablecoin_token_holder_count,
stablecoin_tokenholder_count,
p2p_stablecoin_tokenholder_count,
total_staked_native,
total_staked_usd,
issuance,
Expand Down
4 changes: 2 additions & 2 deletions models/projects/base/core/ez_base_metrics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ select
p2p_stablecoin_dau,
p2p_stablecoin_mau,
stablecoin_data.p2p_stablecoin_transfer_volume,
stablecoin_token_holder_count,
p2p_stablecoin_token_holder_count,
stablecoin_tokenholder_count,
p2p_stablecoin_tokenholder_count,
nft_trading_volume,
p2p_native_transfer_volume,
p2p_token_transfer_volume,
Expand Down
4 changes: 2 additions & 2 deletions models/projects/bsc/core/ez_bsc_metrics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ select
artemis_stablecoin_dau,
artemis_stablecoin_mau,
artemis_stablecoin_transfer_volume,
stablecoin_token_holder_count,
p2p_stablecoin_token_holder_count,
stablecoin_tokenholder_count,
p2p_stablecoin_tokenholder_count,
p2p_stablecoin_txns,
p2p_stablecoin_dau,
p2p_stablecoin_mau,
Expand Down
4 changes: 2 additions & 2 deletions models/projects/celo/core/ez_celo_metrics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ select
artemis_stablecoin_dau,
artemis_stablecoin_mau,
artemis_stablecoin_transfer_volume,
stablecoin_token_holder_count,
p2p_stablecoin_token_holder_count,
stablecoin_tokenholder_count,
p2p_stablecoin_tokenholder_count,
p2p_stablecoin_txns,
p2p_stablecoin_dau,
p2p_stablecoin_mau,
Expand Down
4 changes: 2 additions & 2 deletions models/projects/ethereum/core/ez_ethereum_metrics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ select
p2p_stablecoin_dau,
p2p_stablecoin_mau,
stablecoin_data.p2p_stablecoin_transfer_volume,
stablecoin_token_holder_count,
p2p_stablecoin_token_holder_count,
stablecoin_tokenholder_count,
p2p_stablecoin_tokenholder_count,

censored_blocks,
semi_censored_blocks,
Expand Down
4 changes: 2 additions & 2 deletions models/projects/optimism/core/ez_optimism_metrics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ select
p2p_stablecoin_dau,
p2p_stablecoin_mau,
stablecoin_data.p2p_stablecoin_transfer_volume,
stablecoin_token_holder_count,
p2p_stablecoin_token_holder_count,
stablecoin_tokenholder_count,
p2p_stablecoin_tokenholder_count,
nft_trading_volume,
p2p_native_transfer_volume,
p2p_token_transfer_volume,
Expand Down
4 changes: 2 additions & 2 deletions models/projects/polygon/core/ez_polygon_metrics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ select
p2p_stablecoin_dau,
p2p_stablecoin_mau,
stablecoin_data.p2p_stablecoin_transfer_volume,
stablecoin_token_holder_count,
p2p_stablecoin_token_holder_count,
stablecoin_tokenholder_count,
p2p_stablecoin_tokenholder_count,
nft_trading_volume,
p2p_native_transfer_volume,
p2p_token_transfer_volume,
Expand Down
4 changes: 2 additions & 2 deletions models/projects/solana/core/ez_solana_metrics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ select
p2p_stablecoin_dau,
p2p_stablecoin_mau,
stablecoin_data.p2p_stablecoin_transfer_volume,
stablecoin_token_holder_count,
p2p_stablecoin_token_holder_count,
stablecoin_tokenholder_count,
p2p_stablecoin_tokenholder_count,
total_staked_native,
total_staked_usd,
issuance,
Expand Down
4 changes: 2 additions & 2 deletions models/projects/ton/core/ez_ton_metrics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ select
p2p_stablecoin_dau,
p2p_stablecoin_mau,
p2p_stablecoin_transfer_volume,
stablecoin_token_holder_count,
p2p_stablecoin_token_holder_count,
stablecoin_tokenholder_count,
p2p_stablecoin_tokenholder_count,
price,
market_cap,
fdmc,
Expand Down
4 changes: 2 additions & 2 deletions models/projects/tron/core/ez_tron_metrics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ select
p2p_stablecoin_dau,
p2p_stablecoin_mau,
stablecoin_data.p2p_stablecoin_transfer_volume,
stablecoin_token_holder_count,
p2p_stablecoin_token_holder_count,
stablecoin_tokenholder_count,
p2p_stablecoin_tokenholder_count,
p2p_native_transfer_volume,
p2p_token_transfer_volume,
p2p_transfer_volume,
Expand Down

0 comments on commit 35a5f24

Please sign in to comment.