sakineh5021-nIQRzBUntitled Query
    Updated 2022-04-11
    with token as (
    SELECT DISTINCT S.token0
    from ethereum.dex_liquidity_pools S
    where platform = 'sushiswap'
    ) ,
    launch as (
    SELECT T.token0 as token_address, min(creation_time::date) as launched_date_on_sushiswap
    from ethereum.dex_liquidity_pools S , token T
    where platform = 'sushiswap'
    and T.token0 = S.token0
    and creation_time is not NULL
    group by 1
    order by 2 desc
    )
    ,
    sel as (
    SELECT C.TOKEN_ADDRESS, sum(AMOUNT_USD) as swap, count(tx_id)
    from launch C , ethereum.dex_Swaps S
    where S.TOKEN_ADDRESS = C.token_address
    and platform = 'sushiswap'
    and block_timestamp::date >='2022-03-01'
    group by 1
    )
    SELECT S.TOKEN_ADDRESS , launched_date_on_sushiswap
    from sel S , launch L
    where S.TOKEN_ADDRESS =L.token_address
    and swap >0
    and S.TOKEN_ADDRESS is not NULL

    Run a query to Download Data