@NonNull
    public StringBuilder sqlWhere(@Nullable final String dbTable) {
        final String prefix = dbTable == null ? "" : (dbTable + ".");
        return new StringBuilder(prefix).append(DataStore.dbField_latitude).append(" >= ").append(doubleToSql(getLatitudeMin())).append(" and ")
                .append(prefix).append(DataStore.dbField_latitude).append(" <= ").append(doubleToSql(getLatitudeMax())).append(" and ")
                .append(prefix).append(DataStore.dbField_longitude).append(" >= ").append(doubleToSql(getLongitudeMin())).append(" and ")
                .append(prefix).append(DataStore.dbField_longitude).append(" <= ").append(doubleToSql(getLongitudeMax()));
    }
Return the "where" part of the string appropriate for a SQL query.

@param dbTable the database table to use as prefix, or null if no prefix is required
@return the string without the "where" keyword
main/src/main/java/cgeo/geocaching/location/Viewport.java