Page History
...
Use this function to retrieve the number of instances for the specified entities or attributes.
Syntax
Code Block |
---|
COUNT(collection) |
- collection - A collection of attribute or entity instances.
Return type
- integer
Examples
Suppose the following data model.
Instance | Person.name |
---|---|
1 | “John” |
2 | “Dave” |
3 | “Jane” |
4 | “Lisa” |
Instance | House.rooms |
---|---|
singleton | “living room”, “bathroom”, “bedroom” |
- COUNT(ALL Person) results in 4
- COUNT(House.rooms) results in 3
- COUNT(ALL Person + ALL House) results in 5
- COUNT(COLLECT Person FROM ALL Person WHERE(Person.name = “Lisa”)) results in 1
- COUNT(? (= UNKNOWN)) results in UNKNOWN
UI Text Box | ||
---|---|---|
| ||
SIZE and COUNT are similar except for ?: SIZE(?) = 0 |
Overview
Content Tools