public List<PresencePublicity> getAllPresencePublicityGroupCategory() {
    List<PresencePublicity> publicities = new ArrayList<PresencePublicity>();
    String selectQuery =
        "SELECT  * FROM " + TABLE_PRESENCE_PUBLICITY + " GROUP BY " + KEY_CATEGORY_ID;

    Log.e(LOG, selectQuery);

    SQLiteDatabase db = this.getReadableDatabase();
    Cursor c = db.rawQuery(selectQuery, null);

    // looping through all rows and adding to list
    if (c.moveToFirst()) {
      do {
        PresencePublicity pd = new PresencePublicity();
        pd.setId(c.getInt((c.getColumnIndex(KEY_ID))));
        pd.setPublicity_id((c.getInt(c.getColumnIndex(KEY_PUBLICITY_ID))));
        pd.setCategory_id((c.getInt(c.getColumnIndex(KEY_CATEGORY_ID))));
        pd.setStore_id((c.getInt(c.getColumnIndex(KEY_STORY_ID))));
        pd.setFound((c.getInt(c.getColumnIndex(KEY_FOUND))));
        pd.setVisible((c.getInt(c.getColumnIndex(KEY_VISIBLE))));
        pd.setLayout_correcto((c.getInt(c.getColumnIndex(KEY_LAYOUT_CORRECT))));
        // adding to todo list
        publicities.add(pd);
      } while (c.moveToNext());
    }
    return publicities;
  }