drone-mostafaUntitled Query
Updated 2022-07-11
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 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'
)
, 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'
)
,lst_top as (
select top 10
case
when f.name ||'_'|| t.name='OSMO_ATOM' then 'ATOM_OSMO'
when f.name ||'_'|| t.name='LUM_OSMO' then 'OSMO_LUM'
when f.name ||'_'|| t.name='DVPN_OSMO' then 'OSMO_DVPN'
else f.name ||'_'|| t.name
end contract
,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
order by tx_count DESC
)
select
block_timestamp::date as day
,case
Run a query to Download Data