I'm trying to edit the below sql query in CR 9 to select only the MAX of "TIV_AGG"."W_PCENTPROCTIME" for each server (TIV_AGG"."SERVER") on the selected date.
------------------------------------------
SELECT "TIV_AGG"."W_PCENTPROCTIME", "TIV_AGG"."S_DATE", "TIV_AGG"."SERVER", "TIV_AGG"."S_TIME"
FROM "TIVOLI"."TIV_AGG" "TIV_AGG"
WHERE "TIV_AGG"."S_DATE"='20040621'
---------------------------------------------
I'm attempting this by using the database expert ADD command. I'm copying and pasting the original query into the ADD command and then trying to edit it to something like below:
SELECT MAX ("TIV_AGG"."W_PCENTPROCTIME"), "TIV_AGG"."S_DATE", "TIV_AGG"."SERVER", "TIV_AGG"."S_TIME"
FROM "TIVOLI"."TIV_AGG" "TIV_AGG"
WHERE "TIV_AGG"."S_DATE"='20040621'
ORDER BY "TIV_AGG"."SERVER"
I get an Oracle error "not a single group function". I'm not a programmer, as I'm certain is evident from the above attempt. : ) Can anyone help? Thanks!!
------------------------------------------
SELECT "TIV_AGG"."W_PCENTPROCTIME", "TIV_AGG"."S_DATE", "TIV_AGG"."SERVER", "TIV_AGG"."S_TIME"
FROM "TIVOLI"."TIV_AGG" "TIV_AGG"
WHERE "TIV_AGG"."S_DATE"='20040621'
---------------------------------------------
I'm attempting this by using the database expert ADD command. I'm copying and pasting the original query into the ADD command and then trying to edit it to something like below:
SELECT MAX ("TIV_AGG"."W_PCENTPROCTIME"), "TIV_AGG"."S_DATE", "TIV_AGG"."SERVER", "TIV_AGG"."S_TIME"
FROM "TIVOLI"."TIV_AGG" "TIV_AGG"
WHERE "TIV_AGG"."S_DATE"='20040621'
ORDER BY "TIV_AGG"."SERVER"
I get an Oracle error "not a single group function". I'm not a programmer, as I'm certain is evident from the above attempt. : ) Can anyone help? Thanks!!