    }

    @Override
    public String preparedStatement() {
        if (from != null && until != null) {
            return "SELECT " + selectAttrName + " from " + tableName + " WHERE " + "date_trunc('second'," + timstampAttrName
                    + ")=date_trunc('second',?::timestamp)" + " OR " + "date_trunc('second'," + timstampAttrName
                    + ")=date_trunc('second',?::timestamp)" + " OR " + "(extract(seconds from AGE(" + timstampAttrName + ",?)) >1" + " AND "
                    + "extract (seconds from AGE(?," + timstampAttrName + ")) >1)";
        } else if (from != null) { // until == null