multi选择提供多列数据

ni65a41a  于 2021-08-01  发布在  Java
关注(0)|答案(0)|浏览(192)

我想创建多栏报告。
下面将显示任何未完成的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

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题