farid-c9j0VMnumber of poolysupporter nfts each wallet hold on average
    Updated 2022-06-22
    with all_tx_PoolyLawyer as (
    select date_trunc('day', block_timestamp::date) as dt,
    tx_hash, event_inputs:to::string as event_to,
    event_inputs:from::string as event_from, event_inputs:tokenId::string as token_id
    from ethereum_core.fact_event_logs
    where contract_address = lower('0x90b3832e2f2ade2fe382a911805b6933c056d6ed')
    and event_name = 'Transfer'
    and event_removed = 'false'
    ),

    transfers_PoolyLawyer as
    ((SELECT
    event_to as wallet, dt,
    'mint' as action,
    1 as value
    FROM all_tx_PoolyLawyer
    where event_from = '0x0000000000000000000000000000000000000000')
    union all
    (SELECT
    event_to as wallet,
    dt,
    'gain' as action,
    1 as value
    FROM all_tx_PoolyLawyer
    where event_from != '0x0000000000000000000000000000000000000000')
    union all
    (SELECT
    event_from as wallet,
    dt,
    'lose' as action,
    -1 as value
    FROM all_tx_PoolyLawyer
    Run a query to Download Data