Applies to:
- Plan - Any
- Deployment - Any
- Use case - Writing SQL queries where table aliases match column names
Summary
Issue: Queries fail with aField not found error when a subquery’s table alias matches a column name used inside the subquery.
Cause: The alias collides with the column of the same name, causing Braintrust SQL to fail resolving field references without indicating the naming conflict.
Resolution: Rename the subquery alias to a value that does not match any column name referenced in the query.