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 transfers as ((SElECTDATE_TRUNC('month',evt_block_time) as month,(CAST(value AS double)/1e+18) as value_double,"from" as wallet,evt_tx_hashFROMerc20_polygon.evt_TransferWHERE contract_address = 0x2bC07124D8dAc638E290f401046Ad584546BC47bAND "to" = 0xc6b891970fde366e8c8b1f81e38f9cd5a9f65d15)UNION ALL(SElECTDATE_TRUNC('month',evt_block_time) as month,(CAST(value AS double)/1e+18) as value_double,"from" as wallet,evt_tx_hashFROMerc20_polygon.evt_TransferWHERE contract_address = 0x2bC07124D8dAc638E290f401046Ad584546BC47bAND "to" = 0x979662e7F49B98Bc71a99d683a9F3576b421B922))SELECTCOUNT(DISTINCT wallet) as num_users,sum(value_double) AS total_token_spend,COUNT(evt_tx_hash) AS total_num_transactions,SUBSTRING(CAST(month as VARCHAR(50)), 1, 7)FROM transfersWHERE SUBSTRING(CAST(month as VARCHAR(50)), 1, 7) != '2022-08'GROUP BY monthORDER BY month