Audience definition

The FROM clause defines the intended audience, which can be as simple as specifying the dataset or using operators to build relationships between multiple datasets.

Specifying an audience in this way allows our platform to understand what you are trying to achieve, so any loss of quality in the results caused by poor information or overlaps can be highlighted. Please see the quality metrics article for an in-depth explanation of query quality.

In the SELECT clause article, insight and activation queries were discussed separately, as the syntax is differently for the SELECT clause. For every other clause, the syntax is the same.

Reference a published dataset

To specify the dataset, after the SELECT clause, simply write:

FROM mydataset

So, it would look something like this:

SELECT COUNT()

FROM mydataset

Build relationships with operators

If you want to, you can select the union, intersection or exclusion of datasets by using operators. The diagram below shows how they can be used to define an exact audience.

 

To use the operators, write something like this:

Union 

FROM A Union B

Intersection

FROM A Intersect B

Exclude

FROM A Exclude B

You can also use multiple operators at once, for example:  

FROM (A Union B) Exclude C
FROM A Intersect (B Exclude C)

The operators are evaluated from left to right, except when parentheses are used which can be used to change the order.

Next steps

After the SELECT and FROM clauses, there are three optional clauses available: