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: 20230614041219_delete_duplicate_poll_votes.rb
    path of file: ./repos/discourse/plugins/poll/db/migrate
    
    the code of the file until where you have to start completion: # frozen_string_literal: tru
    
  def up
    execute <<~SQL
    DELETE FROM poll_votes
    WHERE (poll_id, user_id, poll_option_id) IN (
      SELECT pv.poll_id, pv.user_id, pv.poll_option_id
      FROM poll_votes pv
      JOIN polls p ON pv.poll_id = p.id
      WHERE p.type = 0
      AND EXISTS (
        SELECT 1
        FROM poll_votes pv2
        WHERE pv.poll_id = pv2.poll_id
        AND pv.user_id = pv2.user_id
        AND pv.created_at < pv2.created_at
      )
    );
    SQL
  end