marquAXL Launch - LP Token Holders
Updated 2022-12-06
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
pool_lpt as (
select
liquidity_provider_address,
action,
case
when action = 'lp_tokens_minted' then 'Deposit'
else 'Withdraw'
end as label_action,
case
when label_action = 'Deposit' then amount / pow(10,18)
else amount / pow(10,18) * (-1)
end as amount,
tx_id
from osmosis.core.fact_liquidity_provider_actions
where pool_id = 812
and action in ('lp_tokens_minted','lp_tokens_burned')
and block_timestamp >= '2022-09-27 16:31:00'
and tx_status = 'SUCCEEDED'
),
aggregated as (
select
liquidity_provider_address,
sum(amount) as lp_tokens,
rank() over (order by lp_tokens desc) as rank_lp
from pool_lpt
group by 1
)