mz0111user 4
Updated 2023-01-03
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
›
⌄
with tab1 as (
SELECT
tx_from,
min(BLOCK_TIMESTAMP) as min_time
FROM osmosis.core.fact_transactions
GROUP by 1
)
SELECT
date_trunc('week', min_time) as week,
PROJECT_NAME,
count(*) as Cnt,
sum(cnt) over (partition by PROJECT_NAME order by week )
FROM osmosis.core.fact_swaps
LEFT OUTER JOIN tab1
ON trader = tx_from
AND min_time = BLOCK_TIMESTAMP
LEFT outer JOIN osmosis.core.dim_tokens
ON to_currency = address
WHERE NOT tx_from is NULL
GROUP BY 1,2
Run a query to Download Data