Downsample - continuous query not working

The continuous query only seems to work when I specify the from statement. Is it because I’ve got string values in some measurements? and in that case how can I regex exclude them?

CREATE CONTINUOUS QUERY “downsample mean” ON telegraf BEGIN

SELECT mean(*)
INTO telegraf.storage.:MEASUREMENT
FROM telegraf.tmp.cpu GROUP BY time(5m), *

END

CREATE CONTINUOUS QUERY “downsample mean” ON telegraf BEGIN

SELECT mean()
INTO telegraf.storage.:MEASUREMENT
FROM telegraf.tmp./.
/ GROUP BY time(5m), *

END