Query editor
-- This query used incompatible data types from Dune SQL alpha and may need to be updated.-- More details can be found on https://dune.com/docs/query/dunesql-changes/SELECTdate_diff('day', time, now()) as time_since_first_stakeFROM(SELECTevt_block_time as time,participant,(cast(amount as double) / 10000) as amtFROM airswap_ethereum."Locker_evt_Lock"UNION ALLSELECTevt_block_time as time,participant,(cast(amount as double) / -10000) as amtFROM airswap_ethereum."Locker_evt_Unlock"UNION ALLSELECTevt_block_time as time,"to" as participant,(cast(tokens as double) / 10000) as amtFROM airswap_ethereum."sAST_evt_Transfer"UNION ALLSELECTevt_block_time as time,"to" as participant,(cast(tokens as double) / 10000) as amtFROM airswap_ethereum.Staking_v3_evt_TransferUNION ALLSELECTevt_block_time as time,"to" as participant,(cast(tokens as double) / 10000) as amtFROM airswap_ethereum.Staking_v4_evt_TransferUNION ALLSELECTevt_block_time as time,"from" as participant,(cast(tokens as double) / -10000) as amtFROM airswap_ethereum."sAST_evt_Transfer"UNION ALLSELECTevt_block_time as time,"from" as participant,(cast(tokens as double) / -10000) as amtFROM airswap_ethereum.Staking_v3_evt_TransferUNION ALLSELECTevt_block_time as time,"from" as participant,(cast(tokens as double) / -10000) as amtFROM airswap_ethereum.Staking_v4_evt_Transfer) as lock_unlockWHERE participant = {{address}}ORDER BY time ASCLIMIT 1