posthog.com icon indicating copy to clipboard operation
posthog.com copied to clipboard

Improve HogQL docs

Open andyvan-ph opened this issue 2 years ago • 1 comments

Summary

  • Main overview page: "It reads okay, but is technically somewhat out of date by now."

  • Add explanations of supported ClickHouse SQL functions: "It lists the functions that are supported, but to actually know what they are... you need to manually look up the same function in the clickhouse docs that you separately had to open."

  • Same as above for aggregations page

What kind of request is this?

  • [x] New docs page / feature
  • [ ] Update to existing page

Which product is this for?

  • [x] Product OS (e.g. platform features)
  • [ ] Product analytics
  • [ ] Session replay
  • [ ] Feature flags
  • [ ] A/B testing
  • [ ] Surveys
  • [ ] CDP
  • [ ] Data warehouse
  • [ ] Other (e.g. open source specific)

What's the priority?

  • [ ] Urgent AND important ("great scott, this is horribly wrong / out of date")
  • [x] Important, but not urgent ("we need to do this, but not immediately")
  • [ ] Non-urgent (this could be better / would be nice to have)

Is there a deadline for this change?

  • [ ] Yes (please specify)
  • [x] No

andyvan-ph avatar Feb 08 '24 11:02 andyvan-ph

Figured out and did a bit of work on how to continue improving HogQL docs. I don't think adding aggregation or function are going to help right now, so going to keep those as is. Instead, will work on:

  • Add more examples to expressions
    • Add full examples where there are just mentions now
    • How many requests does a user make on average?
  • Update SQL docs with:
    • Better JOIN
    • LIKE
    • OFFSET
    • WINDOW, PARTITION etc
    • CASE
    • Comments
    • Count
    • Some new useful functions and details
  • Querying persons tutorial - https://github.com/PostHog/posthog.com/issues/8251
    • person properties
    • is_identified
    • Excluding users from queries
    • Identifying and querying power users (subquery + join?)
    • How many requests a user makes on average?
  • Bounce rate in HogQL (update tutorial, using web analytics)

ivanagas avatar Mar 30 '24 00:03 ivanagas