Understand SOQL Queries
SOQL is a query language that’s similar to SQL but designed for Salesforce data. To query data using Salesforce APIs, create a SOQL statement that defines the information you want to search for.
The basic structure of a SOQL statement resembles this example.
For example, this SOQL query returns the value of the Id
, FirstName
, LastName
, and Country
fields for all contacts where the value of the MailingCountry field is NG
. Results are returned in ascending order by LastName
, and then in ascending order by FirstName
. The maximum number of results returned is 25.