There is an undocumented API on the Salesforce Sales Cloud element that lets you pass an SOQL query directly to Salesforce. CEQL (Cloud Elements Query Language) supports, for the most part, the most basic functionality of SQL. Typically something like this:

select * from Account where Name = 'TestAccount'

Salesforce actually supports much more than this. Such as aggregate functions like count(Id) and even INNER JOIN and OUTER JOIN.

See this documentation for what salesforce supports:

On Cloud Elements, you can use this extra querying functionality through the GET /query api.
The syntax is as follows:

GET /query?q=SELECT count(Id) FROM Contact WHERE name = 'test'&page=1&pageSize=200

GET /query?q=SELECT Amount, Id, Name, (SELECT Quantity, ListPrice, PricebookEntry.UnitPrice, PricebookEntry.Name FROM OpportunityLineItems) FROM Opportunity

This API is undocumented because, you will not be able to easily use a transformation on the data that comes back, and this api will not be standardized to the hub. In other words, this will only ever work for Salesforce.