with ETHTable1 as (
select block_timestamp,
tx_hash,
eth_from_address as origin_from_address,
amount_usd
from ethereum.core.ez_eth_transfers
where eth_to_address = '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1'),
TokenTable1 as (
select block_timestamp,
tx_hash,
origin_from_address,
amount_usd
from ethereum.core.ez_token_transfers
where to_address = '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1'),
L1toL2 as (
select * from ethtable1 union all select * from tokentable1),
SatelliteT as (
select block_timestamp,
tx_hash,
origin_from_address,
topics[2] as User1,
concat ('0x',right(user1,40)) as User_Address
from ethereum.core.fact_event_logs
where origin_to_address = '0x4f4495243837681061c4743b74b3eedf548d56a5'
and contract_address != '0xce16f69375520ab01377ce7b88f5ba8c48f8d666' -- Squid
and event_name is null
and topics[2] is not null),
SquidT as (
select block_timestamp,
tx_hash,
origin_from_address
from ethereum.core.fact_event_logs