Queries are written in action code syntax but some differences.
Queries never use semi-colon terminators unlike in rules, etc.
Equality tests (are two things the same?) always use a == operator (two equals signs). Note: old code examples may use a single '=' and if using copy paste do not forget to double the = to ==.
If it is desired control the order in which different parts of a multi-term query are evaluated, each query term - or sub-groups of query can be enclosed in parentheses, i.e. round brackets '(' and ')'. As with parentheses in a spreadsheet formula, Tinderbox will evaluate the inner-most (most deeply nested) parentheses before working outwards until the whole query is evaluated.
Action code references can be used, i.e. referencing values in another note
$Color("Some other note). In the special case of wanting to reference attribute values in the agent itself, use the 'agent' designator.