damidezTrend
    Updated 2024-10-09
    select
    date_trunc('month', block_timestamp) as date,
    count(distinct tx_id) as transaction,
    sum(transaction) over (order by date) as cum_transaction,
    count(DISTINCT from_address) as users,
    sum(coalesce(from_amount_usd, to_amount_usd)) as volume_usd,
    sum(volume_usd) over (order by date) as cum_volume_usd,
    avg(from_amount_usd) as avg_volume
    from thorchain.defi.fact_swaps
    where affiliate_address = 'rg'
    group by date
    order by date desc

    QueryRunArchived: QueryRun has been archived