cloudr3nmETH total supply
    Updated 2024-12-31
    -- ethereum supply 0xd5f7838f5c461feff7fe49ea5ebaf7728bb0adfa
    with
    eth_meth as (
    select
    day,
    sum(amount) as daily_change,
    sum(daily_change) over (order by day asc) eth_supply
    from (
    select
    date(block_timestamp) as day,
    sum(case when to_address='0x0000000000000000000000000000000000000000' then amount*(-1)
    when from_address='0x0000000000000000000000000000000000000000' then amount
    end ) as amount
    from
    ethereum.core.ez_token_transfers
    where
    contract_address = '0xd5f7838f5c461feff7fe49ea5ebaf7728bb0adfa' and
    (to_address='0x0000000000000000000000000000000000000000' or from_address='0x0000000000000000000000000000000000000000')
    group by
    day
    )
    group by day
    ),

    mnt_meth as (
    select
    day,
    sum(amount) as daily_change,
    sum(daily_change) over (order by day asc) mnt_supply
    from (
    select
    date(block_timestamp) as day,
    sum(case when to_address='0x0000000000000000000000000000000000000000' then amount*(-1)
    when from_address='0x0000000000000000000000000000000000000000' then amount
    end ) as amount
    from
    QueryRunArchived: QueryRun has been archived