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 (10)
  • 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
  • Data Migration: SQL Server to PostgreSQL — the Complete Guide
    Published Jun 29, 2026 · Updated Jul 9, 2026
  • SQL Server vs. PostgreSQL — Pros and Cons for the Switch
    Published Jul 9, 2026
  • Is Claude a Woman or a Man? — and Why We Ask in the First Place
    Published Jul 8, 2026 · Updated Jul 9, 2026
  • PL/pgSQL Function Conventions — Volatility, RETURNS and the Boundary to Procedures
    Published Jun 12, 2026 · Updated Jul 7, 2026
  • Postgres Table Conventions — Naming, Keys and Audit Columns for a Consistent Schema
    Published Jun 12, 2026 · Updated Jul 7, 2026

Tags

Claude Code (10) Data Migration (7) Data Quality (16) Data Type (6) Developer Workflow (8) 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 (10) Comparison (1) Context Management (1) 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 (8) Duplicates (1) Dynamic SQL (4) ELT (1) Error Classification (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)