Home » SQL & PL/SQL » SQL & PL/SQL » super sql genius' group by question
super sql genius' group by question [message #2999] Wed, 28 August 2002 13:21 Go to next message
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???
Re: super sql genius' group by question [message #3002 is a reply to message #2999] Wed, 28 August 2002 14:46 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
Joe, could you provide a small sample set of data and your desired result set? Thanks.
Previous Topic: Select function when no matching data exists
Next Topic: delete records older than 60 days....
Goto Forum:
  


Current Time: Thu Apr 25 03:42:16 CDT 2024