Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Aggregate SQL Help
On Wed, 07 Aug 2002 03:40:47 GMT, "tacnaboyz" <fake.address_at_fake.fake>
wrote:
>Thank you for your suggestion. However, I guess I could've made it more
>clear that the sample I gave was just a simplified example of what I'm
>actually trying to do. The biggest problem with the solution provided is
>that values are hard coded into the query whereas in reality I won't know
>the values. I was looking for more of a generic query that would give me
>max frequency of distinct values in a column.
>
>Your query might give me the ideas I need to accomplish this though. I'll
>try tomorrow when I get access to the server. In the meantime, if there are
>any other ideas, PLEASE let me know.
You want the max frequency of distinct values? I am not sure that I understand. I am guessing, that you want the value that appears most in the column. And then do that per state.
I am not sure how to get the value that appears most per column, when those values are unknown, without using more than one query. Mayhap a function could be used?
Brian Received on Wed Aug 07 2002 - 08:29:42 CDT
![]() |
![]() |