Re: Select max within max

> SELECT DISTINCT> COLX,> COLY,> COLZ> FROM> (SELECT> COLX,> COLY OLD_COLY,> MAX(COLY) OVER (PARTITION BY COLX) COLY, MAX(COLZ) OVER (PARTITION> BY COLX, COLY) COLZ> FROM> T1)> WHERE> OLD_COLY=COLY;
And, if T1 has few thousand rows, it's going to be full table scan,
window sort and sort distinct, in that order. In other words, the
resource consumption will just explode. As this is obviously a report,
materialized view looks like the only reasonable solution. This is a
sort of "mad max" query.