boomer77Claimers address - swap
Updated 2021-12-01
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
›
⌄
with claim as (select event_inputs:to::string as claimer, sum(event_inputs:value/1e18) as THOR_claimed
from ethereum.events_emitted
where event_inputs:from::string = '0x8526cec1d97a68c0e69420488d04dec5f101b46e' and tx_succeeded = 'TRUE'
group by 1),
lp as (select asset_address, from_address, sum(asset_amount) as THOR_LP, sum(rune_amount) as RUNE_LP
from thorchain.liquidity_actions
where pool_name = 'ETH.THOR-0XA5F2211B9B8170F694421F2046281775E8468044'
and lp_action = 'add_liquidity'
and asset_amount is not null
and asset_address in (select claimer from claim)
group by 1,2),
buy_more as (select from_address, sum(to_amount) as amount_buy_thor
from thorchain.swaps
where from_address in (select from_address from lp) and to_asset = 'ETH.THOR-0XA5F2211B9B8170F694421F2046281775E8468044'
group by 1),
sold_thor as (select from_address, sum(from_amount) as amount_sold_thor
from thorchain.swaps
where from_address in (select from_address from lp) and from_asset = 'ETH.THOR-0XA5F2211B9B8170F694421F2046281775E8468044'
group by 1),
final as (select a.claimer, a.thor_claimed, b.from_address, b.thor_lp, b.rune_lp
from claim a
left outer join lp b on a.claimer = b.asset_address)
select a.claimer, a.from_address, a.thor_claimed, b.amount_buy_thor, c.amount_sold_thor
from final a
left outer join buy_more b on a.from_address = b.from_address
left outer join sold_thor c on a.from_address = c.from_address
Run a query to Download Data