boomer77tx count
    Updated 2021-08-23
    with KRT as (select date_trunc('day', block_timestamp) as days,
    count(DISTINCT tx_id) as tx_KRT
    from terra.transfers
    where event_from in (select address
    from terra.daily_balances
    where currency = 'KRT' and date = CURRENT_DATE and balance > 11750)
    and tx_status = 'SUCCEEDED' and event_currency = 'KRT'
    group by 1),

    UST as (select date_trunc('day', block_timestamp) as days,
    count(DISTINCT tx_id) as tx_UST
    from terra.transfers
    where event_from in (select address
    from terra.daily_balances
    where currency = 'UST' and date = CURRENT_DATE and balance > 10)
    and tx_status = 'SUCCEEDED' and event_currency = 'UST'
    group by 1),

    krt1 as (select date_trunc('month', days) as months, avg(tx_KRT) as avg_tx_KRT
    from KRT
    group by 1),

    ust1 as (select date_trunc('month', days) as months, avg(tx_UST) as avg_tx_UST
    from UST
    group by 1)

    select A.months, A.avg_tx_KRT, B.avg_tx_UST
    from krt1 A
    join ust1 B on A.months = B.months
    Run a query to Download Data