Hope this will help you.
Code:SELECT distinct grade, count(decode(job_type, 'Type1', 1)) over(partition by grade) t1, count(decode(job_type, 'Type2', 1)) over(partition by grade) t2, count(decode(job_type, 'Type3', 1)) over(partition by grade) t3 FROM emp_grade ORDER BY 1




Reply With Quote