Member-only story
6 SQL Queries Every Data Engineer Should Be Aware of
It might be more than 45 years old, but SQL still gets the job done

Whether you are a beginner starting your engineering career, or you are an experienced data engineer or data analyst, knowledge of advanced SQL syntax is a must.
With exponential growth in data, it has become more important to analyze these data super quickly.

The units in this graph are zettabytes.
1 zettabyte = 1 trillion gigabytes
And people may say that SQL is dead, but the reality is that there is no system currently to replace it currently. There are many very capable NoSQL stores that do their jobs very well, supporting massive scale out with low costs. However, they don’t replace high-quality SQL-based stores — they complement them. The ACID properties of SQL make it a highly reliable way to model data relatively naturally.
As a data engineer myself, I have been using SQL for a while, and I know the importance of writing complex queries faster. So, here is some advanced SQL syntax that will surely come in handy.
For the below examples, I have used the below table content. The table is called “bill”.

Running Totals
You often come across scenarios where you have to calculate a running total from a table. This is to know what each value is, against a running total.
A running total refers to the sum of values in all cells of a column that precedes the next cell in that particular column.
Here is a query to do that.