惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

月光博客
月光博客
Stack Overflow Blog
Stack Overflow Blog
L
LangChain Blog
Jina AI
Jina AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
雷峰网
雷峰网
T
Tailwind CSS Blog
MongoDB | Blog
MongoDB | Blog
博客园 - 【当耐特】
博客园 - 聂微东
V
Visual Studio Blog
博客园_首页
Engineering at Meta
Engineering at Meta
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The Cloudflare Blog
人人都是产品经理
人人都是产品经理
Apple Machine Learning Research
Apple Machine Learning Research
阮一峰的网络日志
阮一峰的网络日志
Microsoft Security Blog
Microsoft Security Blog
GbyAI
GbyAI
F
Fortinet All Blogs
C
Check Point Blog
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
day 01 of learning data engineering (step1: sql joins and...
nain · 2026-06-15 · via DEV Community

nain

So, yes. Today's goal is to get the 30hr SQL Bootcamp completed (or at least as much as I can), I am following Data with Baara. Who gets a 5 on 5 for clearing my doubts before I even know I have them (what kind of superpower is that?).

context: So I already knew the bare basics of SQL as it was a course I had to take in my pre-final year, but it was not on par with what is required of a DE. So I revised the things that I already knew and speed ran through it.


Joins (the ones they don't tell you about)

If you are also a beginner like me who had not dwelled too deep, you may think there exists only four types of JOINs (the big four: LEFT, RIGHT, INNER, FULL) but no, because when have things ever been this simple. We have moreeee. And they are:

Right Anti, Left Anti, Full Anti and Cross Join.

Now, Anti Joins are interesting. The "anti" here is not anti-the-named-side — it is anti-the-join-itself. You are not excluding the left table, you are keeping only the rows from the left that found no match on the right. The lonely ones. The ones that got ghosted.

  • Left Anti → rows in the left table with no match in the right
  • Right Anti → rows in the right table with no match in the left
  • Full Anti → the unmatched ones from both sides

And the fun part? They are not even a separate keyword in most SQL dialects. You get there by combining a JOIN with a WHERE clause filtering for NULLs. LEFT JOIN + WHERE right_table.id IS NULL = Left Anti. The pattern is the thing.

Cross Join on the other hand is a greedy little beast — it wants a pair of everything. Every row from table A matched with every row from table B. No conditions, no chill. 100 rows × 50 rows = 5,000 rows, just like that. Powerful when you need it, catastrophic when you forget it is running on a large table.


Set Operators (the rules nobody writes down in one place)

After joins, we moved to Set Operators — UNION, UNION ALL, INTERSECT and EXCEPT.

The concept is simple enough. But Baara being Baara, he made sure we actually understood the rules before touching the syntax. And there are more rules than you'd expect:

  1. Columns must match — you cannot combine apples and oranges
  2. Data types must match — apples and slightly-different-apples also don't work
  3. Same number of columns across both queries
  4. Order of columns matters — col1 of query one maps to col1 of query two, so if you mix up the order you mix up your data silently, which is the worst kind of wrong
  5. Column names come from the first query — so whatever you alias in query one is what shows up in your result
  6. ORDER BY only at the end, on the last query — you are sorting the final combined result, not each individual one

The difference between UNION and UNION ALL trips a lot of people — UNION deduplicates, UNION ALL keeps everything including duplicates. For DE work UNION ALL is usually what you actually want because deduplication is expensive and you often want to handle it explicitly downstream anyway.


Plan for tomorrow: Date & Time functions + keep pushing through the bootcamp.

See you on Day 02. 👋