cyphersteth/eth pool inflows and outflows
    Updated 2022-06-13
    with steth_transactions as (select *
    -- block_timestamp,
    -- tx_hash,
    -- ((event_inputs:tokens_sold + event_inputs:tokens_bought)/2)/1e18 as eth_amount
    from ethereum.core.fact_event_logs
    where block_timestamp >= current_date() - 90
    and contract_address = '0xdc24316b9ae028f1497c275eb9192a3ea0f67022'
    and event_name = 'TokenExchange')

    select * from steth_transactions
    limit 100



    -- total_balance as (
    -- select
    -- date,
    -- symbol,
    -- adj_balance,
    -- adj_amount_usd,
    -- sum(adj_balance) over (partition by date) as total_balance,
    -- sum(adj_amount_usd) over (partition by date) as total_balance_usd,
    -- (adj_balance/total_balance)*100 as balance_percentage,
    -- (adj_amount_usd/total_balance_usd)*100 as balance_usd_percentage
    -- from data
    -- ),

    -- steth_price as (select
    -- date_trunc('day', hour) as date,
    -- avg(price) as steth_price
    -- from ethereum.core.fact_hourly_token_prices
    -- where hour >= current_date() - 90
    -- and token_address = lower('0xae7ab96520de3a18e5e111b5eaab095312d7fe84')
    -- group by date),

    Run a query to Download Data