title: Remove duplicate data from cursor and get data when value increase
body: <pre><code>1 | AB    | BCD   | ref  | Ferari|
  ----------------------------------
  1 | AB    | BCD   | ref  | TOYOTA|
  ----------------------------------
  1 | AB    | BCD   | ref| AUDI |
  ----------------------------------
  1 | AB    | BCD    | ref| BMW  |
  ---------------------------------
  2 | BC    | ABC   | ref  | NISSAN|
  ----------------------------------
  2 | BC    | ABC   | ref  | SUZKI|
  ----------------------------------
  2 | BC    | ABC   | ref| TATA |
  </code></pre>
  
  <p>Cursor hold data like this table. Now, I want get data like </p>
  
  <pre><code>getTopic = AB
  getTitle= BCD
  getType = ref
  Names   = FERARI TOYOTA AUDI BMW
  </code></pre>
  
  <p>I tried with this</p>
  
  <pre><code>   do{
         int current = cursor.getInt(cursor.getColumnIndexOrThrow("_id"));
         String Title = cursor.getString(cursor.getColumnIndexOrThrow("TITLE"));
         if(!StoreTitle.equalsIgnoreCase(Title) &amp;&amp; lastId != current){
  
             getTopic = cursor.getString(cursor.getColumnIndexOrThrow("TOPIC"));
             getTitle = cursor.getString(cursor.getColumnIndexOrThrow("TITLE"));
             getType = cursor.getString(cursor.getColumnIndexOrThrow("TYPE"));
             getName = cursor.getString(cursor.getColumnIndexOrThrow("NAME"));
  
         }else{
                getName = getName +" "+ cursor.getString(cursor.getColumnIndexOrThrow("NAME"));
             }
  
         lastId = current;
         StoreTitle = Title;
   }while(cursor.moveToNext());
  </code></pre>
  
  <p>But, it's not showing expected result. It's showing <code>BC</code> column with <code>Names</code> FERARI TOYOTA AUDI BMW. </p>
  
  <p>As I am also checking <code>lastitem!= currentitem</code> for this it's also not showing the last author name.</p>
  
  <p>Now, my question is</p>
  
  <p>1) What should I do to get the expected result ? 
  2) As I am also checking <code>lastitem!= currentitem</code> for this it's also not showing the last author name. But, How can I store that name.</p>