freemartianTop 10 Transferred Assets - Inside Osmosis
    Updated 2022-11-16
    with source as (
    select
    block_timestamp::date as day,
    sender,
    receiver,
    currency,
    project_name,
    transfer_type,
    amount/pow(10,decimal) as transferred_amount,
    amount/pow(10,decimal) * usd_price as transferred_amount_usd
    from osmosis.core.fact_transfers ft
    left join osmosis.core.dim_labels l on ft.currency = l.address
    left join (select symbol, recorded_at::date as TIME, avg(price) as usd_price
    from osmosis.core.dim_prices group by 1, 2) p on lower(l.project_name) = lower(p.symbol)
    and p.TIME = ft.block_timestamp::date
    where block_timestamp::date > CURRENT_DATE - 60)
    -- group by 1, 2, 3, 4, 5, 6
    select
    project_name,
    transfer_type,
    sum(transferred_amount_usd) as total_usd_transferred
    from source
    where transferred_amount_usd is not null
    and project_name not in ('INJ', 'PSTAKE')
    and transfer_type = 'OSMOSIS'
    group by 1, 2
    Run a query to Download Data