PhraseryPhrasery homeGet Phrasery
Data & SQL21 categories

Where could NULL change this result?

A count came back lower than expected and nothing looks wrong.

ShortSQLnullscorrectness
Where could NULL change this result without me noticing? Quote each fragment and say what wrong answer it produces.

Query:

Making it yours

  • Paste your own material where the prompt asks for it. Everything above that line is instruction, not content.
  • Delete any rule that does not apply to you. A shorter prompt that fits beats a thorough one that does not.
  • If the answer comes back vague, add a line saying what you do not want. Constraints work better than encouragement.

Correctness checks. Catching the join that duplicates rows, the NULL that drops them, and the GROUP BY that lies.

Related prompts

Keep this one

Phrasery saves prompts with a right-click and puts them back the same way. Add this to your own library in one click.

Add to your browser โ€” free