yasmin-n-d-r-hfirst action osmo
Updated 2023-01-02Copy Reference Fork
999
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
›
⌄
with creation as (
SELECT
min(BLOCK_TIMESTAMP) as first_tx,
TX_FROM
from
osmosis.core.fact_transactions
GROUP by
2
),
full_data as (
SELECT
t.TX_FROM,
first_tx,
count(DISTINCT tx_id) as tx_counts,
count(DISTINCT BLOCK_TIMESTAMP :: date) as days_active,
count(
DISTINCT date_trunc('week', BLOCK_TIMESTAMP)
) as weeks_active
from
osmosis.core.fact_transactions t
JOIN creation c on c.TX_FROM = t.TX_FROM
GROUP by
1,
2
),
---------------------------------------------------------------------------------------------------------------
f_data as (
SELECT
TX_FROM,
YEAR(BLOCK_TIMESTAMP) as year,
week(BLOCK_TIMESTAMP) as week,
COUNT(
DISTINCT DAYOFWEEK (BLOCK_TIMESTAMP)
) as day_Active_in_week
from
osmosis.core.fact_transactions
Run a query to Download Data