• The Query
  • Posts
  • 🤓 What to Do When Data is Missing

🤓 What to Do When Data is Missing

Hello fellow data cruncher!

The Query here 👋

Here’s what we have for you today:

  • How to handle missing data 📊

  • SUMIFS in SQL 👨‍💻

  • New open data jobs 💼

  • A couple classic memes 🤣

select * from data-jobs

remote, data jobs

Open to exploring new job opportunities?

We cultivate the best data analyst jobs from around the internet to make your search easier.

Check out this week’s featured jobs here.

  1. Data Analyst @ Scan.com — $110-125k per year

  2. Sr. Performance Marketing Analyst @ Connexity — $105-135k per year

  3. Analytics Manager @ Salad and Go — $150k per year (est.)

freelance gigs

Need work experience? Get real experience with real projects.

  1. Excel Data Analyst — $intermediate (apply here)

  2. Help with a DAX formula — $100 fixed price (apply here)

  3. Build Excel Tool — $100 fixed price (apply here)

def content_spotlight(🔦):

How do you handle missing data?

When you’re working with a new dataset, a common problem is missing data.

So what is an analyst to do?

Alvira Swalin wrote an excellent guide on how to handle missing data.

Check it out here or just study the visual below:

class SQLMiniLesson:

How to Do SUMIFS in SQL

Kyle here 👋 — SUMIFS is my favorite Excel function.

But what if you want to do something similar in SQL?

In SQL, the combination of the CASE statement within the SUM function can be used to achieve functionality similar to SUMIFS in Excel.

The first time I saw that you could put a CASE statement inside a SUM, it blew my mind. 🤯

The CASE statement allows you to apply conditional logic within the aggregation function.

This lets you sum the values based on specific criteria.

Suppose we have a table named sales with the following data:

We want to calculate the total quantity sold for product_id 1, but only for completed sales. In this case, we can use a CASE statement within the SUM function to apply the necessary conditions:

In this example, the CASE statement checks if the product_id is 1 and if the sale_status is 'Completed'.

If both conditions are met, it returns the quantity value; otherwise, it returns 0.

The SUM function then adds up the returned values, giving us the total quantity sold for product_id 1 with completed sales.

Using a CASE statement within a SUM function allows you to perform conditional aggregations similar to SUMIFS in Excel.

Hope you put this to good use!

P.S. By the way, I will be coming out with a Youtube video on this topic soon! Stay tuned!

import memes as 😂 

content & resources 🤓 

1. Youtube Channel: Click here for Videos on SQL and data analytics.

2. Become a Data Analyst Guide: Our full guide on what it takes to land a job as a data analyst.

3. Open Data Analyst Jobs: Find your next data job here!

4. Download our SQL Cheatsheet as a PDF and desktop wallpaper here.

5. LinkedIn: We create content on LinkedIn daily. You can follow Cody here and Kyle here.

That’s it for today.

Stay crunchin’ folks and see you next week!

— Kyle

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

What'd you think of today's newsletter?

Login or Subscribe to participate in polls.