title: Not a single group function
body: <p>This query is not showing anything at all.  I want results only those ORDERNO which match in the sub-query.</p>
  
  <pre><code>SELECT SUM(STY.NQTY * STY.NUNITPRICE   
               / 1000) AS ORDERAMOUNT,
      (SELECT SUM(TBLORDERSTYLE.NQTY * TBLORDERSTYLE.NUNITPRICE/1000) FROM TBLORDER
      INNER JOIN TBLORDERSTYLE
      ON TBLORDER.CORDERNO = TBLORDERSTYLE.CORDERNO
      WHERE TBLORDER.CLCNO LIKE '%MR#%' AND
      TBLORDER.CORDERNO = ORD.CORDERNO
      GROUP BY ORD.CORDERNO) AS K
            FROM TBLORDER ORD INNER JOIN   
            TBLORDERSTYLE STY ON    
            ORD.CORDERNO = STY.CORDERNO
            where (ORD.NPOSTFLAG = '1') AND   
             (ORD.NCANCEL = '0') AND
      ORD.NPAYMODE = '1'  AND  
            (ORD.DPICONFIRMDATE  BETWEEN    
            TO_DATE('01-JUL-2012')AND TO_DATE('31-JUL-2012'))
  </code></pre>