Ranjit-Yadavafter bridge 2
    Updated 2022-09-14
    with tb1 as (
    select
    block_timestamp,
    tx_hash,
    origin_from_address
    from ethereum.core.fact_event_logs
    where origin_to_address = '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1'
    )
    , tb2 as (
    select
    block_timestamp,
    tx_hash,
    origin_from_address,
    origin_to_address,
    event_name,
    contract_name
    from optimism.core.fact_event_logs
    )
    , tb3 as (
    select
    b.block_timestamp,
    b.tx_hash,
    b.event_name,
    a.origin_from_address,
    b.contract_name,
    b.origin_to_address
    from tb1 a join tb2 b on a.origin_from_address = b.origin_from_address
    where b.block_timestamp > a.block_timestamp
    )
    select
    block_timestamp::date as date,
    event_name,
    count(DISTINCT tx_hash) as tx_cnt,
    sum(tx_cnt) over(partition by event_name order by date) as cum_tx_cnt,
    RANK() OVER (PARTITION by date order by tx_cnt DESC) as rank
    Run a query to Download Data