I'm writing a sql with partition by in TDengine database.
My statement is:
select app_id, task_name, sum(allocated) as allocated
from (
select tbname as app_id,
task_name,
apercentile(allocated, 90) as allocated
from yarn
where ts > now -5m
and tenant_name = 'xxxx'
partition by tbname,
task_name
) t
partition by task_name;
It reports an error:
DB error: Not a single-group group function
Why is it working correctly?