title: Find out max dates of all users in same table
body: <p>I have a table data with multiple imei. I want to find out all max(dates) of all imei. 
  I am writing this query:</p>
  
  <pre><code>SELECT * 
  from data 
  where gpsdatetime=(
          select max(gpsdatetime) 
          from data) 
      AND imei in("+imei_string+");
  </code></pre>
  
  <p>But this fetches all the data of selected imei and then selects only one max date from all the data.</p>
  
  <p>I want to find out all max(dates) of all imei.</p>