Records are stores in collection. The SQL AND & OR operators are also used to combine multiple conditions. Part of the reason for that is because Full Text Search (FTS) is the recommended alternative. AFTER is the default when FOR is the only keyword specified. ID = c. 243. Thus, if heap is a concern either use SOQL for loops or even a batch (which can handle even larger amounts of data since the whole query process gets split across multiple, separate transactions against the server). I used the following in my WHERE clause, and it works as a replacement that operates the same as LAST_N_DAYS is documented as expecting to work. Execute a SOQL Query or SOSL Search. You can instead resolve the variable field into a string and use the string in your dynamic SOQL query: String resolvedField1 = myVariable. SOQL is much simpler and more limited in functionality than SQL. then it returns the row. 3. Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn,. Access tools for developing in a lightweight, extensible VS Code editor. Learn to prevent SOQL injection attacks. What would the syntax be for the following requirement in SOQL? 1. Use. field1__c; List<sObject> sobjList = Database. SELECT Id, Name from Account WHERE. There is a way to get this information without using a single query by using SObjectDescribe. getLimitQueryRows() to disable the SOQL querys if required. The following table lists the comparisonOperator values that are used in fieldExpression syntax. An index makes it much faster to filter queries. This is a fruit table. queryWithBinds (string, bindVariablesMap, accessLevel); The Database. While this can be accomplished with SOQL, SOQL queries are a precious resource and we have but a scant few in each transaction. This works: Map<Id, Account> accounts = new Map<Id, Account> ( [SELECT Id, Name FROM Account]); Because the return type from the SOQL is that of Account. For example, in the clause [ORDER BY fieldOrderByList [ASC | DESC] [NULLS {FIRST | LAST}]] , ASC, DESC, or the NULLS clause cannot be used without. MySQL being a relational database, is. In SQL, counting all records in an empty dataset returns 0. From that, you can create a new DateTime with the DateTime. No code required. ACID compliance. queryWithBinds methods can be used wherever an inline SOQL query can be used, such as in. VS Code Extensions. This post & video explained about to Execute SOQL in Visual Studio Code: From Command Palette (Ctrl+Shift+P) -> Type Execute SOQL and Select “ SFDX: Execute SOQL Query with Currently Selected Text “, results appear in the Output panel as highlighted. Tip 10: Minimize the usage of any query hint. The SQL AND Operator. There is another solution: Delta copy from a database with a control table; but it is dedicated to Azure SQL Database and doesn't take into consideration other Data. The query is: SELECT CronJobDetail. For example, if Test_c is a boolean field. Select count () From ProcessInstance where. These two operators can be combined to test for multiple conditions in a SELECT, INSERT, UPDATE, or DELETE statement. The BETWEEN operator selects values within a given range. MySQL updates frequently as it is a piece of software. There is no combination of LIKE & IN in SQL, much less in TSQL (SQL Server) or PLSQL (Oracle). The IN operator returns true if a value is in a set of values or false otherwise. where clause with includes. Here we have to see if any filter, when considered. Note that the value bound has to be a simple variable reference (e. 0. I have already tried limiting - using the query LIMIT function - the numbers of records returned by my. Sorted by: 11. However, you cannot perform arbitrary SQL. Format your SQL. COUNT () and COUNT (Id) in SOQL are similar to COUNT (*) in SQL. Id, a. 1. What is an UPSERT and how. Find examples of Salesforce SOQL inquiries compared to SQL searches syntax: DISTINCT, SELECT, JOIN, COUNT, UPDATE and others. Use the GROUP BY ROLLUP optional clause in a SOQL query to add subtotals for aggregated data in query results. Selection means which rows are to be returned. In some circumstances, for example with a. First thing first, LIMIT 1 has nothing to do with the limit of 200 SOQL queries in one batch transaction. JobType = 'bla bla' AND CronJobDetail. MySQL provides a large range of reporting tools to aid application validity, but NoSQL databases lack analytical and performance testing reporting tools. Performance on Time: (1172 row (s) affected) SQL Server Execution Times: CPU time = 0 ms, elapsed time = 39 ms. MySQL. to identify "this is a fruit table" as one word/item Access somehow needs to evaluate/know that the variable name is one word or its a variable name and not a text. soql file. You use a self join when a table references data in itself. You can use the GROUP BY option in a SOQL query to avoid iterating through individual query results. For example, you can’t use SOQL to perform arbitrary. You can write and execute a SOQL query in Apex code or in the Developer Console’s Query Editor. When a given. . If you've come from a relational database background and are new to Salesforce, this article should give you a beginning comparison between Structure Query. Salesforce Object Query Language (SOQL) is an Application Programming Interface (API) used to search partner organization’s Salesforce data. Returns : It returns the integer value. com's database query language, similar to SQL. List<sObject> sobjList = Database. Say hello to a faster, more intuitive way to query your data. The limit for subqueries corresponds to the value that Limits. SQL vs SOQL. They are based on a. WHERE. ORDER BY. If you would like to suggest a feature, create a feature request on GitHub. Approch 2 - Use Count SOQL to check if any records exists in the system or not as follows -. If there are no rows then it will return TRUE, otherwise FALSE. Eclipse, Visual Studio, Salesforce developer console, etc. 2. Access tools for developing in a lightweight, extensible VS Code editor. SELECT Name, (SELECT FirstName,LastName FROM Contacts) FROM Account. For example, you could use the AVG () aggregate function to find the average. Apex doesn’t use SQL but uses its own database query language, SOQL. Find examples of Salesforce SOQL queries compared to SQL queries grammar: DISTINCT, PICK, JOIN, CALCULATION, UPDATE both others. For example, if Test_c is a boolean field. Let’s add the contact details of three. Change the name of the table to Custom SQL Query as depicted below. SOQL and SOSL have distinctive files. SOQL. Contact c ON (a. To see it in action, and learn more about the future of Developer Tools on Salesforce, tune into DreamTX on December 17 for the “Everything New in Salesforce Developer Tools” episode. query or Database. Understanding the differences between SOQL and SQL is crucial for anyone working with Salesforce data, as it will help you to effectively retrieve and manage data in your database. The purpose of semi-join queries is to restrict the records returned not selecting related records, thus using ORDER BY or LIMIT makes no sense in this case. List<sObject> sobjList = Database. There you can define GraphQL schema in json-format file, it's sort of mapping GraphQL fields to table/table columns. The following query returns the distinct set of values stored in the LeadSource field. If it's used in Apex code it's limited to the total governor limit for SOQL rows, which is currently 50,000. There are advantages and disadvantages to each approach, but from a learner perspective, this difference isn't too. Both Oracle and SQL Server FTS implementations support the CONTAINS keyword, but the syntax is still slightly different:SQL injection, also known as SQLI, is a common attack vector that uses malicious SQL code for backend database manipulation to access information that was not intended to be displayed. Click File > Save to. To query the data and get information for both people in one row, you could self join like this: select e1. addDays (-4) bit)Connect to Salesforce Objects from Power Query Online. Aggregate Functions. com organization. REST APIs typically have multiple endpoints and return a lot more data than necessary for users. It works on multiple objects at the same time. SQL Commit and Rollback. != is a binary operator that returns true if its two arguments are not equal to each other. On the other hand, static queries are faster, more secure, more reliable. SQL is a standard language that enables the user to design and manage databases. Start your 28-day free trial. Access tools for developing in a lightweight, extensible VS Code editor. x. But what’s the best way to access the data? SOQL is the popular query language for Salesforce. In a way, I guess that SOQL is closer to an Object-Relational Mapper (ORM) like Hibernate (Java) or Doctrine (PHP) than it is to SQL itself. Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Resource-intensive scaling. Queries using SODA. Before we start writing. SOQL is syntactically similar to SQL (Structured Query Language). Aggregate functions include AVG (), COUNT (), MIN (), MAX (), SUM (), and more. With SQL, the wildcards are: ['%'] A substitute for zero or more characters. リレーションクエリやリレーションを含む数式項目は大変便利ですが SOQL で多用した場合パフォーマンスへの影響を考慮する必要があります。. Notice that only the partial name of the department Specialty Crisis Management is included in the query. +1 I just ran into this with SQL Server. Use the WITH SECURITY_ENFORCED clause to enable field- and object-level security permissions checking for SOQL SELECT queries in Apex code, including subqueries and cross-object relationships. SELECT pets. 1. Q. Right-click the file name, select Open With, then SOQL Builder. Here’s what you need to know. However, SQL may be better suited for accessing data for analytics. According to syntax, if your variable is a list or set, you'd expect the value to be "IN" the. Each language has a distinct use case: Use SOQL to retrieve records for a single object. The risks are much lower for SOQL injection than for SQL injection, but the attacks are nearly identical to traditional SQL. After you try out SOQL Builder, check out our GitHub repo to send us feedback. Improve this answer. It is primarily used when enterprises have built a custom User Interface (UI) for Salesforce while using different modules (data is recorded and then arranged by Salesforce). SQL Injection in Salesforce is called SOQL Injection. 4. Guess I can use Limits. You'd think the optimizer would be smart enough to recognize the equivalence, but it's apparently not. As a reminder, if you have one or more selective filters in your SOQL, the query optimizer can use that as the leading filter, so your query will perform well even if you have a non-optimal LastModifiedDate filter defining the upper boundary of a date range. For the query you are running, you could use this: SELECT MSDS FROM dbo. NAME. Here is the output where we will get the desired results: GROUP BY Clause. Agility. While most developers are SQL-literate, there are small but important distinctions between SOQL and SQL. If you're looking for the value of a single variable, then it would make sense that the operator would be "equal" to the value of the specified variable, it wouldn't be "IN" the variable as if your query has to sort among a group of records. tbl WHERE (col LIKE 'str1' OR col LIKE 'str2') AND col2 = num. Also, there doesn't seem to be. Salesforce Object Query Language (SOQL) is an Application Programming Interface (API) used to search partner organization’s Salesforce data. Because they allow a dynamic schema for unstructured data, there’s less need to pre-plan and pre-organize data, and it’s easier to make modifications. Notice that when you select a field in the Query Builder, the Query Builder automatically inserts the field API name into the SOQL query. 5 Answers. For example: SELECT COUNT (Id) FROM Account WHERE Name LIKE 'a%'. January 6, 2020. Name = 'ZS_Lead' AND CreatedDate = Today]; Both the SOQL statements above do the same thing - Get a list of Lead records of a particular record type. Copy value from a picklist in Product to Opportunity via OpportunityLineItems on update or insert. Adding a bit of info here on top of other answers. Query 2: SELECT Id FROM Account WHERE Name != ''. Also, a SOQL query must include WITH UserId = {userId]. 1 In a SOQL query with parent-child relationship subqueries, each parent-child relationship counts as an extra query. These features, combined with the core VS Code capabilities, the extension marketplace and the integrated terminal make this. リレーションクエリやリレーションを含む数式項目は大変便利ですが SOQL で多用した場合パフォーマンスへの影響を考慮する必要があります。. ZERO Case: We defined it as zero, Child is born but of zero age. g. Salesforce Extensions for VS Code Sample query in SOQL Builder in VS Code. クエリ結果に大量のレコードが含まれると予想される場合、soql クエリに offset 句を使用して結果を複数ページに表示できます。たとえば、offset を使用して 51 ~ 75 番目のレコードを表示した後、スキップして 301 ~ 350 番目のレコードを表示できます。offset を使用すると、大きな結果セットを. In almost all situations SQL databases are vertically scalable. According to syntax, if your variable is a list or set, you'd expect the value to be "IN" the. A WHERE with NOT negates the specified condition. SOQL is Salesforce’s proprietary programming language that’s used to query data directly from your Salesforce. You can use this folder to save all of your SOQL queries. the below command will output CSV to the file. The first part of the WHERE clause maps easily between SQL and SOQL. So:The SOQL Query Builder is delivered as a VS Code extension. Part of the reason for that is because Full Text Search (FTS) is the recommended alternative. When your filter uses != or NOT—which includes using NOT EQUALS/CONTAINS for reports, even if the field is indexed—the Force. country,count(Contact. is better to be aware of only one name (singular) instead of two (singular class, plural table, singular field, singular-plural master-detail. Select the Production URL if you use the Salesforce production URL ( to sign in. Generally speaking, null values should be rare, and you should treat them as such. SQL is one of the most popular query languages. No server-side overhead is needed to parse GraphQL, reducing runtime. There is little consistency in database products. Simplify development and build automation with a command-line interface. In some circumstances, for example with a. SQL databases have a predefined structure that requires the data to conform to a specific schema. Database & . Obviously Cast (TextField as Integer) does NOT work. Input type Output type and length; 1. Write query on the parent object to query the associated child records also. Hi, Like i posted above wht is the difference between using Schema. There must be a way to combine the results of one query with the results of a second query. In terms of writing speed, MySQL is slower than MongoDB in the beginning, but gradually becomes faster than. Working with Polymorphic Relationships in SOQL Queries A polymorphic relationship is a relationship between objects where a referenced object can be one of several different types. Example. 開発者コンソールのクエリエディターを使用すると、組織のデータに対して soql クエリまたは sosl 検索を実行できます。soql クエリは、データベース内の単一のオブジェクトまたは複数の関連オブジェクトからデータを取得します。データベースにデータが追加された直後に soql クエリを実行. There are advantages and disadvantages to each approach, but from a learner perspective, this difference isn't too. I believe you need WHERE ( (page LIKE 'str1') OR (page LIKE 'str2')) USE % at the Start and End of the String. Note that these two has different syntax and functionality support, do not mix it. Relationship queries are similar to SQL joins. While the TOTAL length of a SOQL query must be less than 20,000 characters, the WHERE clause can only be 4,000 characters. When copying data from Salesforce, you can use either SOQL query or SQL query. SOQL is used for getting the data of a. See here: SOQL: Performing Query with both LIKE & IN. In terms of a direct comparison to the VLOOKUP function in Excel, the LEFT OUTER JOIN type is the equivalent in SQL. To create a dynamic SOQL query at run time, use the Database. The = operator is used with Where Clause in SQL. Adrian Larson ♦. queryWithBinds methods, in one of the following ways. VS Code Extensions. 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. Let’s try running the following SOQL example: In the Developer Console, click the Query Editor tab. // The general expression to use is // Schema. This includes NULL values and duplicates. " T-SQL executes statements in a "procedural" way, meaning that the code will be processed as a block, logically and in a structured order. Gaining an understanding of these operators will allow you to write better queries and demonstrate to potential. SQL is known for speed and volume. The UNION ALL command combines the result set of two or more SELECT statements (allows duplicate values). The LIKE operator in SOQL and SOSL supports escaping of special characters % or _. Incident update and uptime reporting. Currently serving as a Salesforce Developer at Health Stream in Nashville, TN, Rahul specializes in developing interactive. 1. About the. So recently while working on VS Code I tried the SOQL Query Builder an in this blog I will share my experience with you and I hope it will help you to understand it better. vs. What is the difference between SQL and SOQL? Ask Question Asked 5 years, 10 months ago Modified 5 years, 10 months ago Viewed 2k times -2 Can any one explain the difference between SQL (Structured Query Language) and SOQL (Salesforce Object Query Language)? I need to convert dynamic SQL query into SOQL query using C# . The ‘NOT EXISTS’ operator in SQL Server will check the Subquery for rows existence. SQL's greatest advantage is its ability to combine data from. No server-side code/library is required to parse GraphQL, reducing development time. number : It is a numeric value. To summarize, SOQL is a query language specifically designed for use with the Salesforce platform, while SQL is a general-purpose query language that can be used with a variety of data models and databases. Data retrieval inconsistency. Similar to the SELECT command in SQL, with SOQL, you can specify the source object, a list of fields to retrieve. 10 Answers. while = expects only one value, its as simple as. COMMIT and ROLLBACK are performed on transactions. Each course is interactive, and the exercises are based on real-world scenarios. Using CTRL + click (Windows) or CMD + click (Mac), select the Email, Name, and Languages__c fields. 3. SOQL vs. Developer tools e. Relationship queries traverse parent-to-child and child-to-parent relationships between objects to filter and return results. SQL is a language used to query data from a general database. Name, con. SQL's greatest advantage is its ability to combine. SOQL queries can include comparison operators, such as =, <, >, IN, and LIKE in the field expression of a WHERE clause, which you use in a SELECT statement. Key differences. Sorted by: 4. The SQL AND condition and OR condition can be combined to test for multiple conditions in a SELECT, INSERT, UPDATE, or DELETE statement. The performance of the SOQL query improves when two or more filters used in the WHERE clause meet the mentioned conditions. No. Child Custom Object Name :- Object_Guest_House__c. b) An existing picklist value is updated. In a grouped query, SQL returns a group for null values in a grouped query by default. The FuseIT SFDC Explorer has an option to export SOQL query results as CSV. Using CTRL + click (Windows) or CMD + click (Mac), select the Email, Name, and Languages__c fields. For SOSL search results with multiple objects, each object is displayed on a separate tab. As of SQL-92: An SQL-statement is a string of characters that conforms to the format and syntax rules specified in this international standard. Non-SQL ย่อมาจาก Non-relational database บางท่านอาจจะเรียกว่า Not only SQL ก็ไม่ได้ผิดแต่อย่างใด. SObjectType. Saltar a contenido principal. Follow. The query will use the Child Custom Object Plural Label. Whenever I do this, though, I get the following error: System. リレーションクエリについて. Search in single sObject and it retains records. Aggregate functions in SOQL, such as SUM () and MAX (), allow you to roll up and summarize your data in a query. The Salesforce extensions for VS Code include a number of extensions that add a wide range of productivity features to the VS Code user interface. The Apex parser first evaluates the local variable in code context before executing the SOQL or SOSL statement. Objective In this Salesforce tutorial, we will see SOQL vs SOSL. This code: select City, CNT=Count (1) From Address Where State = 'MA' Group By City. The Salesforce object model and the SOQL query language form the foundation of working with Salesforce data. This query does both: SELECT id, owner. A SOQL query is the equivalent of a SELECT SQL statement, and a SOSL query is a programmatic way of performing a text-based search. The selectivity threshold is 10% of the records for the first million records and less than 5% of the records after the first million records, up to a maximum of 333,000 records. SELECT * FROM Student WHERE ADDRESS='Delhi' OR ADDRESS='ROHTAK'; 2. List<Lead> leads = [Select Id, Name, LeadSource, OwnerId From Lead Where RecordType. Format your SQL. In this article, Robert Sheldon explains how to choose between SQL and NoSQL databases. SOQL-- I need this soql query to be written in such a way that it gives the same output as below sql query SELECT Account. We looked at 4 different types of join clauses. 7. SQL stands for Structured Query Language, invented as a standard high-level interface for most databases, usually used as DDL and DML for the management of relational database management systems (RDBMS). then "a, b, c" is the projection part, "where x=3" the selection part. Rahul Rawat is a Salesforce Developer and Business Analytics enthusiast. e. This Query Formatter helps to beautify your SQL data instantly. Dynamic SQL is a programming technique that enables. To sum up: SOQL vs SQL SOQL. For starters, SOQL is a language exclusively for querying the database rather than modifying data like in traditional SQL. In API version 58. Before we go toward the practical example, let me explain to you the available list of Convert date formats. houseId = h. The Apex parser first evaluates the local variable in code context before executing the SOQL or SOSL statement. In this blog post, we will guide you on these. Find examples for Salesforce SOQL queries compared to SQL queries syntax: DISTINCT, SELECT, JOIN, COUNTED, RENOVATE and others. In can match a value with more than one values, in other words it checks if a value is in the list of values so for e. One of the main differences between SOQL and SQL is that SOQL is. 3-If you want to return Id, and some other field value whenever Some_Field__c field value is empty or null. Therefore Access uses [] to encapsulate the word so it can evaluate its content. Difference between SOQL and SQL query syntax. Define how SOQL differs from SQL. Access tools for developing in a lightweight, extensible VS Code editor. Convert SQL DATE Format Example. Database. September 29, 2014. Approch 2 - Use Count SOQL to check if any records exists in the system or not as follows -. So Union is much better than the Union All with Distinct in performance-wise. This does not work: Map<Id, Account> accounts = new Map<Id, Account> (Database. By default, a new project has a folder scripts/soql that contains an example accounts. The AI assistant trained on your company’s data. NoSQL databases allow you to add new attributes and fields, as well as use varied syntax across. Which may work but based on. Yes as Jerry said in salesforce there is no such thing like If or case in SOQL rather you can use either where clause and create a particular condition use AND, OR, NOT , or Like to filter over a set of records from a particular object or you need to filter records by iterating them by a loop. To create a dynamic SOQL query at run time, use the Database. for (variable_list : [soql_query]) { code_block } Both variable and variable_list must be of the same type as the sObjects that are returned by the soql_query. The Schema Explorer is a tool for browsing the objects and fields in a Force. It is used along with the WHERE clause of the UPDATE, DELETE and SELECT statements, to filter the rows based on the given pattern. 2. SQL databases are relational databases that use a tabular schema to organize data in rows and columns. Select Salesforce objects from the product-specific data connector list, and then select Connect. By default, a new project has a folder scripts/soql that contains an example accounts. In each relationship, the parent is counted as the first level of the query and. 6,574 5 30 56. I do not understand whats wrong with the. In SOQL statements, Inner and Outer Joins are used to join related objects like parent object and child objects to retrieve all related fields from base objects including the records of non refer related object. This use of a local code variable within a SOQL or SOSL statement is called a bind. COUNT (ALL <expression>) evaluates expression for each row in a group, and returns the number of nonnull values. They are specified in T-SQL statements and make the optimizer select the execution plan based on this hint. I am wondering if it is a personal choice or best practice to get a list of Leads based on. SOSL returns fields from database using FIND keyword. It supports all the basic programming languages like C, C++, Perl, PHP, Python, and Ruby. CONTAINS is a totally different function, it is a predicate based query for full-text columns; it is not a function to determine if a column contain a string in it. SOQL vs SOSL – Speed. Hive Query Language (HiveQL): HiveQL is a query language for Hive to analyze and process structured data in a Meta-store. Of course, it CAN be used for querying – but it can also be used to create database components. And then you have one more at the beginning on EmailTemplate, so 201, like @RobertWatson said. I'm sure that will be easy. ). Please read following link for more details and syntax. CRM Analytics uses the ANSI SQL interface to access. In other relational database systems the names of the extensions and the additional features are different. In SAQL, it returns an empty response. ignoreTabSettings: Whether to ignore VSCode user/workspace settings for tabSize and insertSpaces. For more information on aggregate functions, see Aggregate Functions in the Salesforce SOQL and SOSL Reference Guide. Feb 16. Because SOQL uses objects, instead of the tables and rows that are in standard SQL, SOQL query types are limited. SOQL is used for getting the data of a particular object and its related objects. SQL stands for Structured Query Language, and it is a query language used to manage and manipulate data stored in a database. The former is standard and the latter is. The vulnerable example above can be re-written using static SOQL as follows:SQL (pronounced interchangeably as “sequel” and “S-Q-L” in the industry) is a query language that allows coders to find, change or otherwise manipulate information in relational databases. The LIKE operator is used in a WHERE clause to search for a specified pattern in a column. SOQL and SOSL statements in Apex can reference Apex code variables and expressions if they’re preceded by a colon (: ). It is NULL. The WHERE clause can contain one or many AND operators. Query 3: SELECT Id FROM Account WHERE Name != '' AND CustomField__c = 'ValueA'. From the Command Palette, run SFDX: Create Query in SOQL Builder. As we’ve seen, it’s important to use the correct one to make sure the results you get are complete. SQL Injection in Salesforce is called SOQL Injection. We’re not going to lie. The SQL AND & OR operators are also used to combine multiple conditions. [ (charlist)] Sets and ranges of characters to match. You can use a GROUP BY clause without an aggregated function to query all the distinct values, including null, for an object. No server-side code/library is required to parse GraphQL, reducing development time. To be fair, the first site I checked made it sound like it was vastly different and has a comparison query of 'select column a from table' ok n T-SQL = 'column a from table' in PostgreSQL. Faster than SOQL: When if the search expression uses a CONTAINS term. The risks are much lower for SOQL injection than for SQL injection, but the attacks are nearly identical to. Which, in essence is the same as the SOQL. . SELECT Id, Name, (SELECT Name From Contacts) FROM. The problem is that I need to compare two fields of different types in a SOQL query. SELECT Id FROM SomeObject__c WHERE Cast (TextField as Integer) > IntField. In databases, LEFT JOIN does exactly that. SOQL is similar to the SELECT statement in the widely used Structured Query Language (SQL) but is designed specifically for Salesforce data. In SQL, wildcard characters can be used with the SQL LIKE operator. ] Use the FIELDS () keyword in the fieldList to select groups of fields without knowing. 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.