davidwallUntitled Query
    Updated 2023-01-16
    --credit : https://app.flipsidecrypto.com/velocity/queries/b5acf04c-7ad0-4fb2-9d69-74381a541651
    with table1 as (
    select block_timestamp::date as date,
    sender,
    count (distinct tx_id) as tx_count,
    sum (amount/pow(10,decimal)) as Volume
    from osmosis.core.fact_transfers
    where tx_succeeded = 'TRUE'
    and block_timestamp::date >= '2022-12-03' and block_timestamp::date < '2022-12-18'
    and currency = 'uosmo'
    and receiver in ('osmo129uhlqcsvmehxgzcsdxksnsyz94dvea907e575','osmo1krmqr8zhvteevq4hnl7q0pxtff6xpnqz4ckxcu')
    and sender not in ('osmo129uhlqcsvmehxgzcsdxksnsyz94dvea907e575','osmo1krmqr8zhvteevq4hnl7q0pxtff6xpnqz4ckxcu')
    group by 1,2),

    maintable as (
    select *,
    row_number() over (partition by date order by Volume desc) as RN
    from table1)

    select * from maintable
    where RN <= 5
    order by date
    Run a query to Download Data