title: error while using max() function in nested queries
body: <pre><code>enter code here
  </code></pre>
  
  <p>'SELECT * FROM itemregister WHERE emailf IN (SELECT email from verify WHERE sno=MAX(sno))'</p>
  
  <blockquote>
    <p>I am getting error while using this query function like
    SQLSTATE[HY000]: General error: 1111 Invalid use of group function" 
    can any one help me to figure it out.</p>
  </blockquote>