# イベント用のデータエクスプローラー クエリ？

**URL:** <https://meta.discourse.org/t/data-explorer-query-for-events/272536>\
**Category:** Data & reporting\
**Tags:** events, sql-query\
**Created:** [2023 年 7 月 23 日午前 5:05 UTC](https://meta.discourse.org/t/data-explorer-query-for-events/272536 "2023-07-23T05:05:14Z")\
**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:** [2023 年 7 月 23 日午後 1:18 UTC](https://meta.discourse.org/t/data-explorer-query-for-events/272536/2 "2023-07-23T13:18:09Z")

</div>

これで機能するはずです。JSONから正しい投稿IDを取得していますか？

投稿テーブルにリンクし、トピックIDを使用できると思います。これは、投稿IDを見つけるよりも手間がかからないかもしれません。たとえば次のようになります。

```sql
-- [params]
-- topic_id :topic_id

SELECT ei.user_id, ei.status
FROM discourse_post_event_invitees ei
JOIN posts p ON p.id = ei.post_id
WHERE p.topic_id = :topic_id

```

---

_[View the full topic](https://meta.discourse.org/t/data-explorer-query-for-events/272536)._
