title: ORA-01791: not a SELECTed expression
body: <p>I need to fetch details from DB. Any thing wrong in my code?</p>
  
  <pre><code>SELECT DISTINCT FNAME, LNAME, MEMBERORG, DAYCOUNT, TIMESTAMP, COUNT(FNAME) AS total,(SELECT COUNT(*) FROM REPORT_VIEW_PAGE) AS tot
  FROM REPORT_VIEW_PAGE 
  WHERE ID = '68' AND TYPE = 'node'
  GROUP BY FNAME, LNAME, MEMBERORG, DAYCOUNT, TIMESTAMP
  ORDER BY TITLE ASC
  </code></pre>
  
  <p>This giving me an error:</p>
  
  <pre><code>ORA-01791: not a SELECTed expression
  01791. 00000 -  "not a SELECTed expression"
  *Cause:    
  *Action:
  Error at Line: 6 Column: 10
  </code></pre>