banterlyticsVX kong holders
    Updated 2023-08-03
    with all_tx as (
    select date_trunc('day', block_timestamp::date) as dt,
    tx_hash, decoded_log:to::string as event_to,
    decoded_log:from::string as event_from, decoded_log:tokenId::string as token_id
    from ethereum.core.fact_decoded_event_logs
    where block_timestamp > '2021-08-05'
    and contract_address = lower('0x7EA3Cca10668B8346aeC0bf1844A49e995527c8B')
    and event_name = 'Transfer'
    union all
    select date_trunc('day', block_timestamp::date) as dt,
    tx_hash, decoded_log:to::string as event_to,
    decoded_log:from::string as event_from, decoded_log:tokenId::string as token_id
    from polygon.core.fact_decoded_event_logs
    where block_timestamp > '2022-01-05'
    and contract_address = lower('0x05df72d911e52AB122f7d9955728BC96A718782C')
    and event_name = 'Transfer'),
    transfers as
    ((SELECT
    event_to as wallet,
    dt,
    'mint' as action,
    1 as value
    FROM all_tx
    where event_from = '0x0000000000000000000000000000000000000000')
    union all
    (SELECT
    event_to as wallet,
    dt,
    'gain' as action,
    1 as value
    FROM all_tx
    where event_from != '0x0000000000000000000000000000000000000000')
    Run a query to Download Data