Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> SQL Count/Max question
Hello,
I have the following result from a query, say LM:
Date Code
2003-01-01 BL 2003-01-01 BL 2003-01-01 BL 2003-01-01 BL 2003-01-01 BL 2003-01-01 IM 2003-01-01 IM 2003-01-09 AA 2003-01-09 AA
How do I find the Code which occurs the most times for a single date? In this case it is BL which occurs 5 times for a single date. It is possible that codes occur for more than one date, although there are none in this example. What I would like to see in the result is:
Code Number
BL 5
How would I do this? Any hints/code samples greatly appreciated. Thanks!
-- Daniel Lidström 62 23' 25" N 17 15' 31" EReceived on Wed Feb 12 2003 - 09:42:02 CST
![]() |
![]() |