Home » sql

sql

Using ‘PARTITION BY’ in BigQuery to calculate the share per group

  • by
  • 3 min read

In this blog post we’ll calculate the share of a row per group. There are multiple ways to do this: with aggregate functions and with analytic functions. We’ll go over both and demonstrate how analytic functions are far superior in terms of readability. First, let’s create a table to demonstrate… 

Dataform: Create if incremental table doesn’t exist (JS)

  • by
  • 2 min read

One of Google’s latest acquisitions, ELT data orchestration tool Dataform, supports JavaScript. This is a great way to chain Dataform’s actions. In this blog post we explore how to automatically create a destination table in your data warehouse, before an incremental definition is run. If you are interested in a… 

Subtracting dates in BigQuery SQL

  • by
  • 2 min read

In this blog post, I elaborate on two specific operations you’ll run into when using dates in BigQuery. Subtracting an interval from a data and calculating the difference between two dates. Subtracting a unit Subtracting a specific amount of days, weeks, months, quarters, or years from a date can be… 

Connect cumul.io to a MySQL Database

  • by
  • 4 min read

Being a little bit bored with the default visualization tools in R and Python, I decided to look into the available visualization tools that are out there in the data ecosystem. The Belgian visualization tool cumul.io focusses on integration in platforms, but it also seems like a solid entry-level visualization…