You are here: API Reference > Calls > query > Zuora Object Query Language

Zuora Object Query Language

Zuora supports a simple SQL-like query language for use with the query call. A basic familiarity with SQL is needed in order to construct queries; therefore, that basic knowledge is assumed in the following discussions.

Syntax

The basic query syntax is

SELECT field_names FROM object
SELECT field_names     FROM object     WHERE     filter_statements
 Note  

Complex queries and joining are not supported.

Case Sensitivity

Although on these pages we use all uppercase on the query commands (for example, SELECT) to make the statements easier to read, queries are not case sensitive except for explicit string values (such as field names, for example).

Field Names

The field_names placeholder represents a list of one or more fields that exist in the object. You cannot use single or double quotation marks on the field names. Use a comma to separate one value from the next; for example,

SELECT AccountId, FirstName, LastName FROM contact WHERE State = 'California'

Objects

The object placeholder represents an object from the Zuora API. Each query can name only one object.

Filter Statements

The filter_statements placeholder represents comparisons being made on different types of data in order to find items matching specified criteria. A filter statement takes the following form:

field_name operator value

For example, the boldfaced section of the following query is a filter statement.

SELECT AccountNumber FROM account WHERE AutoPay != true

The data type of the value must match the field type in the filter statement. Field types are specified in the individual object pages in this documentation.

For more information on filter statements, including the supported operators, see Constructing Filter Statements.

See Also

Filter Statements

Query Statement Examples

Copyright © 2008-2009 Zuora, Inc.