maybeyonaspoolynft_user_dist
    Updated 2022-06-21
    with
    mint_info as (
    select
    block_timestamp,
    tx_hash,
    case contract_address
    when '0x5663e3e096f1743e77b8f71b5de0cf9dfd058523' then 'judge'
    when '0x3545192b340f50d77403dc0a64cf2b32f03d00a9' then 'lawyer'
    when '0x90b3832e2f2ade2fe382a911805b6933c056d6ed' then 'supporter'
    end as nft,
    case contract_address
    when '0x5663e3e096f1743e77b8f71b5de0cf9dfd058523' then 75
    when '0x3545192b340f50d77403dc0a64cf2b32f03d00a9' then 1
    when '0x90b3832e2f2ade2fe382a911805b6933c056d6ed' then 0.1
    end as eth_paid,
    event_inputs:to::string as user
    from ethereum.core.fact_event_logs
    where contract_address in (
    '0x5663e3e096f1743e77b8f71b5de0cf9dfd058523', -- 75 eth judge
    '0x3545192b340f50d77403dc0a64cf2b32f03d00a9', -- 1 eth lawyer
    '0x90b3832e2f2ade2fe382a911805b6933c056d6ed' -- 0.1 eth supporter
    )
    and event_name = 'Transfer'
    and event_inputs:from::string = '0x0000000000000000000000000000000000000000'
    )

    select
    mints,
    count(user) as users
    from (
    select
    user,
    count(tx_hash) as mints
    from mint_info
    group by 1
    )
    Run a query to Download Data