banterlyticsgen-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 contract_address = lower('0x57a204aa1042f6e66dd7730813f4024114d74f37')
    and event_name = 'Transfer'
    and block_timestamp > '2021-01-05'
    and decoded_log:tokenId::string < 1000
    ),
    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
    3341 NFT1
    2
    872 NFT2
    3
    303 NFT3
    4
    94 NFT4
    5
    65 NFT5
    6
    186-10 NFT6
    7
    11>10 NFT7
    7
    124B
    35s