headitmanagerAmount of transactions through each bridges
    Updated 2022-08-07
    with transaction_per_minute as
    (select (count(distinct tx_hash)/1440) as transaction_per_minute,sum(eth_value) as eth_volume,sum(TX_FEE) as fees ,count(distinct from_address) as users
    ,block_timestamp::date as transactions_date
    from optimism.core.fact_transactions
    where block_timestamp::date >='2022-07-01' and block_timestamp::date < '2022-08-01' and status='SUCCESS'
    group by transactions_date)
    , status as (select count(*),status from optimism.core.fact_transactions
    where block_timestamp::date >='2022-07-01' and block_timestamp::date < '2022-08-01'
    group by status)

    , op_prices as (select price,hour from optimism.core.fact_hourly_token_prices where symbol='OP' and hour(hour)=00
    and hour >='2022-07-01' and hour < '2022-08-01')

    , bridges as (select sum(amount),address_name,block_timestamp::date from optimism.core.ez_eth_transfers inner join optimism.core.dim_labels
    on optimism.core.dim_labels.address=eth_to_address
    where block_timestamp::date >='2022-07-01' and block_timestamp::date < '2022-08-01'
    group by address_name,block_timestamp::date)
    , hop_bridges as (select sum(amount),block_timestamp::date from optimism.core.ez_eth_transfers inner join optimism.core.dim_labels
    on optimism.core.dim_labels.address=eth_to_address
    where block_timestamp::date >='2022-07-01' and block_timestamp::date < '2022-08-01' and address_name like '%hop protocol%'
    group by block_timestamp::date)

    ,total_wallet as (select count(distinct eth_from_address) from ethereum.core.ez_eth_transfers
    where block_timestamp::date >='2022-07-01' and block_timestamp::date < '2022-08-01')
    ,total_wallet_overtime as (select count(distinct eth_from_address),block_timestamp::date from ethereum.core.ez_eth_transfers
    where block_timestamp::date >='2022-07-01' and block_timestamp::date < '2022-08-01'
    group by block_timestamp::date)

    select * from bridges