Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: GROUP BY

Re: GROUP BY

From: Matthias Gresz <GreMa_at_t-online.de>
Date: 1998/03/13
Message-ID: <6eamr1$deo$2@news01.btx.dtag.de>#1/1

On Thu, 12 Mar 1998 16:14:09 GMT, kaho_at_planetinternet.be (Koen Serry) wrote: Hi,

SELECT sum(aantal)

	FROM pagehits 
	WHERE
	 	(hostid(host)=host_id)
	GROUP BY TO_CHAR(DATUM,'DD.MM.YYYY');

may do your job.

>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

--

Regards

Matthias Gresz    :-)

GreMa_at_T-online.de
Received on Fri Mar 13 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US