title: single-row subquery returns more than one row. Query not working with main query
body: <p>I hve to display several cell values into one cell. So I am using this query:</p>
  
  <pre><code>select LISTAGG(fc.DESCRIPTION,  ';'||chr(10))WITHIN GROUP (ORDER BY fc.SWITCH_NAME) AS DESCRIP from "ORS".SWITCH_OPERATIONS fc
         group by fc.SWITCH_NAME
  </code></pre>
  
  <p>It is working fine. But when I am merging this with my main(complete) query then I am getting the error as: Error code 1427, SQL state 21000: ORA-01427: single-row subquery returns more than one row</p>
  
  <p>Here is my complete query:</p>
  
  <pre><code>SELECT
       TRACK_EVENT.LOCATION,
       TRACK_EVENT.ELEMENT_NAME,
       (select COUNT(*) from ORS.TRACK_EVENT b where (b.ELEMENT_NAME = sw.SWITCH_NAME)AND (b.ELEMENT_TYPE = 'SWITCH')AND (b.EVENT_TYPE = 'I')AND (b.ELEMENT_STATE = 'NORMAL' OR b.ELEMENT_STATE = 'REVERSE'))as COUNTER,
       (select COUNT(*) from ORS.SWITCH_OPERATIONS fc where TRACK_EVENT.ELEMENT_NAME = fc.SWITCH_NAME and fc.NO_CORRESPONDENCE = 1 )as FAIL_COUNT,
       (select MAX(cw.COMMAND_TIME) from ORS.SWITCH_OPERATIONS cw where ((TRACK_EVENT.ELEMENT_NAME = cw.SWITCH_NAME) and (cw.NO_CORRESPONDENCE = 1)) group by cw.SWITCH_NAME ) as FAILURE_DATE,
       (select LISTAGG(fc.DESCRIPTION,  ';'||chr(10))WITHIN GROUP (ORDER BY fc.SWITCH_NAME) AS DESCRIP from "ORS".SWITCH_OPERATIONS fc
         group by fc.SWITCH_NAME)
  
  FROM
      ORS.SWITCH_OPERATIONS sw,
      ORS.TRACK_EVENT TRACK_EVENT
  WHERE
      sw.SEQUENCE_ID = TRACK_EVENT.SEQUENCE_ID
  </code></pre>