Skip to main content

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

Body

    query stringrequired

    The X-SQL Query string

    variables objectrequired

    The variables

Responses

Count response

Schema
    data object
    count int32

    The count value

Loading...