Skip to main content
Skip table of contents

Comparing Q1 and Q2 Data with Google Cloud BigQuery and RBL Net

Introduction

Welcome to our tutorial on RBL Net, BigQuery, and Google Cloud. In this tutorial, we'll take you through the steps to utilize your RBL Net data and create a query for a comparison of a Q1 and Q2 dataset and visualize the results.

Getting started

Let’s start by ensuring our Google Cloud Project is set up with our RBL Net data. If you don’t have one setup, please refer to HOW TO ADD RBL NET DATA TO A ANALYTICS HUB TUTORIAL.

As always let's start by writing a basic query to review the structure of your data go to the left-side menu, click on BigQuery, and click on Compose a New Query.

Follow these steps

CODE
SELECT *

FROM `analytics-hub-public-access.my_first_listing.avalanche_block`

LIMIT 1000;

From there let’s type the following to filter the Q1 data
 SELECT *

FROM `analytics-hub-public-access.my_first_listing.avalanche_block`

WHERE date_column >= '2023-01-01' AND date_column < '2023-04-01';

After getting the data from Q1 let’s now get the data from Q2 and type the following

SELECT *

FROM `analytics-hub-public-access.my_first_listing.avalanche_block`

WHERE date_column >= '2023-04-01' AND date_column < '2023-07-01';

Now let’s get to the last part so we can compare these two data points from Q1 and Q2 and type these

SELECT

SUM(CASE WHEN date_column >= '2023-01-01' AND date_column < '2023-04-01' THEN metric_column END) AS q1_metric,

 SUM(CASE WHEN date_column >= '2023-04-01' AND date_column < '2023-07-01' THEN metric_column END) AS q2_metric

FROM `analytics-hub-public-access.my_first_listing.avalanche_block`;

After these, we can visualize your data in a spreadsheet by clicking on “Explore Data” and then on “Explore with Sheet” 

Last but not least, you can also explore with Looker Studio by going to the bottom side again and clicking on “Explore Data” and then on “Explore with Looking Studio”

Thanks for reading through this tutorial and I hope it was helpful. If you have any questions make sure to contact us so we can help you and your team.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.