Include Subquery in group by clause

I probably can’t come up with a good concise word. The only reason RANDOM
is not good is because it has some mathematical meaning and that there are
RANDOM functions available.

Possibly “ if multiple entries exist chose one of them. Either MAX or MIN
would be acceptable or any other function that will return one ”

Maybe Pirate has a good word for this.
image001.jpeg

Okay – replace “pick a random one” with “pick
one.” That makes sense.

Nate Schroeder

IT Commercial Technical Services - Data Management Team

Monsanto Company

800 N. Lindbergh Blvd. G3WI - Saint Louis, MO - 63167

314-694-2592

Maybe the card shark pirate would suggest ‘singleton’?

Daniel B Madvig
Computer Technologies

Northwestern College & Northwestern Media
3003 Snelling Ave.
St. Paul, MN 55113
www.nwc.edu

651.631.5323
image001.jpeg

Peter,

What about using a function that returns your value?

create function fun1

return NUMBER

is

begin

return 1;

end;

SELECT dummy, fun1, COUNT (*)

FROM DUAL

GROUP BY dummy, fun1;

This definitely works (I tested in production).

chris

Ahh…

Yep, that’s pretty much what I meant by “random” –
“I don’t care which one is chosen.”

But in that case, the original poster was already picking one with “rownum

Don’t mind me, earlier it was a case of being too asleep so I was being
precise in both my reading and writing and now it’s a case of me being
facetious so I’m just being a pain :wink:

RAS

The word you wanted to use is …

indeterminate

:slight_smile:

KP


"When the Power of Love overcomes the Love of Power ,

Then The World will know Peace."

– Jimi Hendrix