Hi, I'm Jamal Hansen

Technical deep dives into SQL, Python, and AI development. I document what I learn building with data and language models.

Join Python developers learning SQL — new tutorial every Monday

Latest Articles

HAVING: Filtering Grouped Results

When I first encountered HAVING, I thought, “Why do we need this? It’s just like WHERE.” Then I tried filtering on COUNT() and hit a strange error. That’s when it clicked: HAVING filters after …...

March 16, 2026 · 3 min · Jamal Hansen

T-SQL Tuesday #196 - What career risks have you taken?

Invitation from James Serra I found T-SQL Tuesday just in time for this first post, and I’m looking forward to participating. What career risks have you taken? The year was 1997. I was delivering …...

March 10, 2026 · 4 min · Jamal Hansen

GROUP BY: Aggregating Your Data

Last week, we learned to use WHERE to efficiently return only the rows that we want from a database. But what if you want to summarize the data more efficiently? It turns out that you can have the …...

March 9, 2026 · 5 min · Jamal Hansen

WHERE: Filtering Your Data

We have come a long way in the past couple of months, working through the core SQL keywords. So far, we can SELECT columns, specify FROM where our data lives, and ORDER BY to sort results. That is …...

March 2, 2026 · 5 min · Jamal Hansen