Skip to content
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

Stablecoins: Add Token Holders #567

Merged
merged 1 commit into from
Oct 24, 2024
Merged
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
4 changes: 4 additions & 0 deletions macros/stablecoins/stablecoin_breakdown.sql
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ select
when sum(p2p_stablecoin_daily_txns) > 0 then sum(p2p_stablecoin_transfer_volume) / sum(p2p_stablecoin_daily_txns)
else 0
end as p2p_stablecoin_avg_txn_value
{% if granularity == 'day' and (breakdown == ['symbol'] or breakdown == ['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
{% endif %}
{% if granularity == 'day' %}
, sum(stablecoin_supply) as stablecoin_supply
, sum(case when is_wallet::number = 1 then stablecoin_supply else 0 end) as p2p_stablecoin_supply
Expand Down
Loading