i want to know if the main query can see the alias, here\'s an example:
SELECT AVG(values) FROM( SELECT SUM(a1) AS values FROM tableX )
D