sarathpooledvalidator1
Updated 2022-09-21Copy Reference Fork
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 whitelist_bond_actions as (
SELECT
block_timestamp,
SUBSTRING(MEMO, 5+1 , 43) AS node_id,
SUBSTRING(MEMO, 50, 43) AS bond_provider_id,
Memo,
tx_id
FROM flipside_prod_db.thorchain.bond_events
WHERE BOND_TYPE = 'bond_paid'
and regexp_count(MEMO,':') >= 2
-- ORDER BY rune_amount desc
-- limit 50
) , bond_actions as (
SELECT
block_timestamp
, asset_e8/1e8 as rune_amount
, SUBSTRING(MEMO, 5+1 , 43) AS node_id
, from_address
, tx_id
FROM flipside_prod_db.thorchain.bond_events
WHERE
BOND_TYPE = 'bond_paid'
and regexp_count(MEMO,':') = 1
and from_address in (select bond_provider_id from whitelist_bond_actions)
-- order by block_timestamp desc
-- limit 10
) , wl_bond_actions as (
SELECT
wba.block_timestamp as white_list_ts
, ba.block_timestamp as bond_ts
, rune_amount
, ba.node_id
, bond_provider_id
Run a query to Download Data