You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: 20231207173101_create_ci_used_minutes_mv.rb
    path of file: ./repos/gitlabhq/db/click_house/migrate/main
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class CreateCiUsedMinutesMv < ClickHouse::Migration
  def up
    execute <<~SQL
      CREATE MATERIALIZED VIEW IF NOT EXISTS ci_used_minutes_mv
      TO ci_used_minutes
      AS
      SELECT
        project_id,
        status,
        runner_t
    
  def up
    execute <<~SQL
      CREATE MATERIALIZED VIEW IF NOT EXISTS ci_used_minutes_mv
      TO ci_used_minutes
      AS
      SELECT
        project_id,
        status,
        runner_type,
        toStartOfInterval(finished_at, INTERVAL 1 day) AS finished_at_bucket,

        countState() AS count_builds,
        sumSimpleState(duration) AS total_duration
      FROM ci_finished_builds
      GROUP BY project_id, status, runner_type, finished_at_bucket
    SQL
  end