mlhcomparing success rate of transactions in each chain
    Updated 2022-12-12
    with Algorand as (
    select date(block_timestamp) as day,
    count(*) / (24 * 60) as trx_per_min,
    count (tx_id) as tx_count,
    count(case when INNER_TX = 'false' then 'SUCCESS' else null end) as success_tx,
    (success_tx /tx_count)*100 as success_rate
    from algorand.core.fact_transaction
    where block_timestamp >= dateadd(month, -6, getdate())
    and block_timestamp >= '2022-01-01'
    group by 1
    ),

    ethereum as (
    select date(block_timestamp) as day,
    count(*) / (24 * 60) as trx_per_min,
    count (tx_hash) as tx_count,
    count(case when status = 'SUCCESS' then 'SUCCESS' else null end) as success_tx,
    (success_tx /tx_count)*100 as success_rate
    from ethereum.core.fact_transactions
    where block_timestamp >= '2022-01-01'
    group by 1
    ),

    Flow as (
    select date(block_timestamp) as day,
    count(*) / (24 * 60) as trx_per_min,
    count (tx_id) as tx_count,
    count (case when tx_succeeded = 'TRUE' then 1 end) as Success_TX,
    (success_tx /tx_count)*100 as success_rate
    from flow.core.fact_transactions
    where block_timestamp >= '2022-01-01'
    group by 1
    ),
    near as (
    select date_trunc (day,block_timestamp) as day, count(*) / (24 * 60) as trx_per_min,count (tx_hash) as tx_count,
    Run a query to Download Data