MLDZMNhot1
Updated 2022-07-12
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
›
⌄
with tb1 as (select
BLOCK_TIMESTAMP,
TX_ID,
PROJECT_NAME f1 ,
TO_CURRENCY
from osmosis.core.fact_swaps x left outer join osmosis.core.dim_labels y
on x.FROM_CURRENCY = y.address
),
tb2 as (select
BLOCK_TIMESTAMP,
TX_ID,
f1,
PROJECT_NAME f2
from tb1 left outer join osmosis.core.dim_labels z on tb1.TO_CURRENCY = z.address ),
tb3 as (select
BLOCK_TIMESTAMP,
TX_ID,
f1,
f2,
CONCAT(f1, ' _ ', f2) as swap_pairs
from tb2),
swap_pp as (select
swap_pairs,
min(BLOCK_TIMESTAMP) as release_date
from tb3
group by 1
)
select
release_date::date as day,
count(distinct swap_pairs) as new_contracts,
Run a query to Download Data