How does iDBQuery choose the right column when several have similar names?

iDBQuery disambiguates columns using the semantic layer, data types, sample values, and your question's intent — for example choosing invoice date over ship date for "revenue in June". When two columns are genuinely interchangeable it asks a short clarifying question rather than guessing, and always shows the SQL it chose.

Real schemas are full of near-duplicate names: `amount`, `amount_usd`, `net_amount`; `created_at`, `updated_at`, `closed_at`. Picking the wrong one silently corrupts an answer, so iDBQuery treats disambiguation as a first-class step.

  • Semantic layer and glossary. Annotations and your business glossary tell iDBQuery which column represents "revenue", which date means "the sale happened", and what obscure codes stand for.
  • Type and content checks. It inspects data types and representative values — a column of currency values versus a count, a timestamp versus a date — to match your intent.
  • Question context. "Revenue recognised in Q2" points to a recognition date; "orders placed in Q2" points to an order date.

If the choice is still ambiguous, iDBQuery asks — "do you mean order date or ship date?" — instead of picking blindly. Crucially, it then shows the generated SQL and cites the answer back to the exact source rows, so you can confirm it used `net_amount` and not `gross_amount`. You can also record the correct interpretation in the glossary once, and iDBQuery will apply it consistently to every future question.

Updated 2026-06-22