0xHaM-dUntitled Query
Updated 2022-12-14
999
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 redelegateTb as (
select
tx_id,
split(ATTRIBUTE_VALUE,'uatom')[0]::numeric/1e6 as amount_redelegated
from cosmos.core.fact_msg_attributes
where msg_type = 'redelegate'
and attribute_key = 'amount'
and ATTRIBUTE_VALUE ilike '%uatom%'
and tx_succeeded = 'TRUE'
),
spenderTb as (
select
block_timestamp,
tx_id,
attribute_value as redelegater_wallet
from cosmos.core.fact_msg_attributes
where msg_type = 'coin_spent'
and attribute_index = '0'
and attribute_key = 'spender'
and msg_index = '0'
and tx_id in (select tx_id from redelegateTb)
and tx_succeeded = 'TRUE'
),
receiverTb as (
select
block_timestamp,
tx_id,
attribute_value as receiver
from cosmos.core.fact_msg_attributes
where msg_type = 'coin_received'
and attribute_key = 'receiver'
and tx_id in (select tx_id from redelegateTb)
and tx_succeeded = 'TRUE'
),
sourceTB as (
select
Run a query to Download Data