StangFAST01 - growth transactions count
Updated 2024-05-07Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
-- 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