TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial…

Member-only story

Shaping Your Data with SQL

Improve & optimize your data analytical process with different techniques for data shaping

Chi Nguyen
TDS Archive
Published in
9 min readApr 18, 2023

--

Photo by OB OA on Unsplash

Why is Data Shaping?

There is no one-size-fits-all data. For different purposes and used cases, data is customized accordingly. The more you are aware of the intended use of data afterward, the more equipped you will be to correctly present your data to the end users.

For example, the data utilized to undertake in-depth analysis differ from the aggregated data provided to upper management.

Another example, the business development team is more concerned with the overall cost per area to convert new users than the marketing managers are with affiliate marketing costs, which they want to look at specifically by region.

That being said, transforming existing data structures into any alternative pivoted or unpivoted structure is an indispensable step in any data manipulation and analytical process.

In this article, I will introduce a few techniques to shape and slice your data in some specific cases. Usually, I will present my examples with PostgreSQL.

Now, let’s start to see what we’ve got!

Data

--

--

TDS Archive
TDS Archive

Published in TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Chi Nguyen
Chi Nguyen

Written by Chi Nguyen

MSc in Statistics. Sharing my learning tips in the journey of becoming a better data analyst. Linkedin: https://www.linkedin.com/in/chinguyenphamhai/

Responses (3)