marquTerra Population - transactions and users bar
    Updated 2023-07-13
    with

    txs_classic as (

    select

    date_trunc('{{date_trunc}}',block_timestamp) as date,
    'Terra Classic' as label,

    count(distinct tx_id) as transactions,
    count(distinct tx_from) as users,

    row_number() over (order by date) as date_count

    from terra.classic.fact_transactions
    where tx_status = 'SUCCEEDED'
    and block_timestamp > date('2022-05-12') - interval '90 days'
    and block_id <= 7603700
    group by 1,2
    ),

    txs_2 as (

    select

    date_trunc('{{date_trunc}}',block_timestamp) as date,
    'Terra 2.0' as label,

    count(distinct tx_id) as transactions,
    count(distinct tx_sender) as users,

    row_number() over (order by date) as date_count

    from terra.core.fact_transactions
    where tx_succeeded
    and block_timestamp > current_date() - interval '90 days'
    Run a query to Download Data