Moejan9th14
    Updated 2023-01-17


    select
    -- 'Bridge out' as type ,
    date_trunc('day', BLOCK_TIMESTAMP)::date AS day,
    -- monthname(BLOCK_TIMESTAMP) AS Month,
    LABEL,
    sum(from_AMOUNT/pow(10,6)) AS Volume,
    row_number()over(partition by day order by volume desc) as rank
    from terra.core.ez_swaps s , terra.core.dim_address_labels p
    where FROM_CURRENCY ilike '%luna%'
    and TO_CURRENCY= ADDRESS
    and LABEL <> 'luna'
    and BLOCK_TIMESTAMP between '2023-01-01' and CURRENT_DATE - 5
    group by 1,2
    qualify rank <= 5



    Run a query to Download Data