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: owner.rb
    path of file: ./repos/mailanes/objects
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

# Copyright (c) 2018-2024 Yegor Bugayenko
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and assoc
    
  def months(source)
    @pgsql.exec(
      [
        'SELECT CONCAT(DATE_PART(\'year\', recipient.created), \'/\',',
        '  DATE_PART(\'month\', recipient.created)) AS month,',
        'COUNT(1) AS total,',
        'COUNT(1) FILTER (WHERE bounced IS NOT NULL) as bad',
        'FROM recipient',
        'LEFT JOIN delivery ON recipient.id = delivery.recipient',
        'WHERE source = $1',
        'GROUP BY month',
        'ORDER BY month DESC'
      ],
      [source.downcase.strip]
    ).map { |r| { month: r['month'], total: r['total'].to_i, bad: r['bad'].to_i } }
  end