count — aggregate function to return the count of rows that match the query's predicate.
The count() function with no arguments returns the number of rows that meet the query predicate conditions. When used with an optional expression argument, count() includes those rows for which the expression evaluates to a non-null value.
This example shows how to issue a dynamic aggregation query that counts the number of values in a column.
In LiveView Desktop connected to a server running the Hello LiveView sample, select the ItemsSales table from the Tables pane of the LiveView Tables view.
In the Select field, enter:
count(if (quantityRemaining < 10) then true else bool()) as lowInventory
Make sure the Query field is empty.
The query results open in a grid view. The count aggregate updates when the number of rows returned by the query changes.
This LiveView aggregate function is based on the count aggregate function in the StreamBase expression language.