# Quais reações são as mais usadas na sua comunidade?

**URL:** https://meta.discourse.org/t/which-reactions-are-the-most-commonly-used-in-your-community/286866
**Category:** Community Building
**Tags:** reactions, sql-query
**Created:** [28 Novembro , 2023 17:43 UTC](https://meta.discourse.org/t/which-reactions-are-the-most-commonly-used-in-your-community/286866 "2023-11-28T17:43:50Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [11 Dezembro , 2023 10:46 UTC](https://meta.discourse.org/t/which-reactions-are-the-most-commonly-used-in-your-community/286866/2 "2023-12-11T10:46:07Z")

</div>

Vamos mover isso para #Community Building para ter mais gente olhando. 👀

Embora a consulta não esteja contando os Likes corretamente, ou pelo menos não todos os nossos (possivelmente porque ativamos as Reações no meio do processo)

| reaction | posts | count |
| --- | --- | --- |
| ❤ | 52295 | 144915 |
| 👍 | 1167 | 1224 |
| 💯 | 1101 | 1236 |

versus:

| reaction\_value | count |
| --- | --- |
| ❤ | 1371442 |
| 💯 | 1236 |
| 👍 | 1224 |

> **A propósito, tenho usado uma pequena variação deste para gerar nossa tabela:**
>
> ```sql
> SELECT source.reaction_value,
> count
> FROM
> 
> (
> (
>  
> SELECT 
> CASE WHEN post_action_type_id = 2 THEN 'heart' END AS reaction_value,
> COUNT(*) AS count
> FROM post_actions
> WHERE post_action_type_id = 2
> AND deleted_at IS NULL
> GROUP BY 1
> 
> )
> UNION ALL
> (
> 
> SELECT 
> reaction_value,
> SUM(reaction_users_count) AS count
> FROM discourse_reactions_reactions
> WHERE reaction_value <>> 'heart'
> GROUP BY 1
> 
> )
> ) AS source
> 
> GROUP BY 1,2
> ORDER BY 2 DESC
> 
> ```

Também há a padrão na seção de relatórios para verificar (mas a tabela não é tão fácil de copiar e colar 🙂) - `/admin/reports/reactions`

---

_[View the full topic](https://meta.discourse.org/t/which-reactions-are-the-most-commonly-used-in-your-community/286866)._
