Description
FOR GROUP queries If the aggregates present in the ORDER BY ONLY it gives error.
If there is another aggregate any where in the query and aggregate in the ORDER BY allowed
CREATE PRIMARY INDEX on default; |
EXPLAIN SELECT p FROM default GROUP BY p ORDER BY SUM(x); |
{
|
"errors": [ |
{
|
"code": 4000, |
"msg": "Aggregates not available for this ORDER BY." |
}
|
]
|
}
|
|
The following works.
|
|
EXPLAIN SELECT p, COUNT(y) FROM default GROUP BY p ORDER BY SUM(x); |