function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nishanth Kadiyala 9Nishanth Kadiyala 9 

What is the difference between SOQL and SAQL?

Raj VakatiRaj Vakati
SOQL 

Use the Salesforce Object Query Language (SOQL) to construct simple but powerful query strings in the queryString parameter in the query() call, in Apex statements, in Visualforce controllers and getter methods, or in the Schema Explorer of the Force.com IDE.
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. SOQL uses the SELECT statement combined with filtering statements to return sets of data, which may optionally be ordered.

For Example 
Select Id ,Name from Account 

SAQL 
Use SAQL (Salesforce Analytics Query Language) to access data in Analytics Cloud datasets. Analytics Cloud uses SAQL behind the scenes in lenses, dashboards, and explorer to gather data for visualizations. Users don’t write SAQL statements, they use the UI and the app makes the queries.


For Example

q = load "0Fcc00000004DI1CAM/0Fd500000004F4sCAE"; q = group q by all; q = foreach q generate count() as 'count', unique('OL.Helpful') as 'unique_OL.Helpful'; limit q 2000;


https://developer.salesforce.com/docs/atlas.en-us.bi_dev_guide_eql.meta/bi_dev_guide_eql/bi_eql_statements.htm
Nishanth Kadiyala 9Nishanth Kadiyala 9
Thank you, Raj. I can imagine how an object gets created in Saleforce. How about an analytics cloud dataset? Is that also an object? What really constiutes a dataset. Also, do you know in which cases can I use only SOQL vs only SAQL vs either SOQL or SAQL? I am trying to understand the concept first, before the technology itself. Thank you for your time, by the way!
Raj VakatiRaj Vakati
https://help.salesforce.com/articleView?id=bi_integrate_datasets.htm&type=5

SOQL is Used to query the records 



SAQL (Salesforce Analytics Query Language) to access data in Analytics datasets. Analytics uses SAQL behind the scenes in lenses, dashboards, and explorer to gather data for visualizations.

 dataset is a collection of related data that is stored in a denormalized, yet highly compressed form.

Use the Salesforce Object Query Language (SOQL) to search your organization’s Salesforce data for specific information. SOQL is similar to the SELECT statement in the widely used Structured Query Language (SQL) but is designed specifically for Salesforce data.