Learn about some of the key differences between Structured Query Language (SQL) and TrackTik Query Language (TQL).
In this article
Overview
TQL is used to write queries in Data Lab. If you used SQL in the past, you might notice it’s quite similar to TQL. This article compares some of the notable differences between the two languages. When you understand TQL better and build on the information you know, you can create insightful reports to show your most important key performance indicators in Data Lab.
Comparing SQL to TQL
In the comparison table, you can see some of the key differences between the two languages:
SQL | TQL |
---|---|
Uses wildcards. For example, uses |
Doesn’t use wildcards. For example, doesn’t use |
Uses the JOIN keyword to combine information from two different tables. |
Uses relation categories that have elements and dot notation, so you don’t need to use the |
Has a set foundation of functions. | Has many of the same functions as SQL, but not all of them. There is a slight difference to the syntax structure, too. TQL can do TrackTik-specific queries. |
Uses casting to convert one type of data to another. For example, 5 starts as an integer or number, and can be cast to a string. | Doesn’t use casting. |
Uses variables. You can save data in the variables to use the data elsewhere in a query. For example: DECLARE @TestVariable AS VARCHAR(100) |
Variables aren’t supported. |
Uses aliases to change column names. For example,Select firstName as 'first name' . |
Supports |
Allows you to update, edit, and delete information. | Uses only Select operations, so you don’t need to do any updating, editing, or deleting; the focus is to pull information from a source that already exists. |
Uses subqueries (sometimes called nested selects). For example: SELECT Ord.SalesOrderID, Ord.OrderDate, |
Doesn’t use subqueries. |
Comments
Article is closed for comments.