Query editor
-- DTF Wallet 0x6fb7e0AAFBa16396Ad6c1046027717bcA25F821f-- alloy ERC-1155 Token ID 1000000000 0x4fDfc1B53Fd1D80d969C984ba7a8CE4c7bAaD442WITH addresses AS (SELECT * FROM query_2428525 -- DAO addresses),addresses_polygon AS (SELECT address FROM addresses WHERE blockchain = 'polygon'),sent_polygon AS (SELECTdate_trunc('month', evt_block_time) as month,"from" as address,- cast(sum(value) as INT256) as totalFROMaavegotchi_polygon.ForgeDiamond_evt_TransferSingle as tfrJOIN addresses_polygon ON tfr."from" = addresses_polygon.addressWHEREid = cast(1000000000 as uint256)AND evt_block_time >= CAST('2023-02-10' AS TIMESTAMP)GROUP BY 1, 2),received_polygon AS (SELECTdate_trunc('month', evt_block_time) as month,to as address,cast(sum(value) as INT256) as totalFROMaavegotchi_polygon.ForgeDiamond_evt_TransferSingle as tfrJOIN addresses_polygon ON tfr."to" = addresses_polygon.addressWHEREid = cast(1000000000 as uint256)AND evt_block_time >= CAST('2023-02-10' AS TIMESTAMP)GROUP BY 1, 2),-- ensure there is a month entry for every address, to avoid gaps in the graphsactive_months AS (SELECT DISTINCT monthFROM (SELECT month FROM sent_polygonUNION SELECT month FROM received_polygon)),active_addresses_polygon AS (SELECT DISTINCT addressFROM (SELECT address FROM sent_polygonUNION SELECT address FROM received_polygon)),placeholders_polygon AS (SELECTmonth,address,cast(0 as INT256)FROM active_months, active_addresses_polygon -- CROSS JOIN for all combinations),