Query editor
-- This query has been migrated to run on DuneSQL.-- If you need to change back because you’re seeing issues, use the Query History view to restore the previous version.-- If you notice a regression, please email [email protected].WITHremovelqty AS (SELECTDATE_TRUNC('month', evt_block_time) AS time,SUM(value) AS value,COUNT(DISTINCT ("evt_tx_hash")) AS cnt_txFROMerc20_ethereum.evt_TransferWHERE"contract_address" = 0x06325440d014e39736583c165c2963ba99faf14eAND "to" = 0x0000000000000000000000000000000000000000GROUP BY1),addlqty AS (SELECTDATE_TRUNC('month', evt_block_time) AS time,SUM(value) AS value,COUNT(DISTINCT ("evt_tx_hash")) AS cnt_txFROMerc20_ethereum.evt_TransferWHERE"contract_address" = 0x06325440d014e39736583c165c2963ba99faf14eAND "from" = 0x0000000000000000000000000000000000000000GROUP BY1),transfer AS (SELECTDATE_TRUNC('month', evt_block_time) AS time,SUM(value) AS value,COUNT(DISTINCT ("evt_tx_hash")) AS cnt_txFROMerc20_ethereum.evt_TransferWHERE"contract_address" = 0x06325440d014e39736583c165c2963ba99faf14eAND NOT "to" IN (0x0000000000000000000000000000000000000000,0x182b723a58739a9c974cfdb385ceadb237453c28)AND NOT "from" IN (0x0000000000000000000000000000000000000000,0x182b723a58739a9c974cfdb385ceadb237453c28)GROUP BY1)SELECTCOALESCE(addlqty.time, removelqty.time, transfer.time) AS time,addlqty.cnt_tx + removelqty.cnt_tx + transfer.cnt_tx AS cnt_tx,addlqty.value / CAST(1e18 AS DOUBLE) AS add_lqty,addlqty.cnt_tx AS add_lqty_cnt_tx,removelqty.value / CAST(1e18 AS DOUBLE) AS remove_lqty,removelqty.cnt_tx AS remove_lqty_cnt_tx,transfer.value / CAST(1e18 AS DOUBLE) AS transfer,transfer.cnt_tx AS transfer_cnt_tx,