super sql genius' group by question [message #2999] |
Wed, 28 August 2002 13:21 |
Joe
Messages: 138 Registered: November 1999
|
Senior Member |
|
|
Not sure what I am doing wrong here...I want to display the "rc", max(count) and time the max count occurred. Where can I ask for the time without having to group by time?
select rc, max(num), started
from (select rc, count(*) num, started
from ((select (substr(callingnum,1,6)||substr(callednum,1,6)) rc,
started
from mytable
group by rc, started)
group by rc, started) <= don't want this.
any ideas???
|
|
|
|