scope :sniffer_plugin_knowledge_suppliers_interests, ->profile {
    from("articles")
      .select("DISTINCT articles.id AS knowledge_id, op.opportunity_id AS product_category_id, profiles.id as profile_id, 'knowledge' as view")
      .joins("INNER JOIN article_resources ON articles.id = article_resources.article_id")
      .joins("INNER JOIN sniffer_plugin_opportunities as op ON article_resources.resource_id = op.opportunity_id AND op.opportunity_type = 'ProductCategory' AND article_resources.resource_type = 'ProductCategory'")