Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Use of Column Alias in GROUP BY
You can also say group by 1, meaning the first column returned in the query.
GHouck (hksys_at_teleport.com) wrote:
: In the following query, since it appears that you cannot
: use a column alias in either a GROUP BY or HAVING clause,
: is there avoidable/unavoidable overhead in referring to
: the Function SECTION(..) or COUNT(..) more than once?
: Are the results of the 'calls' cached to offset the
: multiple calls?
: SELECT
: SECTION(MAPNO) AS "SEC", COUNT(*) AS "KNT"
: FROM
: UTIL_POLES
: GROUP BY
: SECTION(MAPNO)
: HAVING
: COUNT(*) > 1
: ORDER BY
: KNT,SEC;
: Is there an alternative method?
: Thanks,
: Geoff Houck
: systems hk
: hksys_at_teleport.com
: http://www.teleport.com/~hksys
Received on Thu Dec 17 1998 - 00:00:00 CST