SQLise · Data lineage from your SQL

SQLise Blog

Problem-driven articles for data practitioners. Parse faster, trace cleaner, explain clearer, ship safer.

8 min read·2026-04-22
BigQuery vs Snowflake: SQL differences that bite
BigQuery and Snowflake feel similar until you port a query. Here are the dialect differences that cause the most breakage.
bigquery
snowflake
6 min read·2026-04-22
dbt macros that make lineage easier to read
A few small macro habits keep your compiled SQL from turning into spaghetti — and keep lineage tools honest.
dbt
lineage
5 min read·2026-04-22
DISTINCT vs GROUP BY: which one should you use?
DISTINCT looks shorter. GROUP BY survives more edits. Here is the difference that matters in real codebases.
fundamentals
aggregation
5 min read·2026-04-22
PIVOT vs CASE WHEN: which one wins?
PIVOT and CASE WHEN do the same thing in different syntaxes. The right pick depends on dialect support and how dynamic your columns are.
pivot
aggregation
6 min read·2026-04-21
Reading a SQL JOIN: a visual walkthrough
If joins feel like guessing, this is the visual model that makes them click. Five join types, five tiny diagrams, no Venn diagrams.
joins
fundamentals
8 min read·2026-04-22
Reading SQL EXPLAIN plans without panicking
EXPLAIN output is intimidating because it is dense, not because it is hard. Here is the order to read it in, and the three things actually worth fixing.
performance
explain
6 min read·2026-04-22
Recursive CTEs: when to use them and how to keep them sane
Recursive CTEs are the right tool for org charts, BOMs, and graph walks. They are also the easiest CTE to write infinite loops with.
ctes
recursion
7 min read·2026-04-22
Slowly Changing Dimensions Type 2 in plain SQL
SCD2 is the standard way to keep history of dimension attributes. Implementing it correctly takes a careful MERGE plus an INSERT.
modeling
scd
5 min read·2026-04-22
SQL anti-join patterns that don't lie
An anti-join asks 'which rows in A are not in B?' Three idiomatic ways to write it; one common way that breaks on NULLs.
joins
anti-join
5 min read·2026-04-21
SQL GROUP BY mistakes explained with visuals
GROUP BY is the part of SQL most likely to silently lie to you. Here are the five classic ways it goes wrong and how to see them at a glance.
debugging
aggregation
8 min read·2026-04-22
The SQL MERGE statement, deep-dive
MERGE looks declarative but ships footguns. Here are the four bugs every team hits, and the patterns that prevent them.
merge
upsert
6 min read·2026-04-22
SQL NULL semantics, explained without hand-waving
NULL is not zero, not empty string, and not equal to itself. Here is the practical mental model that prevents the most common NULL bugs.
fundamentals
null
7 min read·2026-04-21
How to trace column lineage in Snowflake
Snowflake has built-in object dependencies, but they don't tell you what feeds a specific column. Here are three ways to fix that.
snowflake
lineage
5 min read·2026-04-22
When to use a CTE vs a subquery
CTEs read top-down, subqueries read inside-out. The right choice depends less on style and more on what you need the planner to do.
fundamentals
ctes
6 min read·2026-04-21
Why your SQL is duplicating rows (and how to fix it)
If your row counts mysteriously doubled overnight, the cause is almost always one of four join mistakes. Here is how to spot each one fast.
debugging
joins
6 min read·2026-04-22
Window functions explained visually
Window functions look intimidating because of the syntax, not the idea. Once you see the picture, OVER is just 'compute this across a moving window of rows'.
window-functions
fundamentals