我想创建多栏报告。
下面将显示任何未完成的packgroup pg.status<>task_def.status_finished
但我希望每个状态都有一个单独的列,而不是一行。
有人有什么想法吗
enter code here
selet pg.WORKFLOWKEY,pg.status,pg.controllerstatus, count (pg.id)as amount
from task pg
left join packgroup pgt
on pgt.id = pg.id
left join location l
on l.id = pg.EXECUTIONLOCATIONID
left join location l2
on l2.id = pg.locationid
where pg.TASKTYPEKEY = task_def.TASKTYPE_PACKGROUP
and pg.STATUS <> task_def.STATUS_FINISHED
group by pg.WORKFLOWKEY,
pg.status,pg.controllerstatus
order by pg.WORKFLOWKEY asc
暂无答案!
目前还没有任何答案,快来回答吧!