Example: Use an expression to add a constraint

Let us imagine a financial institution that wants to send a limit-increase offer to current credit card customers. It wants to omit customers who do not have a strong payment history. Provided data to support the query, Visual Query Builder makes it possible for them to exclude certain credit card customers from the query results by adding expressions—called constraints—to a query.
  1. Drag a Customer entity type onto the workspace, then drag a CreditCard entity type onto the workspace.
  2. Draw a connection between the two entity types and select the "HasAccount" relationship type.
  3. Draw a second connection between the two entity types and select the "Payment" relationship type.
  4. Click this relationship type between the two entity types.
  5. In the Expression Editor, choose the "amount" property and the Greater than operator, enter "1" for the value, and click the plus sign at the end of the row.
When you run the query it will return customers who have credit cards and have made payments of more than $1.
Note: Notice after running a query that a green check now appears next to the relationship type. This denotes that an expression has been tied to the relationship type in the query.