SocioAnalyticalong/short
    Updated 2024-07-18

    select
    date_trunc('d', block_timestamp) as date,
    trade_type as type,
    sum(amount_usd) as volume,
    sum(volume) over (partition by type order by date) as cum_volume,
    count(DISTINCT tx_hash) as n_txns,
    sum(n_txns) over (partition by type order by date) as cum_txns,
    count(DISTINCT trader) as n_users
    from blast.blitz.ez_perp_trades
    where is_taker = 'TRUE'
    group by 1 , 2
    order by 1 desc




    QueryRunArchived: QueryRun has been archived