code: protected static String getSQLSelectString(PoiCategoryFilter filter, int count, int version) {
          if (filter != null) {
              return PoiCategoryRangeQueryGenerator.getSQLSelectString(filter, count, version);
          }
          StringBuilder sb = new StringBuilder();
          sb.append(DbConstants.FIND_IN_BOX_CLAUSE_SELECT);
          if (count > 0) {
              sb.append(DbConstants.JOIN_DATA_CLAUSE);
          }
          sb.append(DbConstants.FIND_IN_BOX_CLAUSE_WHERE);
          for (int i = 0; i < count; i++) {
              sb.append(DbConstants.FIND_BY_DATA_CLAUSE);
          }
          return sb.append(" LIMIT ?;").toString();
      }
docs: Gets the SQL query that looks up POI entries.
  
  @param filter  The filter object for determining all wanted categories (may be null).
  @param count   Count of patterns to search in points of interest data (may be 0).
  @param version POI specification version.
  @return The SQL query.