Skip to content
SQL & Beyond

SQL & Beyond

  • home
  • featured
    • GitHub: di2-starter-kit
    • Alex Sprogis: AI Coding Starter Kit
    • Pencil’n more
    • Bestes Sohn Seite
  • imprint
  • privacy
  • contact
  • English
    • Deutsch
    • English

Duplicates

Finding Duplicates with SQL — From COUNT(*) > 1 to Composite Keys

2. July 20261. July 2026 by marcus

GROUP BY … HAVING count(*) > 1 may be the most-typed SQL snippet in the world — and yet it trips up in two places almost nobody has on their radar: composite keys and NULL. When it comes to missing values in a unique column, SQL Server and Postgres disagree — one allows exactly one NULL, the other any … Read more

Tags Data Quality, Data Quality Rules, Duplicates, Dynamic SQL

Article Series

  • Data Quality in an ETL Process
  • Data Quality Checks with SQL
  • Data Migration: SQL Server → PostgreSQL
  • AI-Assisted SQL Development
  • Structuring & Formatting SQL
  • SSIS vs. T-SQL

Categories

  • AI & Development (12)
  • Database Deployment (4)
  • SQL & Databases (36)

Latest Posts

  • Data Quality: Dimensions and Error Classes — the Theory Behind the SQL Checks
    Published Jul 2, 2026 · Updated Jul 5, 2026
  • Setting Up a Claude Code Project with a Development Workflow and Database — the Open Starter Kit Explained
    Published Jul 7, 2026 · Updated Jul 22, 2026
  • Skills vs. Rules in Claude Code — What Auto-Loads, What Loads on Demand, and the Context Cost
    Published Jul 6, 2026 · Updated Jul 22, 2026
  • Maximal Template Over Empty Repo — a Claude Code Setup That Prunes Itself via /init
    Published Jul 6, 2026 · Updated Jul 22, 2026
  • I Gave Claude Code 27 Rule Files Instead of One CLAUDE.md
    Published Jul 22, 2026
  • AI-Assisted Coding Gave Me 799 Hardcoded Font Sizes
    Published Jul 17, 2026

Tags

Claude Code (12) Data Migration (7) Data Quality (16) Data Type (6) Developer Workflow (9) ETL Process (5) Formatting (5) PL/pgSQL (5) Postgres (5) PostgreSQL (13) Readability (7) SQL Server (6) SSIS (5) T-SQL (11) TRY_CONVERT (6) Type Conversion (8)

Show all tags

© 2018–2026 Marcus Belz · Imprint · Privacy · Contact · How This Blog Is Made

All tags

AI (1) AI-Assisted Development (2) AI-Assisted Development (1) AI Agents (1) Automation (1) Backfill (1) Change Tracking (1) CI/CD (2) Claude (1) Claude Code (12) Code Quality (1) Comparison (1) Context Management (1) Conventions (2) Database Deployment (4) Data Integration (1) Data Migration (7) Data Quality (16) Data Quality Dimensions (1) Data Quality Rules (4) Data Transfer (1) Data Type (6) Data Type Mapping (1) Design Pattern (4) Developer Workflow (9) Duplicates (1) Dynamic SQL (4) ELT (1) Error Classification (1) ESLint (1) ETL (1) ETL Process (5) Expand/Contract (1) Formatting (5) GitHub Actions (1) Logging (1) Maintainability (3) Naming Convention (4) PL/pgSQL (5) Postgres (5) PostgreSQL (13) Project Setup (1) Project Template (1) Prompt Engineering (1) Readability (7) Referential Integrity (1) Schema Evolution (3) Schema Migration (3) Source Control (1) SQL Server (6) SSIS (5) SSIS vs. SQL (4) Stored Procedure (1) T-SQL (11) Table Design (1) Theory (1) TRY_CONVERT (6) Type Conversion (8) Validation (1) Verification (1)