Pmisha-bmlMdxil.1
Updated 2023-03-27
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
›
⌄
with t1 as (select
date_trunc('day',block_timestamp) as dt1,
count(distinct from_address) as total_user
from thorchain.liquidity_actions
where LP_ACTION='remove_liquidity'
and block_timestamp>='2022-01-01'
group by 1),
t2 as(select
date_trunc('day',block_timestamp) as dt2,
count(distinct from_address) as user_withinsurance
from thorchain.liquidity_actions
where LP_ACTION='remove_liquidity'
and il_protection>0
and block_timestamp>='2022-01-01'
group by 1)
select
t1.dt1 as dt,
total_user,
user_withinsurance,
user_withinsurance/total_user*100 as percent_with_insurance
from t1
inner join t2 on t1.dt1=t2.dt2
Run a query to Download Data