boomer77top 3 flow contract daily
    Updated 2022-05-30
    with raw as (select date_trunc('day', block_timestamp) as dt, event_contract, count(distinct tx_id) as tx_count, ROW_NUMBER() OVER(PARTITION BY dt ORDER BY tx_count desc) as rank
    from flow.core.fact_events
    where date(block_timestamp) >= '2022-05-08' and event_contract is not null
    group by 1,2),

    labels as (select *
    from flow.core.dim_contract_labels)

    select *
    from raw a
    left join labels b on a.event_contract = b.event_contract
    where a.event_contract is not null and rank < 4
    Run a query to Download Data