StangFAST01 - growth transactions count
    Updated 2024-05-07
    -- forked from 01 - transactions count over time @ https://flipsidecrypto.xyz/edit/queries/18494a2e-c8e6-429d-a916-ba5d88c0003a

    -- forked from 01 - active users over time @ https://flipsidecrypto.xyz/edit/queries/134ce04c-532d-4ada-b86c-eb55e464109e

    with

    conclu AS
    (
    SELECT
    date_trunc( 'month' , a.block_timestamp ) AS date
    , count( DISTINCT a.tx_id ) AS transactions
    , CASE
    when date BETWEEN '2022-01-01' AND '2022-03-31' then 'Q1 2022'
    when date BETWEEN '2022-04-01' AND '2022-06-30' then 'Q2 2022'
    when date BETWEEN '2022-07-01' AND '2022-09-30' then 'Q3 2022'
    when date BETWEEN '2022-10-01' AND '2022-12-31' then 'Q4 2022'
    when date BETWEEN '2023-01-01' AND '2023-03-31' then 'Q1 2023'
    END
    AS Q

    , sum( transactions ) over ( ORDER BY date ASC ) AS " Total users over time "

    , sum( transactions ) over ( partition BY Q ) AS " Total users per quarter "

    FROM
    osmosis.core.fact_transactions a

    WHERE
    a.block_timestamp::date >= '2022-01-01'
    AND a.block_timestamp::date < '2023-03-31'

    GROUP BY
    1

    ORDER BY
    QueryRunArchived: QueryRun has been archived