maybeyonassushi_lp_stake_hodl_daily
    Updated 2021-12-15
    with
    lp_add as (
    select
    date(block_timestamp) as date,
    count(distinct origin_address) as total_depositors,
    -- sum(amount) as token_amt,
    sum(amount_usd) as amount_usd,
    -- median(amount_usd) as median_amount,
    'provide liquidity' as event
    from ethereum.udm_events
    where
    to_label = 'sushiswap'
    and origin_function_name in (
    'ZapIn',
    'addLiquidity',
    'addLiquidityETH',
    'allocate'
    )
    and amount_usd < pow(10,8)
    and amount_usd > 0
    -- and date > '2021-01-01'
    group by 1
    ),
    lp_stake as (
    select
    date(block_timestamp) as date,
    count(distinct origin_address) as total_depositors,
    -- sum(amount) as token_amt,
    sum(amount_usd) as amount_usd,
    -- median(amount_usd) as median_amount,
    'stake lp' as event
    from ethereum.udm_events
    where
    to_label = 'sushiswap'
    and origin_function_name in (
    'deposit'
    Run a query to Download Data