vahid-2jsEENSolana Data
    Updated 2022-07-18
    with datas as
    (
    select
    count(distinct txn_hash) as tc,
    count(case when tx:receipt[0]:outcome:status like '%Success%' then 1 else null end) as sc,
    count(case when tx:receipt[0]:outcome:status like '%Fail%' then 1 else null end) as fc,
    block_timestamp::date as td,
    'Near Data' as cl
    FROM mdao_near.transactions
    WHERE block_timestamp::date >= current_date - interval '3 month' and block_timestamp::date != current_date
    group by td
    UNION
    select
    count(distinct tx_id) as tc,
    count(case when SUCCEEDED like '%TRUE%' then 1 else null end) as sc,
    count(case when SUCCEEDED like '%FALSE%' then 1 else null end) as fc,
    block_timestamp::date as td,
    'Solana Data' as cl
    FROM solana.core.fact_transactions
    WHERE block_timestamp::date >= current_date - interval '2 month' and block_timestamp::date != current_date
    group by td
    UNION
    select
    count(distinct tx_hash) as tc,
    count(case when STATUS like '%SUCCESS%' then 1 else null end) as sc,
    count(case when STATUS like '%FAIL%' then 1 else null end) as fc,
    block_timestamp::date as td,
    'Ethereum Data' as cl
    FROM ethereum.core.fact_transactions
    WHERE block_timestamp::date >= current_date - interval '3 month' and block_timestamp::date != current_date
    group by td
    Run a query to Download Data