Eman-RazNumber of BLACKDRAGON Swappers Over Time
    Updated 2024-11-21
    with table1 as (with tab1 as (select block_timestamp::date as "Date", count(distinct trader) as "Seller Count"
    from near.defi.ez_dex_swaps
    where symbol_in='BLACKDRAGON'
    group by 1),

    tab2 as (select block_timestamp::date as "Date", count(distinct trader) as "Buyer Count"
    from near.defi.ez_dex_swaps
    where symbol_out='BLACKDRAGON'
    group by 1)

    select tab1."Date" as "Date", "Seller Count", "Buyer Count"
    from tab1 left join tab2 on tab1."Date"=tab2."Date"
    order by 1),

    table2 as (select block_timestamp::date as "Date", count(distinct trader) as "Swapper Count"
    from near.defi.ez_dex_swaps
    where symbol_in='BLACKDRAGON' or symbol_out='BLACKDRAGON'
    group by 1)

    select table1."Date" as "Date", -"Seller Count" AS "Seller Count", "Buyer Count", "Swapper Count"
    from table1 left join table2 on table1."Date"=table2."Date"
    order by 1
    Auto-refreshes every 3 hours
    QueryRunArchived: QueryRun has been archived