title: Why MAX() will not pick respective maximum value row details?
body: <p><strong>Employee</strong></p>
  
  <pre><code>**|employeeId|  name    |salary |address|**
  ---------------------------------------------
  |1          |John   |45000  |San Fransisco|
  |2          |Michel |100000 |Attil|
  </code></pre>
  
  <p>If I want to select Max salaried person details in Employee table, currently I had to write 2 queries, out of which one is inner.</p>
  
  <p><strong>Query 1)</strong> </p>
  
  <pre><code>Select *
  From Employee 
  Where salary = (Select MAX(salary) From Employee)
  </code></pre>
  
  <p><strong>Query 2)</strong></p>
  
  <pre><code>Select MAX(salary), employeeId
  From Employee
  </code></pre>
  
  <p><strong>Result:</strong> </p>
  
  <pre><code>**|MAX(salary)|      employeeId|**
  -------------------------------
  |100000|             1|
  </code></pre>
  
  <p>If MySQL MAX function designed such a way to select max salary and max salaried employee id in one shot, (as currently MAX will not guarantee this) I would have written very thin queries :( Because most of the requirements will not just stop at finding maximum of an entity property, they would always show interest in all properties of MAX entity. Like here in our case, I just don’t want to find what is maximum salary. I am actually interested in that employee details.</p>
  
  <ol>
  <li>Why MySQL (MAX)is not doing this?</li>
  <li>If we talk about Single responsibility of MAX, currently it’s doing fine and enough. But why are they allowing to select some property after doing MAX(), which is actually confusing me?. Because how can I expect that selected results could be any random value, which does not belong to MAX ly selected entity.(As in the above <strong>[Query 2] result</strong>, <strong>employeeId 1</strong> is no way related to <strong>Max salary 100000</strong>)</li>
  <li>Rather than giving some random result, what is the harm to give results that are the actual properties of MAX ly selected entity? (As it could be <strong>100000 as max salary</strong> and <strong>2 as employeeId</strong>)</li>
  </ol>