The Filter window contains advanced options to provide additional flexibility for filtering in a query. The Advanced Filter Options provide the ability to add user-defined SQL to the filter condition as well as the ability to create a SubQuery or import a list of filter definitions into the Filter window as demonstrated in the Chapter 2, Filters section.
The Custom SQL filter option allows the user to leverage SQL to create a custom-defined filter in the Filter window. When the Custom SQL button is clicked from the Filter window, the field definition of the filter is shown in the editable textbox as shown in the following screenshot:
While adding Custom SQL to the interface, both the left and right-hand side of the operator can be edited to drive the desired outcome. A very common and useful example of using Custom SQL in a Filter is to leverage dynamic date functions for queries that need to be run on multiple occasions for a constant duration...