Blog:https://www.jsntian.com
按月删除, testdb是库名,testtable是表名
ALTER TABLE testdb.testtable DROP PARTITION '201907'
clickhouse导出
clickhouse-client -h 127.0.0.1 -d log -m -u default --password 123456 --query="select * from test where dt>='2018-09-20' and dt<='2018-10-13' order by logTime desc" >> data1.csv