For any existing View, a Querymay be used to return a subset of data from the View. When an application issues a Queryagainst a View, only data defined by the Viewis returned. Data not included in the Viewbut included in the original AddressSpaceis not returned.
The Query Servicessupports access to current and historical data. The Servicesupports a Clientquerying a past version of the AddressSpace. Clients may specify a ViewVersionor a Timestampin a Queryto access past versions of the AddressSpace. OPC UA Query is complementary to Historical Access in that the former is used to Queryan AddressSpacethat existed at a time and the latter is used to Queryfor the value of Attributesover time. In this way, a Querycan be used to retrieve a portion of a past AddressSpaceso that Attributevalue history may be accessed using Historical Access even if the Nodeis no longer in the current AddressSpace.
Serversthat support Queryare expected to be able to access the AddressSpacethat is associated with the local Serverand any Views that are available on the local Server. If a Viewor the AddressSpacealso references a remote Server, query may be able to access the AddressSpaceof the remote Server, but it is not required. If a Serverdoes access a remote Serverthe access shall be accomplished using the user identity of the Clientas described in 5.5.1.