As digital marketers, having a solid understanding of SQL is increasingly becoming a core competency. Why is this so important? So you can ask the right questions needed to derive business insights and optimizations. There are a myriad of database solutions that are available, but they almost always leverage SQL, which is an easy-to-learn language that allows you to both manage and query data. Let’s take a look at the basics of SQL, Google BigQuery, and Google Data Studio.

The Importance of SQL

Many digital marketers rely solely on platform UIs to obtain performance data (i.e. clicks, conversions, and cost). While that is important, there are also certain situations where having a database becomes necessary. One common use case for needing SQL is when data from multiple ad platforms (i.e. Google Ads, Bing Ads, and Facebook Ads) needs to be combined into one report.

Below are a few scenarios where a database and SQL come into play:

  • As mentioned before, Combining multiple platforms into one dataset (i.e. combining Facebook Ads, Google Ads, and Bing Ads data)
  • Reviewing backend CRM data (i.e. Marketo or Salesforce)
  • Analyzing custom business data (i.e. inventory)

Here’s an example of an SQL query that pulls client performance data by account ID, channel, and performance metrics (i.e. clicks, cost, and conversions).

SELECT Publisher_ID, Channel, SUM(Clicks) Clicks, SUM(Cost) Cost, SUM(Conv) Conversions

FROM `my-dataset.Clients.client_performance`

GROUP BY Publisher_ID, Channel


LIMIT 1000

Google BigQuery & Google Data Studio

Google BigQuery lets you store your data in the cloud in a way that is highly flexible and scalable. We leverage Google BigQuery to manage client performance data, allowing us to seamlessly scale client reporting.

If you are using Google Sheets to store client data, we highly recommend transitioning to Google BigQuery. Additionally, Google BigQuery is incredibly cheap to use and is free for the first 10 terabytes (TB) of data.

Google Data Studio is a newer product from Google for data visualization. Despite being new, it already has very competitive functionality with tools that have been around much longer. Being a Google product, it also integrates really simply with BigQuery and common marketing data sources like Google Analytics and Google Ads. It’s free for much of its functionality, and there is also a very active community of data-focused professionals who post pre-built dashboards for common uses like digital marketing that are easy to set up.


Hopefully this blog post has whet your appetite to learn more about SQL, Google BigQuery, and Google Data Studio. Below are some references if you are interested in learning more.