0xaimanAnchoring LUNA
    Updated 2021-12-24


    with liq as (
    select date_trunc('day',block_timestamp) as date ,count(borrower) as n_liquidated_user
    from anchor.liquidations


    group by 1 order by 1
    ),

    luna as (select date_trunc('day',block_timestamp) as date1, avg(price_usd) as avg_luna_price
    from terra.oracle_prices
    where symbol='LUNA'

    group by 1 order by 1)

    select date1, avg_luna_price, n_liquidated_user
    from liq
    inner join luna on liq.date=luna.date1

    Run a query to Download Data