Ali3N%Share of Cat Attackers Who Have Used Faucet To Get ETH Before Using Contract
    Updated 2023-03-18
    with prevtable as (
    select block_timestamp,
    tx_hash,
    to_address
    from base.goerli.fact_transactions
    where from_address = '0x007ab5199b6c57f7aa51bc3d0604a43505501a0c'),

    cattable as (
    select t1.block_timestamp,
    t1.tx_hash,
    origin_from_address,
    to_address,
    row_number () over (partition by origin_from_address order by t1.block_timestamp asc) as rn
    from base.goerli.fact_event_logs t1 left outer join prevtable t2 on t1.origin_from_address = t2.to_address and t1.block_timestamp > t2.block_timestamp
    where origin_To_address = '0xddb6dcce6b794415145eb5caa6cd335aeda9c272')

    select case when to_address is null then 'Did Not Use Faucet Before Cat Attack'
    else 'Used Faucet Before Cat Attack' end as type,
    count (distinct origin_from_address)
    from cattable
    where rn = 1
    group by 1





    Run a query to Download Data