title: sqlite rawquery not working correctly
body: <p>I have two table their names are profile and messages. I try to get profile data and last message which related by profileId from sql.</p>
  
  <h2>profiles</h2>
  
  <ul>
  <li>profileId(INTEGER)</li>
  <li>profileName(TEXT)</li>
  <li>profileImgPath(TEXT)</li>
  </ul>
  
  <h2>messages</h2>
  
  <ul>
  <li>messageId (INTEGER)</li>
  <li>profileId (INTEGER)</li>
  <li>messageContent (INTEGER)</li>
  <li>messageType (INTEGER)</li>
  <li>messageStatus(INTEGER)</li>
  <li>messageTime(TEXT)</li>
  </ul>
  
  <h2>data examples</h2>
  
  <p><a href="https://i.stack.imgur.com/vrG5W.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vrG5W.png" alt="table contents"></a></p>
  
  <p><a href="https://i.stack.imgur.com/K8YHT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/K8YHT.png" alt="enter image description here"></a></p>
  
  <h2>my query</h2>
  
  <pre><code>SQLiteDatabase db = this.getReadableDatabase();
  
  
       String selectQuery = "select " +
       "profiles.profileId," +
       "profiles.profileName," +
       "profiles.profileImgPath," +
       "profiles.profileStatus," +
       "messages.messageContent," +
       "messages.messageTime " +
       "from profiles left join messages on profiles.profileId=messages.profileId " +
       "group by profiles.profileId " +
       "order by messages.messageId DESC;";
            Cursor c = db.rawQuery(selectQuery, null);
      Log.i("query",selectQuery);
      if (c.moveToFirst()) {
          do {
  
              Log.i("gokberksql", c.getString(1) + "x" + c.getString(4));
              } while (c.moveToNext());
      }
  </code></pre>
  
  <h2>results</h2>
  
  <pre><code>gokberksql﹕ sinanxKanka naber
  </code></pre>
  
  <p>But need to return </p>
  
  <pre><code>gokberksql﹕ sinanxIyi senden naber
  </code></pre>
  
  <p>In addition this query working well in my computer editors but android results not correctly.</p>