SocioAnalyticaprotocol fees
    Updated 2024-07-18
    with data as (
    select
    'perp' as type,
    *
    from blast.blitz.ez_perp_trades
    -- union all
    -- select
    -- 'spot' as type,
    -- *
    -- from

    )

    select
    date_trunc('d', block_timestamp) as date,
    sum(fee_amount) as fee,
    sum(fee) over (order by date) as cum_fee
    from data
    where is_taker = 'TRUE'
    group by 1
    order by 1 desc







    QueryRunArchived: QueryRun has been archived