Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: GROUP BY
What are your trying to do? Do you want the date to be displayed?
Then it must be part of your select. You cannot use a function in a group
by clouse.
or just say group by datum.
(dit klink maar baie afrikaans)
iwesterv_at_mdsi.bc.ca
Koen Serry <kaho_at_planetinternet.be> wrote in article
<35080863.26336515_at_news.planetinternet.be>...
> our table looks like this
>
> CREATE TABLE pagehits
> (
> host_id NUMBER(3) NOT NULL,
> url_id NUMBER(5) NOT NULL,
> datum DATE NOT NULL,
> aantal NUMBER(8) DEFAULT 0
> )
>
>
>
> we're trying to select data grouped by "day"
> what's wrong with this
>
> 'SELECT sum(aantal)
> FROM pagehits
> WHERE (datum = (SYSDATE-1))
> AND (hostid(host)=host_id)
> GROUP BY datum date(50) "dd/mon/yyyy"
>
> regards,
>
>
> Koen & Bart
>
Received on Fri Mar 13 1998 - 00:00:00 CST