banterlyticsbaby-kongz-tree
    Updated 2 hours ago
    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-04-05'
    and contract_address = lower('0x57a204aa1042f6e66dd7730813f4024114d74f37')
    and event_name = 'Transfer'
    and decoded_log:tokenId::string > 1001
    ),
    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')
    union all
    (SELECT
    event_from as wallet,
    dt,
    Last run: about 2 hours agoAuto-refreshes every 24 hours
    NUM_HOLDER_DIST
    DISTRIBUTION
    DIST_ORDER
    1
    15121 NFT1
    2
    1842 NFT2
    3
    753 NFT3
    4
    414 NFT4
    5
    335 NFT5
    6
    466-10 NFT6
    7
    43>10 NFT7
    7
    128B
    30s