# Número de publicaciones en temas donde el publicador no es el autor?

**URL:** <https://meta.discourse.org/t/number-of-posts-on-topics-where-poster-is-not-the-author/104472>\
**Category:** Data & reporting\
**Tags:** sql-query\
**Created:** [17 Diciembre, 2018 15:13 UTC](https://meta.discourse.org/t/number-of-posts-on-topics-where-poster-is-not-the-author/104472 "2018-12-17T15:13:51Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)\
**Post date:** [17 Diciembre, 2018 15:43 UTC](https://meta.discourse.org/t/number-of-posts-on-topics-where-poster-is-not-the-author/104472/2 "2018-12-17T15:43:48Z")

</div>

The number of posts by a user on topics where the user is not the OP:

```plaintext
-- [params]
-- string :user_id = 3
SELECT count(posts.id) FROM posts
JOIN topics ON topics.id = posts.topic_id
WHERE posts.user_id = :user_id 
AND NOT topics.user_id = :user_id
AND posts.deleted_at IS NULL
AND topics.deleted_at IS NULL
AND topics.archetype = 'regular'

```

---

_[View the full topic](https://meta.discourse.org/t/number-of-posts-on-topics-where-poster-is-not-the-author/104472)._
