 <p>Just a thought(hadn't tried practically)</p> <pre><code>SELECT * FROM TABLE_NAME having max(na) = na GROUP BY nm_mp </code></pre> <p>If it works or doesn't work, do tell me. Its for all category.</p> <p>For just that two category, try this.</p> <pre><code>SELECT * FROM TABLE_NAME WHERE nm_mp IN('matematika', 'bahasa inggris') having max(na) = na GROUP BY nm_mp </code></pre>