Find an Answer
PQL recognizes the AND operator in the same way SQL does, adding more conditions to the clause in which it is used. When used in the WHERE clause, for example, AND narrows the query by making the predicate more specific:
SELECT system/(name, computed_class) FROM /network/device WHERE interface/name = 'eth0' AND interface/mac_address = '01:01:02:03:04:05'
The first three lines in this query request data about devices that have interfaces named 'eth0'. The AND operator in the fourth line adds another condition, so that devices with interfaces named 'eth0' match only if they also have the specified MAC address.
When run against Sample Database A, this query produces the following results:
row system/(name, computed_class) item name 5627 computed_class printer