Use the Salesforce Object Query Language (SOQL) to construct simple but powerful query strings for the queryString parameter in the query() call. Similar to the SELECT command in Structured Query Language (SQL), SOQL allows you to specify the source object (such as Account), a list of fields to retrieve, and conditions for selecting rows in the source object.
Use the following topics to understand the components of a SOQL SELECT, their syntax and usage: