SQL

In the marketing automation field, the term SQL has two different meanings: it can either mean Sales Qualified Lead or Structured Query Language. For businesses, the first is the one they often need (especially in the B2B context), and the latter is what they try to avoid as much as possible. 

I started my marketing automation career in 2011 with Adobe Campaign (then Neolane), which used SQL to create target groups. The tool had a feature that allowed non-technical folks to create target groups without writing any SQL, but its performance could have been better. Quite often, that logic was rewritten by hand using optimized SQL.

Over ten years later, SQL and its variants are still crucial in my daily job. Also, when discussing marketing technology expertise, in a world where the amount of data is enormous and used for different actions and insights, understanding SQL is still essential. 

SQL is a significant part of my daily work as a Salesforce Marketing and Data Cloud consultant. Even if some tools allow users to easily create segments or target groups, most complex target groups and insights are often built with SQL. 

In Marketing Cloud, the SQL syntax is based on MS SQL syntax, while Core SF doesn’t have SQL but SOQL, which is like a variant of SQL with some limitations and differences.

When going to more advanced products, which include Data Cloud, the number of SQL dialects rises: Calculated Insights uses Spark SQL, and Query API uses Trino SQL. When data is moved to a Data Lake or Data Warehouse like Google BigQuery or Snowflake, they have their own dialects again. 

The good news is that the SQL syntax doesn’t vary much between dialects, and with proper SQL training, you can use any of the dialects. 

But who should be able to write SQL, and who not? My experience is that many marketers, for example, don’t want to write SQL. Plenty of tools in the market allow users to use easy-to-use user interfaces for target group creation instead of giving them direct database access using SQL. Can you fully utilize tools like Calculated Insights Builder without any SQL knowledge?

Let’s ignore that SQL can be written with AI tools quite easily.

The need for SQL queries in marketing and CRM should be as little as possible. Those who can write SQL and create processes that act directly with the data should make the data as accessible as possible and make sure that those who are not familiar with SQL don’t have to write it at all.

In Marketing Cloud, this would mean that the data architecture is planned in a way that marketers can do most of the targeting in Journey Builder with ease. In practice, this would imply that entry events are correctly configured, and there are automatically updated target groups for newsletters and other recurrent campaigns.

Segmentation should be the primary tool for targeting in the Data Cloud, but Calculated Insights needs more considerations: who should write them? How complex formulas are required? These are questions that organizations need to solve. 

Marketers should utilize as ready data products as possible without diving into the SQL world. Data engineers’ and technical marketers’ expertise should be packed into reusable and easy-to-use solutions.