Create queries that compare two fields of the same data type (date, integer, etc.).
For example, you may want to compare the date of a pipe clean task to the date of a CCTV inspection, to ensure a pipe was inspected after cleaning. Or you could compare the length of a CCTV inspection to the length the pipe to identify partial inspections.
To compare two fields:
Remember that you will only be able to select fields that have the same data type as the first field you selected.
Using the 'days since' operator in a comparison
The days_since operator (which can be used with date fields) will look for records that are dated within the specified number days of each other.
For example, in the rule below, the query will look for assets that have an inspection dated within 7 days (before or after) of a pipe repair.