MLDZMNhot2
Updated 2022-07-12Copy 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
›
⌄
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
having f1!=f2),
swap_pp as (select
swap_pairs,
tx_id
from tb3
)
select
swap_pairs,
count(distinct tx_id) as usage_swap_pair
Run a query to Download Data