adambalaTrend Analysis
    Updated 2022-04-11
    with a as (
    select ORIGIN_ADDRESS ,tx_id,
    min(block_timestamp) as min_date
    from ethereum.udm_events
    where (TO_label ilike'%uniswap%' or from_label ilike'%uniswap%')
    group by 1,2 having min_date >'2021-12-01'
    ),

    b as (
    select
    count(distinct ORIGIN_ADDRESS) as user,
    date(min_date) as date_block
    from a
    group by 2)

    select
    user,
    date_block,
    sum(b.user) OVER( partition BY NULL ORDER BY b.date_block ASC rows UNBOUNDED PRECEDING ) "Cumulative user"
    from b
    group by 1,2