livepeer / livepeer/livepeer-data-mcp
[Feedback] :pencil2: correction — Scope cohort retention with day window joins — dateDiff in JOIN ON clause
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
## Feedback (correction)
**Question:** Scope cohort retention with day window joins — dateDiff in JOIN ON clause
**Tool:** `query`
### Error
```
ClickHouse query failed: Unsupported JOIN ON conditions. Unexpected 'dateDiff(...)': While processing dateDiff(...)
```
### Notes
ClickHouse does NOT support dateDiff(), inequality comparisons (>, <, BETWEEN), or computed expressions in JOIN ON clauses. This caused multiple query failures when attempting to do date-range cohort joins. Two working alternatives: (1) Move range conditions into a WHERE clause after the join. (2) Use maxIf(1, dateDiff(...) BETWEEN x AND y) in the SELECT clause with a simple equality-only JOIN ON. Option 2 is generally cleaner for retention window analysis.
---
_Feedback ID: `5738febb-f634-4b9b-bc29-c3d92d728f69` | Recorded at 2026-03-09T21:53:50.482Z_
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by locating the query that generates the cohort retention join and reproduce the reported ClickHouse error; completion would require an agreed fix or documentation, but the issue does not specify which.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100