title: SQL LISTAGG Min and Max Function Issue
body: <p>Need to find min and max date inside of list tag 
  Like this in one column Min Date:01/01/2015  / Max Date:01/05/2015</p>
  
  <pre><code>SELECT D.ITEM_ID AS "ItemId",
         C.NAME AS "ItemName",
         D.UOM_ID AS "UomId",
         B.DESCRIPTION AS "Uom",
         sum(D.REQUIRED_QTY) AS "Quantity",
         LISTAGG(A.REASON, ', ') WITHIN GROUP (ORDER BY A.REASON) "ReasonType",
         LISTAGG(D.REQUIRED_DATE, ', ') WITHIN GROUP (ORDER BY D.REQUIRED_DATE) "PoRequiredDate",  
         LISTAGG(D.PO_COMMENT, ', ') WITHIN GROUP (ORDER BY D.PO_COMMENT) "Comment"
  FROM BIZZXE_V2_SCH.REASONS A,
       BIZZXE_V2_SCH.UOMS B,
       BIZZXE_V2_SCH.ITEMS C,
       BIZZXE_V2_SCH.PO_REQUEST_ITEMS D,
       BIZZXE_V2_SCH.PO_REQUESTS E
  WHERE E.PO_REQUEST_ID=D.PO_REQUEST_ID
    AND D.ITEM_ID=C.ITEM_ID
    AND D.UOM_ID=B.UOM_ID
    AND D.REASON_ID=A.REASON_ID
  GROUP BY D.ITEM_ID, C.NAME, D.UOM_ID, B.DESCRIPTION 
  </code></pre>
  
  <p>Need  to add Min dt and Max dt to one column as a "PoRequiredDate"</p>
  
  <pre><code> WITH DATA AS(
     SELECT  listagg(REQUIRED_DATE, ',') WITHIN GROUP (ORDER BY REQUIRED_DATE) dt
      FROM PO_REQUEST_ITEMS 
    WHERE PO_REQUEST_ID =16
  
    )
   SELECT dt,
          SUBSTR(dt, 1, instr(dt, ',', 1, 1)-1) min_dt,
           SUBSTR(dt, instr(dt, ',', -1, 1)+1)   max_dt
    FROM data
    /
  </code></pre>