binhachonAverage Age of Synth Holders
Updated 2022-04-09
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 minting_transaction as (
select
date_part(epoch_second, block_timestamp) as epoch_time,
native_to_address,
to_asset,
to_amount
from thorchain.swaps
where to_asset like '%/%'
),
burning_transaction as (
select
date_part(epoch_second, block_timestamp) as epoch_time,
from_address,
from_asset,
from_amount
from thorchain.swaps
where from_asset like '%/%'
),
average_mint_time as (
select
native_to_address,
to_asset,
sum(to_amount) as mint_amount,
sum(epoch_time * to_amount) / sum(to_amount) as average_mint_epoch_time
from minting_transaction
group by 1, 2
),
average_burn_time as (
select
from_address,
from_asset,
sum(from_amount) as burn_amount,
sum(epoch_time * from_amount) / sum(from_amount) as average_burn_epoch_time
from burning_transaction
group by 1, 2
),
Run a query to Download Data