TE Johan
TE Johan
DTDrizzle Team
Created by TE Johan on 12/26/2024 in #help
Column reference is ambiguous
GET / 500 in 349ms
✓ Compiled / in 26ms
⨯ error: column reference "id" is ambiguous
at async Object.getExams (file://D%3A/Dev/jecert/services/exam.ts:34:19)
at async AppPage (file://D%3A/Dev/jecert/app/%28app%29/page.tsx:6:16)
32 |
33 | // Wrap it as a subquery and filter for top 6 per provider
> 34 | const result = await db
| ^
35 | .select()
36 | .from(rankedExams.as("ranked"))
37 | .where(sql`row_number <= 6`) {
length: 106,
severity: 'ERROR',
code: '42702',
detail: undefined,
hint: undefined,
position: '8',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'parse_relation.c',
line: '816',
routine: 'scanRTEForColumn',
digest: '2677048155'
}
GET / 500 in 349ms
✓ Compiled / in 26ms
⨯ error: column reference "id" is ambiguous
at async Object.getExams (file://D%3A/Dev/jecert/services/exam.ts:34:19)
at async AppPage (file://D%3A/Dev/jecert/app/%28app%29/page.tsx:6:16)
32 |
33 | // Wrap it as a subquery and filter for top 6 per provider
> 34 | const result = await db
| ^
35 | .select()
36 | .from(rankedExams.as("ranked"))
37 | .where(sql`row_number <= 6`) {
length: 106,
severity: 'ERROR',
code: '42702',
detail: undefined,
hint: undefined,
position: '8',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'parse_relation.c',
line: '816',
routine: 'scanRTEForColumn',
digest: '2677048155'
}
4 replies