1 Reply Latest reply: Nov 23, 2012 4:23 AM by BluShadow RSS

    Matrix Report

    Vedant
      Dear friends,

      i want to create matrix report but i don't know how can i do it.

      My code is
      i need out put of below code

      1st Code
      SELECT *  FROM 
      (
      SELECT ASSIGN_USER_ID, TO_CHAR(CREATED_ON,'MON') MTH,(ID) FROM CRM_SALES_DEAL 
      )
      PIVOT
      (
      COUNT(ID)
      FOR MTH  IN ( 'JAN'  ,'FEB', 'MAR','APR','MAY','JUN','JUL','AUG','SEP','OCT','NOV','DEC') 
        )
      2nd Code
      SELECT *  FROM 
      (
      SELECT ASSIGN_USER_ID, TO_CHAR(CREATED_ON,'MON') MTH,(ID) FROM CRM_SALES_DEAL where DEAL_STATUS_CODE_ID=5 
      )
      PIVOT
      (
      COUNT(ID)
      FOR MTH  IN ( 'JAN'  ,'FEB', 'MAR','APR','MAY','JUN','JUL','AUG','SEP','OCT','NOV','DEC') 
        )
      i need to display Like Result of 1st Query |result of 2nd Code.

      I need to display 1st code in assign work and 2nd Code display as finish work.
      I want to display it according to year.

      How can i do it.

      Thanks
        • 1. Re: Matrix Report
          BluShadow
          And we're supposed to interpret those queries to know what the output of the first query looks like?

          We can assume your database version is 11g as you're using PIVOT, but what about some example data and expected output?

          {message:id=9360002}