Abbas_ra21Top 10K users Stats
    Updated 2024-02-01
    -- forked from Linea Bridge users stats @ https://flipsidecrypto.xyz/edit/queries/4ac13fed-1a5d-417b-b51c-c71f9ca3f606

    with zksync AS (
    select
    DISTINCT ETH_From_Address AS Addresses
    from ethereum.core.ez_eth_transfers
    where eth_to_address = '0xabea9132b05a70803a4e85094fd0e1800777fbef'
    and identifier= 'CALL_ORIGIN'
    )
    select
    from_address AS User,
    sum(ETH_VALUE) AS "Total Bridged ETH",
    rank() over (
    order by
    "Total Bridged ETH" desc
    ) AS "Rank By Bridged Amount",
    count(*) AS "TX Count",
    rank() over (
    order by
    "TX Count" desc
    ) AS "Rank By TX Count",
    sum(TX_Fee) AS "Paid Fee",
    case when from_address in (select Addresses from zksync) then '✔️' else '❌' end AS "bridged to ZKSync"
    from
    ethereum.core.fact_transactions
    where
    to_address = lower('0x49048044D57e1C92A77f79988d21Fa8fAF74E97e')
    and STATUS='SUCCESS'
    group by
    1

    order by
    2 desc limit 10000