freemartianUSD Balance
    Updated 2022-11-09
    with source_mints as (
    select
    tx_hash,
    block_timestamp,
    contract_address as collection,
    event_inputs:_to as minter,
    event_inputs:_id as NFTid
    from polygon.core.fact_event_logs
    where origin_function_signature in ('0x5a86c41a', '0x669f5a51')
    and event_inputs:_from = '0x0000000000000000000000000000000000000000'
    and event_name = 'TransferSingle'
    and tx_status = 'SUCCESS')
    select sum(current_bal) as amount, token_name, sum(usd_value_now) as usd_amount
    from ethereum.core.ez_current_balances
    where user_address in (select minter from source_mints)
    and current_bal is not null
    and usd_value_now is not null
    group by token_name
    order by usd_amount desc
    limit 20

    Run a query to Download Data