# Top user actions - UserSession table or UserAction table?

**URL:** <https://community.dynatrace.com/t/top-user-actions-usersession-table-or-useraction-table/34072>\
**Category:** Dashboarding\
**Tags:** user-actions, dashboards-classic, user-sessions\
**Created:** [February 8, 2022, 7:27pm UTC](https://community.dynatrace.com/t/top-user-actions-usersession-table-or-useraction-table/34072 "2022-02-08T19:27:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ABB](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@ABB](https://community.dynatrace.com/u/ABB)\
**Post date:** [February 8, 2022, 7:27pm UTC](https://community.dynatrace.com/t/top-user-actions-usersession-table-or-useraction-table/34072/1 "2022-02-08T19:27:50Z")

</div>

Whether it’s the count of frustrated user actions or Top user actions, should we get it from usersession table or useraction table? Need some guidance on this. I see counts vastly differ for both.

In addition, I see another issue- Not sure if this is our company instance, but when I use the user session table, the where clause doesn’t work and pulls all the application names, whereas if I use the useraction table, my results are limited to the application name.

SELECT useraction.application, useraction.name, COUNT(\*) **FROM usersession** WHERE **useraction.application =“My\_App”** AND useraction.apdexCategory=“FRUSTRATED” GROUP BY useraction.application,useraction.name

vs

SELECT useraction.application, useraction.name, COUNT(\*) **FROM useraction** WHERE **useraction.application ="My\_App**" AND useraction.apdexCategory=“FRUSTRATED” GROUP BY useraction.application, useraction.name

---

<div class="post-metadata">

**Author:** ![christian\_gusta](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/christian_gusta/32/24368_2.png) [@christian\_gusta](https://community.dynatrace.com/u/christian_gusta)\
**Post date:** [February 16, 2022, 9:25am UTC](https://community.dynatrace.com/t/top-user-actions-usersession-table-or-useraction-table/34072/2 "2022-02-16T09:25:20Z")

</div>

Hi,

This is explained in the documentation of USQL how the filtering works for primary and secondary “tables” works:&nbsp;[Custom queries, segmentation, and aggregation of session data in RUM Classic — Dynatrace Docs](https://www.dynatrace.com/support/help/how-to-use-dynatrace/real-user-monitoring/how-to-use-real-user-monitoring/cross-application-user-session-analytics/custom-queries-segmentation-and-aggregation-of-session-data#expand--example-1--36)

 ![christian_gusta_0-1645003460097.png](https://global.discourse-cdn.com/dynatrace/original/3X/6/7/6744e04fc4ffe8ad8c42ad31745660b74c3bf658.png)

---

<div class="post-metadata">

**Author:** ![ABB](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@ABB](https://community.dynatrace.com/u/ABB)\
**Post date:** [February 16, 2022, 9:53pm UTC](https://community.dynatrace.com/t/top-user-actions-usersession-table-or-useraction-table/34072/3 "2022-02-16T21:53:55Z")

</div>

Thanks! This explains it!
