sarathNear_city1
    Updated 2022-11-06
    with transaction_count as
    (
    select 'Near' as "Chain"
    , count(*) as count_trx
    from near.core.fact_transactions
    where block_timestamp::date > current_date -90
    and tx_status = 'Success'
    union all
    select 'Flow' as "Chain"
    , count(*) as count_trx
    from flow.core.fact_transactions
    where block_timestamp::date > current_date - 90
    and tx_succeeded = TRUE
    union all
    select 'Avalanche' as "Chain"
    , count(*) as count_trx
    from avalanche.core.fact_transactions
    where block_timestamp::date > current_date - 90
    and status = 'SUCCESS'
    union all
    select 'Osmosis' as "Chain"
    , count(*) as count_trx
    from osmosis.core.fact_transactions
    where block_timestamp::date > current_date -90
    )
    select *
    from transaction_count
    order by 2 desc

    Run a query to Download Data