drone-mostafaUntitled Query
Updated 2022-07-11Copy 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
›
⌄
with lst_from as (
select
TX_ID
,PROJECT_NAME name
from osmosis.core.fact_swaps f
join osmosis.core.dim_labels d on d.ADDRESS = f.FROM_CURRENCY
where block_timestamp::date>='2022-05-01'
and TX_STATUS='SUCCEEDED'
)
, lst_to as (
select
TX_ID
,PROJECT_NAME name
from osmosis.core.fact_swaps f
join osmosis.core.dim_labels d on d.ADDRESS = f.TO_CURRENCY
where block_timestamp::date>='2022-05-01'
and TX_STATUS='SUCCEEDED'
)
select top 10
f.name
,count( s.TX_ID) as tx_count
from osmosis.core.fact_swaps s
join lst_from f on f.TX_ID = s.tx_id
join lst_to t on t.TX_ID = s.tx_id
where block_timestamp::date>='2022-05-01'
and TX_STATUS='SUCCEEDED'
group by 1
having f.name!='OSMO_OSMO'
order by tx_count DESC
Run a query to Download Data