rcepdaUntitled Query copy
    -- forked from Alir3za / Untitled Query @ https://flipsidecrypto.xyz/Alir3za/q/untitled-query-CG8qJo

    with

    Direct_T as ( select 'Direct staking' as platform, amount as "ETH Staked", tx_hash as TXN, block_timestamp as Time,ORIGIN_FROM_ADDRESS as Stakers from ethereum.core.ez_eth_transfers
    where eth_to_address = '0x00000000219ab540356cbb839cbe05303d7705fa' and identifier = 'CALL_ORIGIN'),
    Lido_T as ( select 'Lido' as platform, event_inputs:amount::number / pow(10,18) as "ETH Staked", tx_hash as TXN, block_timestamp as Time,event_inputs:sender::string as Stakers
    from ethereum.core.fact_event_logs where contract_address = '0xae7ab96520de3a18e5e111b5eaab095312d7fe84'
    and topics[0] = '0x96a25c8ce0baabc1fdefd93e9ed25d8e092a3332f3aa9a41722b5697231d1d1a' and event_inputs is not null and tx_status = 'SUCCESS'),

    Rocket_T as ( select 'Rocket Pool' as platform, tokenflow_eth.hextoint(substr(data,3,64)) / pow(10,18) as "ETH Staked", tx_hash as TXN, block_timestamp as Time, origin_from_address as Stakers

    from ethereum.core.fact_event_logs where topics[0] = '0xbf25d6cb74c97a403cfab1c4c0abc9ffe3edd964de9924de0565f5ffe3d6ca79' and tx_status = 'SUCCESS'),

    StakeWise_T as ( select 'StakeWise' as platform, event_inputs:value::number / pow(10,18) as "ETH Staked", tx_hash as TXN, block_timestamp as Time, event_inputs:to::string as Stakers

    from ethereum.core.fact_event_logs where contract_address = '0xfe2e637202056d30016725477c5da089ab0a043a'
    and event_inputs:from::string = '0x0000000000000000000000000000000000000000' and event_name = 'Transfer' and tx_status = 'SUCCESS'),

    Ankr_T as ( select 'Ankr' as platform, amount as "ETH Staked", tx_hash as TXN, block_timestamp as Time,ORIGIN_FROM_ADDRESS as Stakers
    from ethereum.core.ez_eth_transfers where eth_to_address = '0x84db6ee82b7cf3b47e8f19270abde5718b936670' ),

    Cream_T as ( select 'Cream' as platform, event_inputs:ethAmount::int / pow(10,18) as "ETH Staked", tx_hash as TXN, block_timestamp as Time,event_inputs:account::string as Stakers
    from ethereum.core.fact_event_logs where contract_address = '0xcbc1065255cbc3ab41a6868c22d1f1c573ab89fd'
    and topics[0] = '0xad40ae5dc69974ba932d08b0a608e89109412d41d04850f5196f144875ae2660' and event_inputs is not null and tx_status = 'SUCCESS'),



    Base as (

    select * from Direct_T union all
    select * from Lido_T union all
    select * from Rocket_T union all
    select * from StakeWise_T union all
    select * from Ankr_T union all
    Run a query to Download Data