headitmanagerOutflow (Count and Amount)
    Updated 2022-06-27
    with inflow as (
    select count(*), sum(event_inputs:value/1e18) as inam,monthname(block_timestamp::date) as date from ethereum.core.fact_event_logs where
    event_inputs:to in(lower('0xe94b5eec1fa96ceecbd33ef5baa8d00e4493f4f3'),
    lower('0x19b3eb3af5d93b77a5619b047de0eed7115a19e7')
    ,lower('0x7b18913D945242A9c313573E6c99064cd940c6aF'))
    and event_name='Transfer' and block_timestamp::date >= current_date - interval '12 month'
    group by monthname(block_timestamp::date)
    )
    ,outflow as (
    select count(*),sum(event_inputs:value/1e18) as outam,monthname(block_timestamp::date) as date from ethereum.core.fact_event_logs where
    event_inputs:from in (lower('0xe94b5eec1fa96ceecbd33ef5baa8d00e4493f4f3'),
    lower('0x19b3eb3af5d93b77a5619b047de0eed7115a19e7')
    ,lower('0x7b18913D945242A9c313573E6c99064cd940c6aF'))
    and event_name='Transfer' and block_timestamp::date >= current_date - interval '12 month'
    group by monthname(block_timestamp::date)
    )
    , net as (select inam-outam , inflow.date from inflow inner join outflow
    on inflow.date=outflow.date)

    select * from outflow
    Run a query to Download Data