( cohortId: string, projectId: string, tableAlias: string, )
| 154 | } |
| 155 | |
| 156 | export function buildInlineCohortJoin( |
| 157 | cohortId: string, |
| 158 | projectId: string, |
| 159 | tableAlias: string, |
| 160 | ): string { |
| 161 | const cohortAlias = getCohortAlias(cohortId); |
| 162 | const cohortQuery = buildCohortMembershipQuery(cohortId, projectId); |
| 163 | return `LEFT ANY JOIN (${cohortQuery}) AS ${cohortAlias} ON ${cohortAlias}.profile_id = ${tableAlias}.profile_id`; |
| 164 | } |
| 165 | |
| 166 | export function extractCohortId(breakdownName: string): string | null { |
| 167 | if (breakdownName.startsWith('cohort:')) { |
no test coverage detected