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/WITH stakers AS (SELECTparticipant,SUM(amt) as total_lockedFROM(SELECT date_trunc('day', evt_block_time) as day, participant, (cast(amount as double) / 10000) as amt FROM airswap_ethereum."Locker_evt_Lock"UNION ALLSELECT date_trunc('day', evt_block_time) as day, participant, (cast(amount as double) / -10000) as amt FROM airswap_ethereum."Locker_evt_Unlock"UNION ALLSELECT date_trunc('day', evt_block_time) as day, "to" as participant, (cast(tokens as double) / 10000) as amt FROM airswap_ethereum."sAST_evt_Transfer"WHERE "to" != 0x0000000000000000000000000000000000000000UNION ALLSELECT date_trunc('day', evt_block_time) as day, "from" as participant, (cast(tokens as double) / -10000) as amt FROM airswap_ethereum."sAST_evt_Transfer"WHERE "from" != 0x0000000000000000000000000000000000000000UNION ALLSELECT date_trunc('day', evt_block_time) as day, "to" as participant, (cast(tokens as double) / 10000) as amt FROM airswap_ethereum."Staking_v3_evt_Transfer"WHERE "to" != 0x0000000000000000000000000000000000000000UNION ALLSELECT date_trunc('day', evt_block_time) as day, "from" as participant, (cast(tokens as double) / -10000) as amt FROM airswap_ethereum."Staking_v3_evt_Transfer"WHERE "from" != 0x0000000000000000000000000000000000000000UNION ALLSELECT date_trunc('day', evt_block_time) as day, "to" as participant, (cast(tokens as double) / 10000) as amt FROM airswap_ethereum."Staking_v4_evt_Transfer"WHERE "to" != 0x0000000000000000000000000000000000000000UNION ALLSELECT date_trunc('day', evt_block_time) as day, "from" as participant, (cast(tokens as double) / -10000) as amt FROM airswap_ethereum."Staking_v4_evt_Transfer"WHERE "from" != 0x0000000000000000000000000000000000000000) as lock_unlockGROUP BY participantORDER BY total_locked DESC)SELECTparticipant,total_lockedFROM stakersWHERE total_locked > 1