Eman-RazNumber of Sender & Receiver Addresses Over Time
    Updated 2024-10-31
    WITH table1 AS (select date_trunc('{{Time_Frame}}',block_timestamp) as "Date", count(distinct source_address) as "Total Senders",
    -count(distinct destination_address) as "Total Receivers"
    from near.defi.ez_bridge_activity
    where block_timestamp::date>='{{Start_Date}}' and block_timestamp::date<='{{End_Date}}' and platform='rainbow'
    GROUP BY 1),

    table2 AS (
    with tab1 as (select source_address, min(block_timestamp::date) as first_bridge_date
    from near.defi.ez_bridge_activity
    where platform='rainbow'
    group by 1)

    select date_trunc('{{Time_Frame}}',first_bridge_date) as "Date", count(distinct source_address) as "New Senders"
    from tab1
    where first_bridge_date::date>='{{Start_Date}}' and first_bridge_date::date<='{{End_Date}}'
    group by 1
    order by 1)

    select table1."Date" as "Date", "Total Senders", "Total Receivers", "New Senders"
    from table1 left join table2 on table1."Date"=table2."Date"
    order by 1
    Auto-refreshes every 24 hours
    QueryRunArchived: QueryRun has been archived