Query editor
WITH unim_in_lg AS (select date_trunc('day',evt_block_time) as day, sum(value/1e18) as unim_intobank_LG from erc20_polygon.evt_Transferwhere contract_address = 0x64060ab139feaae7f06ca4e63189d86adeb51691 -- UNIM,and to = 0x94f557dddb245b11d031f57ba7f2c4f28c4a203e--Game Bank Address--and ("from" = 0x0000000000000000000000000000000000000000' or `from` = '0x149b5c8d045a5c8f5a3e1069a3a58fa86619b3ae' or `from` = '0x03675e71e11b96ab4965c03044585ddcdb20e26f' or `from` = '0xaa0cb89f107eddcc89ecb6ace8fbb56369354b64') -- mint or transfer addressand "from" in (0x0000000000000000000000000000000000000000,0x149b5c8d045a5c8f5a3e1069a3a58fa86619b3ae,0x03675e71e11b96ab4965c03044585ddcdb20e26f,0xaa0cb89f107eddcc89ecb6ace8fbb56369354b64)and evt_block_time > cast('2022-05-01' as timestamp)group by 1--order by 1 desc),days AS (SELECTcast(day as timestamp) as dayFROM unnest(sequence(date('2022-05-01'), cast(now() as date), interval '1' day)) as t(day)),unim_in_players AS (select date_trunc('day',evt_block_time) as day, sum(value/1e18) as unim_intobank from erc20_polygon.evt_Transferwhere contract_address = 0x64060ab139feaae7f06ca4e63189d86adeb51691 -- UNIM,and to = 0x94f557dddb245b11d031f57ba7f2c4f28c4a203e--Game Bank Addressand "from" not IN (0x0000000000000000000000000000000000000000,0x91ea6fefe13027e633704b5927774d7b39ee6c63, --attack address0x8b939b4662aa1bde3c83f584ada03971c93001dd,--attack address0x03675e71e11b96ab4965c03044585ddcdb20e26f,--attack address0x149b5c8d045a5c8f5a3e1069a3a58fa86619b3ae, --CU0xaa0cb89f107eddcc89ecb6ace8fbb56369354b64 --CU)--and not (`from` = '0x91ea6fefe13027e633704b5927774d7b39ee6c63' or `from` = '0x8b939b4662aa1bde3c83f584ada03971c93001dd' or `from` = '0x03675e71e11b96ab4965c03044585ddcdb20e26f') --attack addresses--and not (`from` = '0x149b5c8d045a5c8f5a3e1069a3a58fa86619b3ae' or `from` = '0xaa0cb89f107eddcc89ecb6ace8fbb56369354b64') --CUgroup by 1--order by 1 desc),unim_out_players AS (select date_trunc('day',evt_block_time) as day, -1*sum(value/1e18) as unim_outbank from erc20_polygon.evt_Transferwhere contract_address = 0x64060ab139feaae7f06ca4e63189d86adeb51691 -- UNIMand "from" = 0x94f557dddb245b11d031f57ba7f2c4f28c4a203e --Game Bank Addressand to not IN (0x0000000000000000000000000000000000000000,0x91ea6fefe13027e633704b5927774d7b39ee6c63, --attack addresses0x8b939b4662aa1bde3c83f584ada03971c93001dd --attack addresses) --to treasury--and not (to = '0x91ea6fefe13027e633704b5927774d7b39ee6c63' or to = '0x8b939b4662aa1bde3c83f584ada03971c93001dd') --attack addressesgroup by 1--order by 1 desc),unim_out_lg AS (select date_trunc('day',evt_block_time) as day, -1 * sum(value/1e18) as unim_outbank_lg from erc20_polygon.evt_Transferwhere contract_address = 0x64060ab139feaae7f06ca4e63189d86adeb51691 -- UNIM,and to = 0x0000000000000000000000000000000000000000--Game Bank Addressand "from" = 0x94f557dddb245b11d031f57ba7f2c4f28c4a203e --treasurygroup by 1),unim_attack_in as (select date_trunc('day',evt_block_time) as day, sum(value/1e18) as unim_attack from erc20_polygon.evt_Transferwhere contract_address = 0x64060ab139feaae7f06ca4e63189d86adeb51691 -- UNIM,