finds.dev← search

// the find

ben-nour/SQL-tips-and-tricks

★ 2,303 · SQL · MIT · updated Nov 2025

SQL tips and tricks

A personal collection of SQL style tips and gotchas, written from the perspective of a data analyst working primarily with Snowflake. It covers formatting conventions, common NULL traps, window function patterns, and a few performance notes. Aimed at SQL beginners to intermediate users who want to avoid the mistakes the author already made.

The NOT IN / NULL trap section is genuinely useful and well-explained — many developers get burned by this and the fix (NOT EXISTS) is shown clearly. The QUALIFY tip is a real timesaver for Snowflake/BigQuery users who don't know it exists. The alias ambiguity section with the GROUP BY column-name-vs-alias gotcha is concrete and non-obvious. The dummy 1=1 WHERE clause pattern is practical for anyone writing iterative ad-hoc queries.

It's almost entirely a README — the repo contains a single placeholder.sql file, so there's nothing to run or test against. Coverage is uneven: Snowflake-specific features get detailed treatment while PostgreSQL, MySQL, and SQLite (all in the topics list) get almost nothing. The performance section is thin and doesn't address indexing, query plans, or EXPLAIN output, which is where most real performance work happens. No updates since late 2025 and the tip count hasn't grown since the repo was created, so it reads more like a blog post that was never expanded than a living reference.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →