Sbhn_NPtotal depositors mars
Updated 2023-02-13Copy 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
›
⌄
with base as (select distinct tx_id
from osmosis.core.fact_msg_attributes
where attribute_value = 'osmo1c3ljch9dfw5kf52nfwpxd2zmj2ese7agnx0p9tenkrryasrle5sqf3ftpg'
and tx_succeeded = 'TRUE'
),
borrow as (
select distinct tx_id as tx_id from osmosis.core.fact_msg_attributes
where tx_id in (select * from base)
and attribute_key = 'action'
and attribute_value = 'borrow'
),
deposit as (
select distinct tx_id as tx_id from osmosis.core.fact_msg_attributes
where tx_id in (select * from base)
and attribute_key = 'action'
and attribute_value = 'deposit'
)
select count(distinct attribute_value) as depositors
from osmosis.core.fact_msg_attributes
where tx_id in (select * from deposit)
and msg_type = 'message'
and attribute_key = 'sender'
Run a query to Download Data