diff --git a/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java b/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java
index ca279f3..fa13c7d 100644
--- a/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java
+++ b/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java
@@ -2,6 +2,7 @@
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2021 Nordix Foundation
  *  Modifications Copyright (C) 2021 Pantheon.tech
+ *  Modifications Copyright (C) 2020-2021 Bell Canada.
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -143,6 +144,11 @@
             fragmentEntities = fragmentRepository
                 .getByAnchorAndXpathAndLeafAttributes(anchorEntity.getId(), cpsPathQuery.getXpathPrefix(), cpsPathQuery
                     .getLeafName(), cpsPathQuery.getLeafValue());
+        } else if (CpsPathQueryType.XPATH_HAS_DESCENDANT_WITH_LEAF_VALUES.equals(cpsPathQuery.getCpsPathQueryType())) {
+            final String leafDataAsJson = GSON.toJson(cpsPathQuery.getLeavesData());
+            fragmentEntities = fragmentRepository
+                .getByAnchorAndDescendentNameAndLeafValues(anchorEntity.getId(),
+                    cpsPathQuery.getDescendantName(), leafDataAsJson);
         } else {
             fragmentEntities = fragmentRepository
                 .getByAnchorAndXpathEndsInDescendantName(anchorEntity.getId(), cpsPathQuery.getDescendantName());
diff --git a/cps-ri/src/main/java/org/onap/cps/spi/query/CpsPathQuery.java b/cps-ri/src/main/java/org/onap/cps/spi/query/CpsPathQuery.java
index ce78c06..c5861bd 100644
--- a/cps-ri/src/main/java/org/onap/cps/spi/query/CpsPathQuery.java
+++ b/cps-ri/src/main/java/org/onap/cps/spi/query/CpsPathQuery.java
@@ -1,7 +1,7 @@
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2021 Nordix Foundation
- *  Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
+ *  Modifications Copyright (C) 2021 Bell Canada.
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -20,6 +20,8 @@
 
 package org.onap.cps.spi.query;
 
+import java.util.HashMap;
+import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import lombok.AccessLevel;
@@ -36,6 +38,7 @@
     private String leafName;
     private Object leafValue;
     private String descendantName;
+    private Map<String, Object> leavesData;
 
     private static final String NON_CAPTURING_GROUP_1_TO_99_YANG_CONTAINERS = "((?:\\/[^\\/]+){1,99})";
 
@@ -51,6 +54,15 @@
 
     private static final Pattern LEAF_STRING_VALUE_PATTERN = Pattern.compile("['\"](.*)['\"]");
 
+    private static final String YANG_MULTIPLE_LEAF_VALUE_EQUALS_CONDITION =  "\\[(.*?)\\s{0,9}]";
+
+    private static final Pattern DESCENDANT_ANYWHERE_PATTERN_WITH_MULTIPLE_LEAF_PATTERN =
+        Pattern.compile(DESCENDANT_ANYWHERE_PATTERN + YANG_MULTIPLE_LEAF_VALUE_EQUALS_CONDITION);
+
+    private static final String INDIVIDUAL_LEAF_DETAIL_PATTERN = ("\\s{0,9}and\\s{0,9}");
+
+    private static final Pattern LEAF_VALUE_PATTERN = Pattern.compile("@(\\S+?)=(.*)");
+
     /**
      * Returns a cps path query.
      *
@@ -61,11 +73,11 @@
         Matcher matcher = QUERY_CPS_PATH_WITH_SINGLE_LEAF_PATTERN.matcher(cpsPath);
         final CpsPathQuery cpsPathQuery = new CpsPathQuery();
         if (matcher.matches()) {
-            cpsPathQuery.setCpsPathQueryType(CpsPathQueryType.XPATH_LEAF_VALUE);
-            cpsPathQuery.setXpathPrefix(matcher.group(1));
-            cpsPathQuery.setLeafName(matcher.group(2));
-            cpsPathQuery.setLeafValue(convertLeafValueToCorrectType(matcher.group(3), cpsPath));
-            return cpsPathQuery;
+            return buildCpsPathQueryWithSingleLeafPattern(cpsPath, matcher, cpsPathQuery);
+        }
+        matcher = DESCENDANT_ANYWHERE_PATTERN_WITH_MULTIPLE_LEAF_PATTERN.matcher(cpsPath);
+        if (matcher.matches()) {
+            return buildCpsQueryForDescendentWithLeafPattern(cpsPath, matcher, cpsPathQuery);
         }
         matcher = DESCENDANT_ANYWHERE_PATTERN.matcher(cpsPath);
         if (matcher.matches()) {
@@ -77,6 +89,34 @@
             String.format("Cannot interpret or parse cps path '%s'.", cpsPath));
     }
 
+    private static CpsPathQuery buildCpsPathQueryWithSingleLeafPattern(final String cpsPath, final Matcher matcher,
+        final CpsPathQuery cpsPathQuery) {
+        cpsPathQuery.setCpsPathQueryType(CpsPathQueryType.XPATH_LEAF_VALUE);
+        cpsPathQuery.setXpathPrefix(matcher.group(1));
+        cpsPathQuery.setLeafName(matcher.group(2));
+        cpsPathQuery.setLeafValue(convertLeafValueToCorrectType(matcher.group(3), cpsPath));
+        return cpsPathQuery;
+    }
+
+    private static CpsPathQuery buildCpsQueryForDescendentWithLeafPattern(final String cpsPath, final Matcher matcher,
+        final CpsPathQuery cpsPathQuery) {
+        cpsPathQuery.setCpsPathQueryType(CpsPathQueryType.XPATH_HAS_DESCENDANT_WITH_LEAF_VALUES);
+        cpsPathQuery.setDescendantName(matcher.group(1));
+        final Map<String, Object> leafData = new HashMap<>();
+        for (final String leafValuePair : matcher.group(2).split(INDIVIDUAL_LEAF_DETAIL_PATTERN)) {
+            final Matcher descendentMatcher = LEAF_VALUE_PATTERN.matcher(leafValuePair);
+            if (descendentMatcher.matches()) {
+                leafData.put(descendentMatcher.group(1),
+                    convertLeafValueToCorrectType(descendentMatcher.group(2), cpsPath));
+            } else {
+                throw new CpsPathException("Invalid cps path.",
+                    String.format("Cannot interpret or parse attributes in cps path '%s'.", cpsPath));
+            }
+        }
+        cpsPathQuery.setLeavesData(leafData);
+        return cpsPathQuery;
+    }
+
     private static Object convertLeafValueToCorrectType(final String leafValueString, final String cpsPath) {
         final Matcher stringValueWithQuotesMatcher = LEAF_STRING_VALUE_PATTERN.matcher(leafValueString);
         if (stringValueWithQuotesMatcher.matches()) {
diff --git a/cps-ri/src/main/java/org/onap/cps/spi/query/CpsPathQueryType.java b/cps-ri/src/main/java/org/onap/cps/spi/query/CpsPathQueryType.java
index abdbfb9..3ae54ba 100644
--- a/cps-ri/src/main/java/org/onap/cps/spi/query/CpsPathQueryType.java
+++ b/cps-ri/src/main/java/org/onap/cps/spi/query/CpsPathQueryType.java
@@ -1,6 +1,7 @@
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2021 Nordix Foundation
+ *  Modifications Copyright (C) 2020-2021 Bell Canada.
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -28,6 +29,10 @@
      */
     XPATH_HAS_DESCENDANT_ANYWHERE,
     /**
+     * Xpath descendant anywhere type e.g. //nodeName[@leafName=leafValue] .
+     */
+    XPATH_HAS_DESCENDANT_WITH_LEAF_VALUES,
+    /**
      * Xpath leaf value cps path query type e.g. /cps-path[@leafName=leafValue] .
      */
     XPATH_LEAF_VALUE
diff --git a/cps-ri/src/main/java/org/onap/cps/spi/repository/FragmentRepository.java b/cps-ri/src/main/java/org/onap/cps/spi/repository/FragmentRepository.java
index eb2e82b..b896fe8 100755
--- a/cps-ri/src/main/java/org/onap/cps/spi/repository/FragmentRepository.java
+++ b/cps-ri/src/main/java/org/onap/cps/spi/repository/FragmentRepository.java
@@ -1,7 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020-201 Nordix Foundation. All rights reserved.
- *  Modifications Copyright (C) 2020 Bell Canada. All rights reserved.
+ *  Modifications Copyright (C) 2020-2021 Bell Canada. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -66,4 +66,11 @@
     // Above query will match the anchor id and last descendant name
     List<FragmentEntity> getByAnchorAndXpathEndsInDescendantName(@Param("anchor") int anchorId,
                                                                  @Param("descendantName") String descendantName);
+
+    @Query(value = "SELECT * FROM FRAGMENT WHERE anchor_id = :anchor AND xpath LIKE CONCAT('%/',:descendantName) "
+        + "AND attributes @>  :leafDataAsJson\\:\\:jsonb", nativeQuery = true)
+    // Above query will match the anchor id, last descendant name and all parameters passed into leafDataASJson with the
+    // attribute values of the requested data node eg: {"leaf_name":"value", "another_leaf_name":"another value"}​​​​​​
+    List<FragmentEntity> getByAnchorAndDescendentNameAndLeafValues(@Param("anchor") int anchorId,
+        @Param("descendantName") String descendantName, @Param("leafDataAsJson") String leafDataAsJson);
 }
diff --git a/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsDataPersistenceQueryDataNodeSpec.groovy b/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsDataPersistenceQueryDataNodeSpec.groovy
new file mode 100644
index 0000000..6a0a6f4
--- /dev/null
+++ b/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsDataPersistenceQueryDataNodeSpec.groovy
@@ -0,0 +1,174 @@
+/*
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2021 Nordix Foundation
+ *  Modifications Copyright (C) 2021 Pantheon.tech
+ *  Modifications Copyright (C) 2021 Bell Canada.
+ *  ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *  SPDX-License-Identifier: Apache-2.0
+ *  ============LICENSE_END=========================================================
+ */
+package org.onap.cps.spi.impl
+
+import com.google.common.collect.ImmutableSet
+import com.google.gson.Gson
+import com.google.gson.GsonBuilder
+import org.onap.cps.spi.CpsDataPersistenceService
+import org.onap.cps.spi.FetchDescendantsOption
+import org.onap.cps.spi.exceptions.CpsPathException
+import org.onap.cps.spi.model.DataNode
+import org.onap.cps.spi.model.DataNodeBuilder
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.test.context.jdbc.Sql
+import spock.lang.Unroll
+
+import static org.onap.cps.spi.FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS
+import static org.onap.cps.spi.FetchDescendantsOption.OMIT_DESCENDANTS
+
+class CpsDataPersistenceQueryDataNodeSpec extends CpsPersistenceSpecBase {
+
+    @Autowired
+    CpsDataPersistenceService objectUnderTest
+
+    static final Gson GSON = new GsonBuilder().create()
+
+    static final String SET_DATA = '/data/fragment.sql'
+    static final String XPATH_DATA_NODE_WITH_DESCENDANTS = '/parent-1'
+
+    static DataNode existingDataNode
+    static DataNode existingChildDataNode
+
+    def expectedLeavesByXpathMap = [
+            '/parent-100'                      : ['parent-leaf': 'parent-leaf value'],
+            '/parent-100/child-001'            : ['first-child-leaf': 'first-child-leaf value'],
+            '/parent-100/child-002'            : ['second-child-leaf': 'second-child-leaf value'],
+            '/parent-100/child-002/grand-child': ['grand-child-leaf': 'grand-child-leaf value']
+    ]
+
+    static {
+        existingDataNode = createDataNodeTree(XPATH_DATA_NODE_WITH_DESCENDANTS)
+        existingChildDataNode = createDataNodeTree('/parent-1/child-1')
+    }
+
+    static def createDataNodeTree(String... xpaths) {
+        def dataNodeBuilder = new DataNodeBuilder().withXpath(xpaths[0])
+        if (xpaths.length > 1) {
+            def xPathsDescendant = Arrays.copyOfRange(xpaths, 1, xpaths.length)
+            def childDataNode = createDataNodeTree(xPathsDescendant)
+            dataNodeBuilder.withChildDataNodes(ImmutableSet.of(childDataNode))
+        }
+        dataNodeBuilder.build()
+    }
+
+    def static treeToFlatMapByXpath(Map<String, DataNode> flatMap, DataNode dataNodeTree) {
+        flatMap.put(dataNodeTree.getXpath(), dataNodeTree)
+        dataNodeTree.getChildDataNodes()
+                .forEach(childDataNode -> treeToFlatMapByXpath(flatMap, childDataNode))
+        return flatMap
+    }
+
+
+    @Unroll
+    @Sql([CLEAR_DATA, SET_DATA])
+    def 'Cps Path query for single leaf value with type: #type.'() {
+        when: 'a query is executed to get a data node by the given cps path'
+            def result = objectUnderTest.queryDataNodes(DATASPACE_NAME, ANCHOR_FOR_DATA_NODES_WITH_LEAVES, cpsPath, includeDescendantsOption)
+        then: 'the correct data is returned'
+            def leaves = '[common-leaf-name:common-leaf value, common-leaf-name-int:5.0]'
+            DataNode dataNode = result.stream().findFirst().get()
+            dataNode.getLeaves().toString() == leaves
+            dataNode.getChildDataNodes().size() == expectedNumberOfChidlNodes
+        where: 'the following data is used'
+            type                        | cpsPath                                                          | includeDescendantsOption || expectedNumberOfChidlNodes
+            'String and no descendants' | '/parent-200/child-202[@common-leaf-name=\'common-leaf value\']' | OMIT_DESCENDANTS         || 0
+            'Integer and descendants'   | '/parent-200/child-202[@common-leaf-name-int=5]'                 | INCLUDE_ALL_DESCENDANTS  || 1
+    }
+
+    @Unroll
+    @Sql([CLEAR_DATA, SET_DATA])
+    def 'Query for attribute by cps path with cps paths that return no data because of #scenario.'() {
+        when: 'a query is executed to get datanodes for the given cps path'
+            def result = objectUnderTest.queryDataNodes(DATASPACE_NAME, ANCHOR_FOR_DATA_NODES_WITH_LEAVES, cpsPath, FetchDescendantsOption.OMIT_DESCENDANTS)
+        then: 'no data is returned'
+            result.isEmpty()
+        where: 'following cps queries are performed'
+            scenario                           | cpsPath
+            'cps path is incomplete'           | '/parent-200[@common-leaf-name-int=5]'
+            'leaf value does not exist'        | '/parent-200/child-202[@common-leaf-name=\'does not exist\']'
+            'incomplete end of xpath prefix'   | '/parent-200/child-20[@common-leaf-name-int=5]'
+    }
+
+    @Unroll
+    @Sql([CLEAR_DATA, SET_DATA])
+    def 'Cps Path query using descendant anywhere and #type (further) descendants.'() {
+        when: 'a query is executed to get a data node by the given cps path'
+            def cpsPath = '//child-202'
+            def result = objectUnderTest.queryDataNodes(DATASPACE_NAME, ANCHOR_FOR_DATA_NODES_WITH_LEAVES, cpsPath, includeDescendantsOption)
+        then: 'the data node has the correct number of children'
+            DataNode dataNode = result.stream().findFirst().get()
+            dataNode.getChildDataNodes().size() == expectedNumberOfChildNodes
+        where: 'the following data is used'
+            type      | includeDescendantsOption || expectedNumberOfChildNodes
+            'omit'    | OMIT_DESCENDANTS         || 0
+            'include' | INCLUDE_ALL_DESCENDANTS  || 1
+    }
+
+    @Unroll
+    @Sql([CLEAR_DATA, SET_DATA])
+    def 'Cps Path query using descendant anywhere with %scenario '() {
+        when: 'a query is executed to get a data node by the given cps path'
+            def result = objectUnderTest.queryDataNodes(DATASPACE_NAME, ANCHOR_FOR_DATA_NODES_WITH_LEAVES, cpsPath, OMIT_DESCENDANTS)
+        then: 'the correct number of data nodes are retrieved'
+            result.size() == expectedXPaths.size()
+        and: 'xpaths of the retrieved data nodes are as expected'
+            for(int i = 0; i<result.size(); i++) {
+                result[i].getXpath() == expectedXPaths[i]
+            }
+        where: 'the following data is used'
+            scenario                                  | cpsPath             || expectedXPaths
+            'fully unique descendant name'            | '//grand-child-202' || ['/parent-200/child-202/grand-child-202']
+            'descendant name match end of other node' | '//child-202'       || ['/parent-200/child-202','/parent-201/child-202']
+    }
+
+    @Unroll
+    @Sql([CLEAR_DATA, SET_DATA])
+    def 'Cps Path query using descendant anywhere ends with yang list containing %scenario '() {
+        when: 'a query is executed to get a data node by the given cps path'
+            def result = objectUnderTest.queryDataNodes(DATASPACE_NAME, ANCHOR_FOR_DATA_NODES_WITH_LEAVES, cpsPath, OMIT_DESCENDANTS)
+        then: 'the correct number of data nodes are retrieved'
+            result.size() == expectedXPaths.size()
+        and: 'xpaths of the retrieved data nodes are as expected'
+            for(int i = 0; i<result.size(); i++) {
+                result[i].getXpath() == expectedXPaths[i]
+            }
+        where: 'the following data is used'
+            scenario                       | cpsPath                                                                          || expectedXPaths
+            'one attribute'                | '//child-202[@common-leaf-name-int=5]'                                           || ['/parent-200/child-202','/parent-201/child-202']
+            'trailing "and" is ignored'    | '//child-202[@common-leaf-name-int=5 and]'                                       || ['/parent-200/child-202','/parent-201/child-202']
+            'more than one attribute'      | '//child-202[@common-leaf-name-int=5 and @common-leaf-name="common-leaf value"]' || ['/parent-200/child-202']
+            'attributes reversed in order' | '//child-202[@common-leaf-name="common-leaf value" and @common-leaf-name-int=5]' || ['/parent-200/child-202']
+    }
+
+    @Unroll
+    @Sql([CLEAR_DATA, SET_DATA])
+    def 'Cps Path query error scenario using descendant anywhere ends with yang list containing %scenario '() {
+        when: 'a query is executed to get a data node by the given cps path'
+            def result = objectUnderTest.queryDataNodes(DATASPACE_NAME, ANCHOR_FOR_DATA_NODES_WITH_LEAVES, cpsPath, OMIT_DESCENDANTS)
+        then: 'exception is thrown'
+            thrown(CpsPathException)
+        where: 'the following data is used'
+            scenario                                  | cpsPath
+            'one of the attributes without value'     | '//child-202[@common-leaf-name-int=5 and @another-attribute"]'
+            'more than one attribute separated by or' | '//child-202[@common-leaf-name-int=5 or @common-leaf-name="common-leaf value"]'
+    }
+}
diff --git a/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsDataPersistenceServiceSpec.groovy b/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsDataPersistenceServiceSpec.groovy
index 24aa3d4..a47bd65 100644
--- a/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsDataPersistenceServiceSpec.groovy
+++ b/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsDataPersistenceServiceSpec.groovy
@@ -24,7 +24,6 @@
 import com.google.gson.Gson
 import com.google.gson.GsonBuilder
 import org.onap.cps.spi.CpsDataPersistenceService
-import org.onap.cps.spi.FetchDescendantsOption
 import org.onap.cps.spi.entities.FragmentEntity
 import org.onap.cps.spi.exceptions.AlreadyDefinedException
 import org.onap.cps.spi.exceptions.AnchorNotFoundException
@@ -61,10 +60,10 @@
     static DataNode existingChildDataNode
 
     def expectedLeavesByXpathMap = [
-            '/parent-100'                      : ['parent-leaf': 'parent-leaf-value'],
-            '/parent-100/child-001'            : ['first-child-leaf': 'first-child-leaf-value'],
-            '/parent-100/child-002'            : ['second-child-leaf': 'second-child-leaf-value'],
-            '/parent-100/child-002/grand-child': ['grand-child-leaf': 'grand-child-leaf-value']
+            '/parent-100'                      : ['parent-leaf': 'parent-leaf value'],
+            '/parent-100/child-001'            : ['first-child-leaf': 'first-child-leaf value'],
+            '/parent-100/child-002'            : ['second-child-leaf': 'second-child-leaf value'],
+            '/parent-100/child-002/grand-child': ['grand-child-leaf': 'grand-child-leaf value']
     ]
 
     static {
@@ -326,65 +325,4 @@
     static Map<String, Object> getLeavesMap(FragmentEntity fragmentEntity) {
         return GSON.fromJson(fragmentEntity.getAttributes(), Map<String, Object>.class)
     }
-
-    @Unroll
-    @Sql([CLEAR_DATA, SET_DATA])
-    def 'Cps Path query for single leaf value with type: #type.'() {
-        when: 'a query is executed to get a data node by the given cps path'
-            def result = objectUnderTest.queryDataNodes(DATASPACE_NAME, ANCHOR_FOR_DATA_NODES_WITH_LEAVES, cpsPath, includeDescendantsOption)
-        then: 'the correct data is returned'
-            def leaves = '[common-leaf-name:common-leaf-value, common-leaf-name-int:5.0]'
-            DataNode dataNode = result.stream().findFirst().get()
-            dataNode.getLeaves().toString() == leaves
-            dataNode.getChildDataNodes().size() == expectedNumberOfChidlNodes
-        where: 'the following data is used'
-            type                        | cpsPath                                                          | includeDescendantsOption || expectedNumberOfChidlNodes
-            'String and no descendants' | '/parent-200/child-202[@common-leaf-name=\'common-leaf-value\']' | OMIT_DESCENDANTS         || 0
-            'Integer and descendants'   | '/parent-200/child-202[@common-leaf-name-int=5]'                 | INCLUDE_ALL_DESCENDANTS  || 1
-    }
-
-    @Unroll
-    @Sql([CLEAR_DATA, SET_DATA])
-    def 'Query for attribute by cps path with cps paths that return no data because of #scenario.'() {
-        when: 'a query is executed to get datanodes for the given cps path'
-            def result = objectUnderTest.queryDataNodes(DATASPACE_NAME, ANCHOR_FOR_DATA_NODES_WITH_LEAVES, cpsPath, FetchDescendantsOption.OMIT_DESCENDANTS)
-        then: 'no data is returned'
-            result.isEmpty()
-        where: 'following cps queries are performed'
-            scenario                           | cpsPath
-            'cps path is incomplete'           | '/parent-200[@common-leaf-name-int=5]'
-            'leaf value does not exist'        | '/parent-200/child-202[@common-leaf-name=\'does not exist\']'
-            'incomplete end of xpath prefix'   | '/parent-200/child-20[@common-leaf-name-int=5]'
-    }
-
-    @Unroll
-    @Sql([CLEAR_DATA, SET_DATA])
-    def 'Cps Path query using descendant anywhere and #type (further) descendants.'() {
-        when: 'a query is executed to get a data node by the given cps path'
-            def cpsPath = '//child-202'
-            def result = objectUnderTest.queryDataNodes(DATASPACE_NAME, ANCHOR_FOR_DATA_NODES_WITH_LEAVES, cpsPath, includeDescendantsOption)
-        then: 'the data node has the correct number of children'
-            DataNode dataNode = result.stream().findFirst().get()
-            dataNode.getChildDataNodes().size() == expectedNumberOfChildNodes
-        where: 'the following data is used'
-            type      | includeDescendantsOption || expectedNumberOfChildNodes
-            'omit'    | OMIT_DESCENDANTS         || 0
-            'include' | INCLUDE_ALL_DESCENDANTS  || 1
-    }
-
-    @Unroll
-    @Sql([CLEAR_DATA, SET_DATA])
-    def 'Cps Path query using descendant anywhere with %scenario '() {
-        when: 'a query is executed to get a data node by the given cps path'
-            def result = objectUnderTest.queryDataNodes(DATASPACE_NAME, ANCHOR_FOR_DATA_NODES_WITH_LEAVES, cpsPath, OMIT_DESCENDANTS)
-        then: 'Only one data node is returned'
-            result.size() == 1
-        and:
-            result.stream().findFirst().get().xpath == expectedXPath
-        where: 'the following data is used'
-            scenario                                  | cpsPath                       || expectedXPath
-            'fully unique descendant name'            | '//grand-child-202'           || '/parent-200/child-202/grand-child-202'
-            'descendant name and parent'              | '//child-202/grand-child-202' || '/parent-200/child-202/grand-child-202'
-            'descendant name match end of other node' | '//child-202'                 || '/parent-200/child-202'
-    }
 }
diff --git a/cps-ri/src/test/groovy/org/onap/cps/spi/query/CpsPathQuerySpec.groovy b/cps-ri/src/test/groovy/org/onap/cps/spi/query/CpsPathQuerySpec.groovy
index 7f558dd..99302a4 100644
--- a/cps-ri/src/test/groovy/org/onap/cps/spi/query/CpsPathQuerySpec.groovy
+++ b/cps-ri/src/test/groovy/org/onap/cps/spi/query/CpsPathQuerySpec.groovy
@@ -1,6 +1,7 @@
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2021 Nordix Foundation
+ *  Modifications Copyright (C) 2020-2021 Bell Canada.
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -56,21 +57,37 @@
         where: 'the following data is used'
             scenario         | cpsPath                  || expectedEndsWithValue
             'yang container' | '//cps-path'             || 'cps-path'
-            'yang list'      | '//cps-path[@key=value]' || 'cps-path[@key=value]'
             'parent & child' | '//parent/child'         || 'parent/child'
     }
 
     @Unroll
+    def 'Parse cps path that ends with a yang list containing #scenario.'() {
+        when: 'the given cps path is parsed'
+            def result = objectUnderTest.createFrom(cpsPath)
+        then: 'the query has the right type'
+            result.cpsPathQueryType == CpsPathQueryType.XPATH_HAS_DESCENDANT_WITH_LEAF_VALUES
+        and: 'the right ends with parameters are set'
+            result.descendantName == "child"
+            result.leavesData.size() == expectedNumberOfLeaves
+        where: 'the following data is used'
+            scenario                  | cpsPath                                            || expectedNumberOfLeaves
+            'one attribute'           | '//child[@common-leaf-name-int=5]'                 ||  1
+            'more than one attribute' | '//child[@int-leaf=5 and @leaf-name="leaf value"]' ||  2
+    }
+
+    @Unroll
     def 'Parse cps path with #scenario.'() {
         when: 'the given cps path is parsed'
             objectUnderTest.createFrom(cpsPath)
         then: 'a CpsPathException is thrown'
             thrown(CpsPathException)
         where: 'the following data is used'
-            scenario                               | cpsPath
-            'no / at the start'                    | 'invalid-cps-path/child'
-            'additional / after descendant option' | '///cps-path'
-            'float value'                          | '/parent-200/child-202[@common-leaf-name-float=5.0]'
-            'too many containers'                  | '/1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/42/43/44/45/46/47/48/49/50/51/52/53/54/55/56/57/58/59/60/61/62/63/64/65/66/67/68/69/70/71/72/73/74/75/76/77/78/79/80/81/82/83/84/85/86/87/88/89/90/91/92/93/94/95/96/97/98/99/100[@a=1]'
+            scenario                                                            | cpsPath
+            'no / at the start'                                                 | 'invalid-cps-path/child'
+            'additional / after descendant option'                              | '///cps-path'
+            'float value'                                                       | '/parent-200/child-202[@common-leaf-name-float=5.0]'
+            'too many containers'                                               | '/1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/42/43/44/45/46/47/48/49/50/51/52/53/54/55/56/57/58/59/60/61/62/63/64/65/66/67/68/69/70/71/72/73/74/75/76/77/78/79/80/81/82/83/84/85/86/87/88/89/90/91/92/93/94/95/96/97/98/99/100[@a=1]'
+            'end with descendant and more than one attribute separated by "or"' | '//child[@int-leaf=5 or @leaf-name="leaf value"]'
+            'missing attribute value'                                           | '//child[@int-leaf=5 and @name]'
     }
 }
diff --git a/cps-ri/src/test/resources/data/fragment.sql b/cps-ri/src/test/resources/data/fragment.sql
index 3c1f793..b6dc2ca 100644
--- a/cps-ri/src/test/resources/data/fragment.sql
+++ b/cps-ri/src/test/resources/data/fragment.sql
@@ -17,14 +17,16 @@
     (4006, '/parent-1/child-1/grandchild-1', 3001, 4004, 1001);
 
 INSERT INTO FRAGMENT (ID, DATASPACE_ID, ANCHOR_ID, PARENT_ID, XPATH, ATTRIBUTES) VALUES
-    (4101, 1001, 3003, null, '/parent-100', '{"parent-leaf": "parent-leaf-value"}'),
-    (4102, 1001, 3003, 4101, '/parent-100/child-001', '{"first-child-leaf": "first-child-leaf-value"}'),
-    (4103, 1001, 3003, 4101, '/parent-100/child-002', '{"second-child-leaf": "second-child-leaf-value"}'),
-    (4104, 1001, 3003, 4103, '/parent-100/child-002/grand-child', '{"grand-child-leaf": "grand-child-leaf-value"}');
+    (4101, 1001, 3003, null, '/parent-100', '{"parent-leaf": "parent-leaf value"}'),
+    (4102, 1001, 3003, 4101, '/parent-100/child-001', '{"first-child-leaf": "first-child-leaf value"}'),
+    (4103, 1001, 3003, 4101, '/parent-100/child-002', '{"second-child-leaf": "second-child-leaf value"}'),
+    (4104, 1001, 3003, 4103, '/parent-100/child-002/grand-child', '{"grand-child-leaf": "grand-child-leaf value"}');
 
 INSERT INTO FRAGMENT (ID, DATASPACE_ID, ANCHOR_ID, PARENT_ID, XPATH, ATTRIBUTES) VALUES
     (4201, 1001, 3003, null, '/parent-200', '{"leaf-value": "original"}'),
     (4202, 1001, 3003, 4201, '/parent-200/child-201', '{"leaf-value": "original"}'),
     (4203, 1001, 3003, 4202, '/parent-200/child-201/grand-child', '{"leaf-value": "original"}'),
-    (4204, 1001, 3003, 4201, '/parent-200/child-202', '{"common-leaf-name": "common-leaf-value", "common-leaf-name-int" : 5}'),
-    (4205, 1001, 3003, 4204, '/parent-200/child-202/grand-child-202', '{"common-leaf-name": "common-leaf-value", "common-leaf-name-int" : 5}');
\ No newline at end of file
+    (4204, 1001, 3003, 4201, '/parent-200/child-202', '{"common-leaf-name": "common-leaf value", "common-leaf-name-int" : 5}'),
+    (4205, 1001, 3003, 4204, '/parent-200/child-202/grand-child-202', '{"common-leaf-name": "common-leaf value", "common-leaf-name-int" : 5}'),
+    (4206, 1001, 3003, null, '/parent-201', '{"leaf-value": "original"}'),
+    (4207, 1001, 3003, 4201, '/parent-201/child-202', '{"common-leaf-name": "common-leaf other value", "common-leaf-name-int" : 5}');
\ No newline at end of file
