davidwallUntitled Query
    Updated 2023-01-18
    --credit : https://app.flipsidecrypto.com/velocity/queries/ab69667c-4df3-4ddf-92d3-cb89b40b855f
    with osmopricet as (
    select recorded_hour as date1,
    price as OSMO_Price
    from osmosis.core.ez_prices
    where symbol = 'OSMO'
    and recorded_hour >= '2022-12-01' )

    select date_trunc(hour,mindate) as date,
    case when mindate::date = '2022-12-10' then 'December 10'
    when mindate::date < '2022-12-10' then 'Previous Days'
    when mindate::date > '2022-12-10' then 'Next Days'
    end as timespan,
    count (distinct tx_from) as New_Users
    from (
    select tx_from,
    min (block_timestamp) as mindate
    from osmosis.core.fact_transactions
    group by 1) t1 join osmopricet t2 on date_trunc(hour,t1.mindate) = t2.date1
    where mindate::Date >= '2022-12-03' and mindate::date < '2022-12-18'
    group by 1,2
    order by 1
    Run a query to Download Data