Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: complex? SQL time series problem
In article <1108659136.624096_at_yasure>, damorgan_at_x.washington.edu says...
> > s_date e_date c_set c_id stts
> >
> > 01-jan-2000 15-mar-2000 a2 125 A
> > 16-mar-2000 16-jul-2000 a2 125 B
> > 17-jul-2000 sysdate a2 125 A
> > ....
> > 03-feb-2000 13-may-2000 a2 158 B
> > 14-may-2000 sysdate a2 158 A
> > ....
> >
> > I need to group by c_set, stts and time interval, giving the count of
> > c_id, eg:
> >
> > c-set stts s_date e_date count(c_id)
> >
> > a2 A 01-jan-2000 15-mar-2000 1
> > a2 A 16-mar-2000 13-may-2000 0
> > a2 A 14-may-2000 16-jul-2000 1
> > a2 A 17-jul-2000 sysdate 2
> > a2 B 03-feb-2000 15-mar-2000 1
> > a2 B 16-mar-2000 13-may-2000 2
> > a2 B 14-may-2000 16-jul-2000 1
> > a2 B 17-jul-2000 sysdate 0
> And exactly what is it about GROUP BY that won't work?
How do I get the e_date of 13-may-2000 in the stts=A group by?
Geoff M Received on Thu Feb 17 2005 - 16:08:41 CST