Moeavax dau 5 s out
    Updated 2023-10-17
    WITH
    daus as (
    SELECT distinct
    PROPOSER as users,
    trunc(block_timestamp, 'week') as weeks,
    count(distinct trunc(block_timestamp, 'day')) as active_days
    from
    flow.core.fact_transactions
    group by
    1,
    2
    having
    active_days >= 4),
    pc as (
    select
    TIMESTAMP::date as days ,
    SYMBOL ,
    TOKEN_CONTRACT ,
    avg(PRICE_USD) as price
    from
    flow.price.fact_prices
    where
    SOURCE = 'coinmarketcap'
    group by 1,2,3
    )


    select
    case
    when trader in (select users from daus) then 'DAU'
    else 'other'
    end as type,
    SYMBOL,
    count(distinct TX_ID) as swaps,
    Run a query to Download Data