Overview
In addition to variable subsetting, RDS also supports comprehensive and complex record subsetting. This is done though the where
parameter. The where clause is similar to that of a relational database where users can specify logical operations that will be evaluated to subset the data set.
Supported Where Functions
Name | Operator |
---|---|
Greater than or equal to | >= |
Greater than | > |
Equal to | = |
Less than | < |
Less than or equal to | <= |
Not equal to | != |
Like a particular value | like |
Matches a regular expression | matches |
On this page:
Step By Step
- Begin with a simple select query.
Simple Where Clauses
Users may specify a where clause to filter the records as follows.
Where VAR1 is Greater Than or Equal to 1http://{host}/rds/{collection}/{view}/select?where=VAR1>=1
Where VAR1 is Greater Than 1http://{host}/rds/{collection}/{view}/select?where=VAR1>1
Where VAR1 is Equal to 1http://{host}/rds/{collection}/{view}/select?where=VAR1=1
Where VAR1 is Less Than 1http://{host}/rds/{collection}/{view}/select?where=VAR1<1
Where VAR1 is Less Than or Equal to 1http://{host}/rds/{collection}/{view}/select?where=VAR1<=1
Where VAR1 is Not Equal to 1http://{host}/rds/{collection}/{view}/select?where=VAR1!=1
Where VAR1 Starts With 1http://{host}/rds/{collection}/{view}/select?where=VAR1 like '1%25'
Where VAR1 is Matches a Two Digit Number Starting With 1http://{host}/rds/{collection}/{view}/select?where=VAR1 matches '[1][0-9]'
Where Clauses With Logical Operators
Individual filtering parameters can be combined with logical operators AND or OR.
Where VAR1 Equals 1 and VAR2 Does Not Equal 1 or VAR3 Equals 2http://{host}/rds/{collection}/{view}/select?where=(VAR1=1 AND VAR2!=1) OR VAR3=2