- The Query
- Posts
- š¤ How to pick the right data viz colors šØ
š¤ How to pick the right data viz colors šØ

Read Time: 4 minutes
Hey crunchers! The Query here ā the data newsletter that's like a trusty SQL JOIN for your data career. We help you connect the dots and ensure you're well informed and ready for action.
Hereās what we have for you today:
Learn Window Functions in 3 minutes
How to pick the RIGHT data viz colors šØ
A way to simplify your CASE statements in SQL
Data memes, on memes, on memes š
def learn_data_analysis(šØāš»):
1. Learn Window Functions in 3 minutes šļø
As data analysts, weāre busy people. So we love when things are straight to the point.
No fluff involved.
It teaches you what you need to know about Window Functions in less than 4 minutes.
2. How to pick the right colors for your data visualization šØ
Fine, Iāll say it.
Donāt get me wrong, a good majority of the portfolio projects I see on LinkedIn are well done.
But the color palettes are AWFUL! š«
If you arenāt sure how to choose colors for your visualizations that donāt hurt the viewerās eyes, check out this article.
A Quick Favor to Ask Youā¦
Before we continue with this weekās Query goodness, weāve got a quick favor to ask youā¦
We are working on some material that teaches data analysts how to build great data portfolios that stand out from the crowd and land more interviews.
We want your help. š¤
What are your biggest challenges when it comes to creating portfolio projects?
Please reply directly to this email.
Thanks so much! Now, back to our regular scheduled programmingā¦
select * from dataset-of-the-week
The dataset of the week is the Shop Customer Dataset by Data Scientist Anna!
Itās a real-world dataset and would be great for a portfolio project.
Hereās a preview of the data:

When I look at this data, I see a customer research and segmentation problem.
Hereās an example business problem you can use this dataset to solve:
Say youāre analyzing this data for the Performance Marketing team. They want you to identify customer segments that they can use to target different audiences on LinkedIn with ads. Create audience segments so the marketing team can show more relevant creative.
class MiniLesson:
Simplify Your CASE Statements
Did you know you can simplify your CASE WHEN statements in SQL?
This can make your life a lot easier when you have a lot of conditions.
Here's howā¦
A typical CASE statement for classifying countries would look something like this:

To reformat this in a simpler way you can write it like this:

This simpler approach prevents you from having to write out the entire condition 'country =' for each statement.
Adding little shortcuts like this to your repertoire can make your life as a data analyst much easier!
One caveat is this will only work when your condition is a literal match like column = 'something'. It won't work with other types of comparison like greater than, LIKE, etc.
import memes as š
āThank you LEFT JOIN. Are there any questions for RIGHT JOIN?ā š¦

Thatās it for today.
Stay crunchinā folks and see you next week!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
What'd you think of today's newsletter? |