flyingfishToken Daily Holders with price
    Updated 2023-11-13
    with min_date as (
    select
    min(block_timestamp)::date as min_timestamp
    from ethereum.core.ez_token_transfers
    where contract_address = lower('{{token}}')
    ),

    dates as (
    select
    date_day
    from ethereum.core.dim_dates
    where date_day between (select min_timestamp from min_date) and current_date()
    ),

    total_holders as ( -- all possible addresses that have held
    select
    distinct to_address
    from ethereum.core.ez_token_transfers
    where contract_address = lower('{{token}}')
    ),

    dates_x_total_holders as (-- cross join between dates and holders so that for every date, there is an entry for each user
    select
    date_day as full_dates,
    to_address as full_user_addresses
    from dates
    cross join total_holders
    )
    --SELECT full_dates, count(DISTINCT full_user_addresses) FROM dates_x_total_holders group by 1
    ,

    end_of_day_balance as (
    select
    date_trunc('day', block_timestamp) as day,
    user_address,
    balance
    Run a query to Download Data