saber-jlsources of transfer to Osmo tx
Updated 2022-10-19Copy 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 A as(
select
count(distinct trunc(block_timestamp, 'day')) as date_count,
tx_from as user,
case
when date_count >= 200 then 'Active'
when date_count < 200 then 'normal'
end as type
from osmosis.core.fact_transactions
where block_timestamp > '2022-01-01'
and TX_STATUS = 'SUCCEEDED'
group by 2
order by 1 desc),
B as (select user, date_count
from A
where type = 'Active')
select
count(distinct tx_id) as tx,
CASE
when sender Ilike '%terra%' then 'terra' WHEN sender Ilike '%umee%' THEN 'umee'
WHEN sender Ilike '%cosmos%' then 'cosmos' WHEN sender Ilike '%juno%' then 'juno'
WHEN sender Ilike '%secret%' then 'secret' WHEN sender Ilike '%bostrom%' then 'bostrom'
WHEN sender Ilike '%stars%' then 'stargaze' WHEN sender Ilike '%akash%' then 'akash'
WHEN sender Ilike '%cro%' then 'crypto.org' WHEN sender Ilike '%ixo%' then 'ixo'
WHEN sender Ilike '%star%' then 'starname' WHEN sender Ilike '%axelar%' then 'axelar'
end as source
FROM osmosis.core.fact_transfers
WHERE TRANSFER_TYPE = 'IBC_TRANSFER_IN'
AND TX_STATUS = 'SUCCEEDED'
AND block_timestamp > '2022-01-01'
group by 2
order by 1 desc
Run a query to Download Data