- The Query
- Posts
- 🤓 Pandas in 10-min, SQL tips, and laughs await
🤓 Pandas in 10-min, SQL tips, and laughs await

GM data crunchers. This is The Query — the data newsletter that's like a WHERE clause for your data career. We help you find what you're looking for and eliminate any unnecessary noise.
Here’s what we have for you today:
Test your window function knowledge 🧠
Learn Pandas in 10-minutes
Portfolio project idea — analyze World Bank data
Exploring a common error in thinking: Survivorship Bias
A hefty dose of hilarity 😆
select * from content-spotlight
1. Think you know your window functions? Give windowfunctions.com a visit and see how you stack up with their quizzes. Master those SQL interview questions about window functions and practice your SQL skills!
2. You know how analytics engineering is like that cool middle ground between data analytics and data engineering? It can be a bit tricky to wrap your head around if you're new to it. But no worries, Madison Mae, Analytics Engineer at Convert Kit, wrote this awesome piece for the Data Analysis Journal that breaks it down.
3. Want to learn the foundations of Pandas super quick? Ditch those long, 6-hour tutorials and go for a snappy 10-15 minute one instead. That way, you won't feel paralyzed by information and you'll actually learn a thing or two!
class LearningResources: 📊
It's time to hit the books, sharpen your pencils, and get ready to crush some numbers ✏️ 🔢
Diving into the world of data can be intimidating — like trying to solve a Rubik's cube blindfolded.
But fear not!
With some discipline, grit, and the right resources, you can master data analytics faster than you can say "pivot table".
Check out the learning resources we have for you this week 👇️
three project-based learning resources
The projects below are ordered from easiest to hardest.
All are beginner friendly 🙂
3. Analyze World Bank Data — P.s. Check out this video on how to download the data.
two technical tips
Technical time…
1. Python Tip 🐍: List Comprehension
If you’ve spent any time learning Python, you know about for loops
and lists
.
But did you know there is a simple way to combine them?
Enter list comprehension — a concise way to create new lists from existing ones.
Here’s an example:
Suppose we have a list of numbers and we want to create a new list with the squares of the even numbers from the original list.
The code below shows how to accomplish this in two ways.
Traditional for loop
List comprehension

Breaking down the list comprehension:
num**2
: This is the expression that calculates the square of each even number.for num in numbers
: This is the 'for' loop that iterates over each element in the 'numbers' list.if num % 2 == 0
: This is the optional 'if' condition that filters the list, ensuring only even numbers are squared.
2. SQL Tip 👨💻: The IF Function in SQL
CASE statements in SQL can get long and hard to read.
In some SQL dialects (e.g. BigQuery), you can use the IF() function as a cleaner alternative.
Here’s an example:
Suppose we have the following employees table:

We want to add a column indicating if an employee is younger than 40 or not.
The code below shows how to write that with both CASE and IF().

The IF() function takes three arguments: a condition, the value to return if the condition is true, and the value to return if the condition is false.
Cleaner, right?
one tool 🔧
Meet Snappify.
Have you ever wondered how we create slick-looking snapshots of SQL and Python code in our newsletter (like the screenshot below)?
Yep… we use Snappify.
It’s great any time you’re sharing your code (e.g. portfolio project write-ups, LinkedIn, etc.) and you want it to be visually appealing.
It’s fast and simple to use — plus, you can get really far with just the free version.

def data_jobs(👨💼👩💼):
remote, entry-level data jobs
Remote > in-office.
Donor Data Analyst @ The Trevor Project — $75-90k (apply here)
Data Analyst @ Brookdale Senior Living — $67-85k (apply here)
Data Analyst @ QuinStreet — $80-120k (apply here)
Undergrad Intern @ First American — $18-22/hour (apply here)
Senior Data Project Manager @ firsthand — $140-160k (apply here)
freelance data gigs
Freelancing is a GREAT way to get paid to improve your data analytics skill set.
KPI Dashboard — $30-45 hourly (apply here)
Google Sheets Dashboard — $5-25 hourly (apply here)
Real Estate Data Analysis Project — $10-45 hourly (apply here)
PowerBI Dashboard From Excel — $20-35 hourly (apply here)
import entertainment as fun
meme of the week
😆 😆 😆 😆 😆

survivorship bias
Here's an amazing data story...
During WWII, a group of researchers studied the damage sustained by aircraft after returning from missions.
Their findings led them to recommend adding armor to the most affected areas in order to reduce the number of planes shot down by enemy fire.
However, one mathematician saw the flaw in this thinking…
Abraham Wald realized the study was only conducted on the aircraft that had SURVIVED their missions.
Wald proposed adding armor to areas where returning aircraft showed no damage, as those areas were most vulnerable to enemy fire.
No extra armor was needed for areas with holes, as bombers could still return safely despite damage.
His proposal was a demonstration of how to avoid survivorship bias.

data tok
The Interview vs. On the Job lolz 😹
That’s it for today. Stay crunchin’ folks and see you next week!
Sharing is caring: If you are getting value from The Query, forward it to a fellow data cruncher that might benefit from this content.
They can sign up using this link. 🤓
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
What'd you think of today's newsletter? |