SalehUser Activity-DAILY VAULT
    Updated 2022-06-14
    with tx_hash as (
    select distinct TX_HASH as txs
    from ethereum.core.fact_event_logs
    where
    block_timestamp::date>=CURRENT_DATE-60
    and event_name in('Transfer')
    and ORIGIN_TO_ADDRESS = lower('0x0fc584529a2aefa997697fafacba5831fac0c22d')
    and event_inputs:tokenId is not null
    )

    select
    block_timestamp::date as day
    ,count(distinct event_inputs:vaultId) as Vaults_Count
    from ethereum.core.fact_event_logs
    join tx_hash h on h.txs=fact_event_logs.TX_HASH
    where event_name = 'FeesReceived'
    group by 1
    order by 1

    Run a query to Download Data