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

Home -> Community -> Usenet -> c.d.o.misc -> Re: DB Design help?

Re: DB Design help?

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Mon, 21 Feb 2000 14:53:38 +0100
Message-ID: <951143722.9042.0.pluto.d4ee154e@news.demon.nl>


select to_char(date_field, 'DD'), sum(decode(to_char(date_field, 'MM'), '01',1, 0) Jan, sum(decode(to_char(date_field, 'MM'),'02',1,0) Feb etc... from table
group by to_char(date_field,'DD')

Ugly, but it works,

Hth,

Sybrand Bakker, Oracle DBA

Ben Heuer <queerczarNOquSPAM_at_unforgettable.com.invalid> wrote in message news:05fb87e0.2030c446_at_usw-ex0103-019.remarq.com...
> Hello
>
> Pls direct me to a correct group if this happens to be a mispost.
>
> I need some help with database design..I have a table that
> stores the time that a user logged in to a web site. Now I have
> been asked to make a report in the following format:
>
> Jan Feb Mar....
>
> 1
> 2
> 3
> .
> .
> .
> 31
>
>
> How can I do this using either SQL or some third party tool??
>
> I'd really be obliged if I some one could help me..I cannot seem
> to work out an SQL where I can enlist so many COUNTS(*)
> statements!!
>
> Thanks very much in advance!
>
> Regards
> Ben
>
>
>
>
> * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network
*
> The fastest and easiest way to search and participate in Usenet - Free!
>
Received on Mon Feb 21 2000 - 07:53:38 CST

Original text of this message

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