COUNT
POST
The COUNT statement is used to count the number of documents matching a criteria.
COUNT statement syntax
COUNT [collection_name]
WHERE [ $where:dict, x=y, ... ]
Query Example
{
"query": "COUNT articles WHERE $where",
"variables": {
"where": {
"location:$in": ["NY", "NC"]
}
}
}
Request
- application/json
Body
query stringrequired
The X-SQL Query string
variables objectrequired
The variables
Responses
- 200
Count response
- application/json
- Schema
- Example (from schema)
Schema
data object
count int32
The count value
{
"data": {
"count": 0
}
}
Loading...