Hi Ismail,
If the results of the two queriers match depends on the data you use.
Consider a SalesOrderHeader object associated with following two customers:
This SalesOrderHeader will not be retrieved by the first query, because there is no link to a *single* SalesTerritory with both matching CountryRegionCode and SalesYTD
This SalesOrderHeader will be retrieved by the second query, because there is a link to a SalesTerritory with matching CountryRegionCode and with *another* SalesTerritory with matching SalesYTD.
I hope this helps.
The first Xpath constraint returns all SalesTerritories where CountryRegionCode is 'US' AND where SalesYTD exceeds 4000000 (BOTH must be true); the second one returns all SalesTerritories where RegionCode is US and all SalesTerritories where SalesYTD exceeds 4000000; So the second result list might comprise SalesTerritories where CountryCode is NOT 'US' (but exceeds 4000000), and SalesTerritories where SalesYTD are below 4000000 (but CountryCode is 'US')