title: Sub query to fetch the highest value
body: <p>Input</p>
  
  <pre><code>+-------+---------+----------+
  | Name  | Country | State    |
  +-------+---------+----------+
  | jon   | US      | Chicago  |
  +-------+---------+----------+
  | kathy | US      | CA       |
  +-------+---------+----------+
  | linda | US      | LA       |
  +-------+---------+----------+
  | harry | UK      | wales    |
  +-------+---------+----------+
  | steve | UK      | scotland |
  +-------+---------+----------+
  | ram   | India   | ap       |
  +-------+---------+----------+
  | jai   | India   | ka       |
  +-------+---------+----------+
  | raju  | India   | ap       |
  +-------+---------+----------+
  | ravi  | India   | mp       |
  +-------+---------+----------+
  </code></pre>
  
  <p>Iam not able to pass the country with highest count(india) using the below query as it is returning 2(country &amp; count) values. Please correct me.</p>
  
  <pre><code>select name from table a 
  where a.country in 
  (SELECT country, COUNT(*) as c FROM table b 
  GROUP BY country 
  ORDER BY c DESC LIMIT 1);
  </code></pre>
  
  <p>Output:</p>
  
  <p>The details  of the state (under the highest counted country-india) whose count is the highest in the same table should be displayed.</p>
  
  <pre><code>+---------+-------+----+
  | ram     | india | ap |
  +---------+-------+----+
  | raju    | india | ap |
  +---------+-------+----+
  </code></pre>