Now that we have understood the SiGNAL syntax, we want to learn how we can code within SAP Signavio Process Intelligence.
Watch the following video to see how to create a widget with a basic query using SiGNAL.
Now, let's get into our questions. We want to use SiGNAL to obtain results on our orders and customers. Continue below to review the questions.
- What's the total order amount of all cases?

- What's the average order amount from standard customers?

- Which City has the Most Orders, split by Type of Goods? Show it in a stacked bar chart.

SiGNAL Expressions
| Expression | Definition | Example |
|---|---|---|
| Arithmetic | With the arithmetic operators, you can execute mathematical operations with numeric values. | Add, Subtract, Multiply, Divide, Modulo
|
| Comparison | Comparison operators can be used in filters to determine which records to select. | Less than, Greater than, Less than or equal to, Greater than or equal to, Equal to, Not equal to |
| Logical | A logical expression connects Boolean expressions using logical operators and can be evaluated to return a true or false value. |
|
| Conditional | Conditional expressions return values dependent on the evaluation of Boolean conditions. | SELECT IF(condition, then, else) or SELECT IF(country='DE', 1.19, 1.0) * price |
| Literal | A literal is a fixed value of a certain type. SIGNAL supports literals of several different types. |
|
Note
SiGNAL - Order By and Limit Clauses
The Order By function helps you sort the result set based on specific criteria, allowing you to organize data in a meaningful way. The Limit function enables you to control the number of records displayed in the result set, ensuring you focus only on the most relevant data.

SiGNAL - Alias
Aliases help you assign temporary names to columns in your result set, making them easier to read and understand. This is especially useful when applying aggregate functions in a query.
Without an alias, the system automatically generates a name based on the column and the operations used in the expression. By using aliases, you can create clear and meaningful column headings, improving the readability of your query results.

Subquery
A subquery is a query that is nested inside a SELECT statement, or inside another sub query. You can use a sub query anywhere an expression is allowed to retrieve data on event-level.
They differ in terms of the level at which they operate and the type of data they provide.
- General subqueries operate at case level and return tables.
- Event-level subqueries operate at event level and return scalar values.

Note
DATE_TRUNC
DATE_TRUNC can be used to limit timestamps to specific units of time by removing detailed information. This simplifies timestamps to broader time units such as: year, quarter, month, weekday, hour, minute, second, or millisecond.

NOW()
NOW() helps calculate the duration between the current time and a given timestamp.

DURATION
DUATION allows you to evaluate whether a duration meets or exceeds a specified threshold. Supports time-based string formats like: '3weeks', '4days', '3hours', '5minutes', '6seconds', and '7milliseconds'.





