Details
Description
Query issued:
|
SELECT job_title, SUM(test_rate) % COUNT(distinct join_yr) as avg_per_year from default_shadow group by job_title;
|
|
Error:
|
"msg": "Syntax error: In line 1 >>SELECT job_title, SUM(test_rate) % COUNT(distinct join_yr) as avg_per_year from default_shadow group by job_title;<< Encountered '(' \"(\" at column 41. "
|
|
|
Above query works well in n1ql.
|
When I remove distinct keyword in count function I get:
|
"msg": "Cannot resolve ambiguous alias reference for undefined identifier test_rate"
|
|
Also I am able to select DISTINCT job_title from default_shadow, so distinct is supported and works well separately but not in count function.
|
|
Attachments
Issue Links
- relates to
-
MB-24190 [CX] support DISTINCT aggregates
- Closed