select wi.item_type ITEM_TYPE,
wit.persistence_type P_TYPE,
decode (wi.end_date, NULL, 'OPEN', 'CLOSED') Status,
count(*) COUNT
from wf_items wi,
wf_item_types wit
where wit.name = wi.item_type
group by item_type,
wit.persistence_type,
WIT.PERSISTENCE_DAYS,
decode (wi.end_date, NULL, 'OPEN', 'CLOSED')
order by decode (wi.end_date, NULL, 'OPEN', 'CLOSED'), 4 desc
No comments:
Post a Comment