MLDZMNPrice and volume
    Updated 2022-05-24
    with tb1 as (
    select
    date(BLOCK_HOUR) as day,
    avg(PRICE_USD) as price

    from flipside_prod_db.algorand.prices_swap
    where ASSET_ID='226701642'
    and day>='2022-01-01'
    and day< '2022-05-22'
    and MIN_PRICE_USD_HOUR is not null
    and MAX_PRICE_USD_HOUR is not null
    group by DAY
    order by day
    ),
    tb2 as (select
    BLOCK_TIMESTAMP::date as day,
    sum(SWAP_FROM_AMOUNT) as volume,
    count(distinct SWAPPER) as swappers
    from flipside_prod_db.algorand.swaps
    where SWAP_FROM_ASSET_ID='226701642'
    and BLOCK_TIMESTAMP>='2022-01-01'
    group by 1
    )

    select
    tb1.day as day,
    price as "Yieldly price",
    volume
    from tb1 join tb2 on tb1.day=tb2.day
    Run a query to Download Data