oracle8.1.6
select issue_type, count(*) as n_issues
from ec_customer_service_issues, ec_cs_issue_type_map
where ec_customer_service_issues.issue_id=ec_cs_issue_type_map.issue_id(+)
group by issue_type
order by decode(issue_type,null,1,0) $issue_type_decode
select info_used, count(*) as n_actions
from ec_customer_service_actions, ec_cs_action_info_used_map
where ec_customer_service_actions.action_id=ec_cs_action_info_used_map.action_id(+)
group by info_used
order by decode(info_used,null,1,0) $info_used_decode
select interaction_originator, count(*) as n_interactions
from ec_customer_serv_interactions
group by interaction_originator
order by decode(interaction_originator,'customer',0,'rep',1,'automatic',2)
, decode(issue_type,
'[DoubleApos $issue_type]',$issue_type_counter,
$issue_type_counter)
, decode(info_used,
'[DoubleApos $info_used]',$info_used_counter,
$info_used_counter)