text: DROP TABLE IF EXISTS tab;
  DROP TABLE IF EXISTS mv;
  
  CREATE TABLE tab(d Date, x UInt32) ENGINE MergeTree(d, x, 8192);
  CREATE MATERIALIZED VIEW mv(d Date, y UInt64) ENGINE MergeTree(d, y, 8192) AS SELECT d, x + 1 AS y FROM tab;
  
  INSERT INTO tab VALUES ('2018-01-01', 1), ('2018-01-01', 2), ('2018-02-01', 3);
  
  SELECT '-- Before DROP PARTITION --';
  SELECT * FROM mv ORDER BY y;
  
  ALTER TABLE mv DROP PARTITION 201801;
  
  SELECT '-- After DROP PARTITION --';
  SELECT * FROM mv ORDER BY y;
  
  DROP TABLE tab;
  DROP TABLE mv;
  