Skip to content

Conversation

@xyn1nja
Copy link
Contributor

@xyn1nja xyn1nja commented Oct 23, 2025

Added the following SQL queries to a new page in the docs:

  • Count of total events per day in Pacific timezone, deduplicated by event_name, time, distinct_id, and insert_id
  • Count of unique users per day (joining the events table with the identity mapping table) in Pacific timezone
  • Top 20 events by volume
  • Querying duplicate events (by event_name, time, distinct_id, and insert_id)

@xyn1nja xyn1nja requested a review from a team as a code owner October 23, 2025 09:41
@xyn1nja xyn1nja requested review from Tofufu and argenisf and removed request for a team and Tofufu October 23, 2025 09:41
@vercel
Copy link

vercel bot commented Oct 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs Ready Ready Preview Comment Oct 24, 2025 7:19am

Copy link
Contributor

@argenisf argenisf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mind looking at the 2 comments on the code?

@@ -0,0 +1,101 @@
# Common SQL Queries

### Count of total events per day in Pacific timezone, deduplicated by `event_name`, `time`, `distinct_id`, and `insert_id`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @xyn1nja could we rework the titles to something more concise and give a brief explanation of the use case? Here's an example of the first 2 queries:

image

time
```

### Expanding `properties` JSON for specific events
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the goal? I think that with expanding JSON properties, the idea is to have each property be its own column, and this query would be more like each row being a separate property:
image

@xyn1nja xyn1nja merged commit de2876d into main Oct 24, 2025
9 checks passed
@xyn1nja xyn1nja deleted the xyninja/pipelines-5 branch October 24, 2025 08:52
efahk pushed a commit that referenced this pull request Nov 12, 2025
* Added a new page on common SQL queries

* Added a link to common SQL queries page

* Updated titles and descriptions for common SQL queries

* Removed expanding `properties` JSON query
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants