boomer77Average synths
    Updated 2022-04-13

    select dd as days_holding_synths , count(from_address) as holder_count
    from (with
    mint as (select date_trunc('day',block_timestamp) as d1, from_address, to_asset, sum(to_amount) as m1
    from thorchain.swaps

    where --tx_id='E6BC8A8A76A34846BF06F54F30E3AE319C11BCD9C1ABA4A03CF91799BCC4F71E' and
    native_to_address like 'thor%' and to_asset!='THOR.RUNE'
    group by 1,2,3

    ),

    redeem as (select date_trunc('day',block_timestamp) as d2, from_address, from_asset, sum(from_amount) as b1
    from thorchain.swaps

    where --tx_id='E6BC8A8A76A34846BF06F54F30E3AE319C11BCD9C1ABA4A03CF91799BCC4F71E' and
    from_address like 'thor%'
    group by 1,2,3)

    select d1, d2, mint.from_address, m1, b1, datediff(day, d2,d1) as dd
    from MInt inner join redeem on mint.from_address=redeem.from_address and mint.to_asset=redeem.from_asset

    order by 6 desc)
    where dd>0

    group by 1
    Run a query to Download Data