Query builder: do not auto alias fields in (derived table) subqueries
Helping users to quickly understand SQL queries
Brought to you by:
legrand_legrand
Query builder generates this kind of SQL when using derived table subqueries:
SELECT *
FROM
SCHEMA.TABLE,
( SELECT
bb.FIELD1 AS TABLESUB_FIELD1,
bb.FIELD2 AS TABLESUB_FIELD2
FROM SCHEMA.TABLESUB bb
) SUBQUERY_1
AS TABLESUB_FIELDx should not be added when auto-alias preference is OFF
Diff: