superflyUntitled Query
    Updated 2022-08-25
    with minor as (SELECT * from ethereum.core.dim_dex_liquidity_pools ---i is in tabrl for data
    where PLATFORM='sushiswap'),
    kiu as (SELECT
    count(distinct ORIGIN_FROM_ADDRESS) as total_LP_providers
    from ethereum.core.ez_token_transfers
    where TO_ADDRESS in (select POOL_ADDRESS from minor)
    and ORIGIN_TO_ADDRESS='0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f'
    and origin_function_signature in ('0xe8e33700', '0xded9382a', '0xf305d719'))
    select BLOCK_TIMESTAMP::date as day,
    count(distinct ORIGIN_FROM_ADDRESS) as LP1,lag(LP1) ignore nulls over(ORDER BY day ASC) as lag_LP,
    LP1-lag_LP as LP_change,(LP1-lag_LP)/LP1*100 as LP_change_percentage
    from ethereum.core.ez_token_transfers ---i us general tabel
    where ORIGIN_TO_ADDRESS='0xef0881ec094552b2e128cf945ef17a6752b4ec5d' and ORIGIN_FUNCTION_SIGNATURE='0x8dbdbe6d'---address contract
    and BLOCK_TIMESTAMP>=CURRENT_DATE-365 group by 1
    Run a query to Download Data