Query editor
WITHdates AS (SELECTSEQUENCE((CURRENT_DATE - INTERVAL '1' year),CURRENT_DATE,INTERVAL '1' month) /* WARNING: Check out the docs for example of time series generation: https://dune.com/docs/query/syntax-differences/ */ AS months)SELECTtt.month,dat.c AS "Count"FROM (SELECTmonthFROM datesCROSS JOIN UNNEST(months) AS _u(month)) AS ttLEFT JOIN (SELECTDATE_TRUNC('month', block_time) AS month,COUNT(*) AS cFROMpolygon.logsWHEREcontract_address = 0x7be83293BeeDc9Eba1bd76c66A65F10F3efaeC26AND topic0 = 0xa545b6fd3355e8d57f8c8147bafe740545bd3ea1f94bef2576a6d532a7c3b605AND block_time > (CURRENT_DATE - INTERVAL '1' year)GROUP BY1) AS datON DATE_TRUNC('month', tt.month) = dat.month