How does iDBQuery handle nulls and missing values in a calculation?

iDBQuery follows standard SQL rules for nulls — they're skipped by aggregates like SUM and AVG and don't equal each other — and it can surface how many rows were missing so a gap doesn't quietly distort an answer. It shows the SQL and cites rows so you can see exactly what was included.

Missing data is everywhere: an unrecorded close date, a blank region, a price that was never entered. Handled carelessly, nulls turn a correct query into a misleading one.

  • Correct SQL semantics. iDBQuery generates SQL that treats nulls the way the database does — excluded from `AVG`, not counted as zero unless you ask, and never equal to another null in a join or filter.
  • Transparency about gaps. When a meaningful share of rows is missing a value, iDBQuery can call that out, so "average deal size" isn't silently computed over only the rows that happen to be filled in.
  • Your choice of treatment. You can ask it to exclude, count as zero, or bucket "unknown" as its own group, depending on what the question needs.

This matters most for averages, rates, and completeness checks, where a hidden pile of nulls changes the story. Because iDBQuery shows the generated SQL and cites the source rows behind an answer, you can confirm whether blanks were dropped or included — and even ask a follow-up like "how many orders had no region?" to quantify the gap before trusting the headline number.

Updated 2026-06-22