mmdrezausers staked
Updated 2022-06-23
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
›
⌄
with total_users as (select count(distinct origin_from_address) as users
from ethereum.core.ez_dex_swaps
where origin_to_address = lower('0x881D40237659C251811CEC9c364ef91dC08D300C')
and EVENT_NAME = 'Swap'),
total_staked_users as (select count(distinct origin_from_address) as staked_users
from ethereum.core.fact_event_logs
where origin_from_address in (select distinct origin_from_address
from ethereum.core.ez_dex_swaps
where origin_to_address = lower('0x881D40237659C251811CEC9c364ef91dC08D300C')
and EVENT_NAME = 'Swap') and EVENT_NAME LIKE 'Stak%'
OR EVENT_NAME LIKE '%Staked')
select (staked_users * 100) / (select users from total_users) as percent_staked
from total_staked_users
Run a query to Download Data