This article details the operators in Brinqa Query Language (BQL) that can be used to specify conditions and perform tasks in a query.
You may come across situations where a query generates unneeded duplicates. This occurs if there are multiple paths of traversal between the entities referenced in the query.
You can use
DISTINCT to only return discrete values or make all values unique before running them through an aggregate function. You can combine the
RETURN keywords to help remove duplicates. For example:
FIND Vulnerability AS v RETURN DISTINCT v.riskRating, count(*)
The above query counts the number of vulnerabilities by their risk rating. Without using
DISTINCT, the query selects all values and may return duplicate results.
You can use the Boolean operators as conjunctions to combine or exclude conditions in a query. The following table describes the Boolean operators in BQL:
Table 1: Boolean Operators
You can use
The comparison operators in BQL work for all attribute types. They compare values and return
You must use the comparison operator symbol (for example,
>) rather than the name of the symbol (
GREATER THAN) in the query. Using names of the operators is not supported.
The following table describes the comparison operators in BQL:
Table 2: Comparison operators
|Not Equal To|
You can use
|Greater Than Or Equals To|
|Less Than Or Equals To|
The attribute operators in BQL can work with any attribute type.
Attribute operators must be used with attributes from the same data model. They cannot be used across different data models.
The following table describes the attributes operators in BQL:
Table 3: Attribute operators
|Equals to Attribute||attribute1 |
|Not Equals to Attribute||attribute1 |
|Greater Than Attribute||attribute1 |
|Less Than Attribute||attribute1 |
|Greater Than or Equals to Attribute||attribute1 |
|Less Than or Equals to Attribute||attribute1 |
|Not Exists||attribute |
Date and Time operators
The date and time operators in BQL can work with attributes whose type is Date, DateTime, Time, or any other calculated attribute that returns these attribute types.
BQL only allows for the date format of
YYYY-MM-DD. For example, 2022-04-20.
The following date and time units are supported. They are not case sensitive and do not need to be wrapped in quotes:
- ms, milli, millis, milliseconds
- s, second, seconds
- minute, minutes
- hour, hours
- day, days
- week, weeks
- month, months
- year, years
The date and time operators are not case sensitive. The following tables describes the date and time operators in BQL:
Table 4: Date and Time operators
|Not In Next|
|Not In Last|
BQL offers a variety of string operators to compare strings stored either as a single string or multi-value field.
BQL only supports using the name of the string operator in a query (for example,
STARTS WITHrather than
The string must be wrapped in double quotes (
The following table describtes the string operators in BQL:
Table 5: String operators
|Does Not Start With|
|Does Not End With|
List operators check if an element exists or does not exist in a list. The following table describtes the List operators in BQL:
Table 6: List operators
|Does Not Contain Any|
|Contains None Of|
Security operators can be used with attributes whose type is related to a user or any calculated attributes that return a user. The following table describes the security operators in BQL:
Table 7: Security operators
|Is Current User|