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

Home -> Community -> Mailing Lists -> Oracle-L -> SQL Code

SQL Code

From: Naik, Kevin K <KNaik_at_mail.sbic.co.za>
Date: Fri, 12 Jan 2001 08:50:57 +0200
Message-Id: <10738.126467@fatcity.com>


This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible.

------_=_NextPart_001_01C07C64.043CC840
Content-Type: text/plain;

        charset="iso-8859-1"

Hi All,

I have an interesting problem, lets say I have a table with 2 fields, one with a code, and the other with a full datestamp, -+ 8 million records. What will the SQL code be to query this table, to show the result - the count of all codes that occur between every hour for the day, ie

5 counts of code type a, 6 of type b etc, between 01h00 and 02h00 7 counts of type a, 8 of b etc, between 02h00 and 03h00 etc etc etc

Any ideas anybody ?
Thanx
Kevin N


Disclaimer and confidentiality note

Everything in this e-mail and any attachments relating to the official business of Standard Bank Investment Corporation (Stanbic) is proprietary to the company. It is confidential, legally privileged and protected by law.\ Stanbic does not own and endorse any other content. Views and opinions are those of the sender unless clearly stated as being that of Stanbic.

The person addressed in the e-mail is the sole authorised recipient. Please notify the sender immediately if it has unintentionally reached you and do not read, disclose or use the content in any way.

Stanbic can not assure that the integrity of this communication has been maintained nor that it is free of errors, virus, interception or interference.


------_=_NextPart_001_01C07C64.043CC840
Content-Type: text/html;

        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; charset=3Diso-885=
9-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version 5.5.2652.3=
5">
<TITLE>SQL Code</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Hi All,</FONT>
</P>

<P><FONT SIZE=3D2>I have an interesting problem, lets say I have a table =
with 2 fields, one with a code, and the other with a full datestamp, -+ 8= =20million records.</FONT></P>

<P><FONT SIZE=3D2>What will the SQL code be to query this table, to show =
the result - the count of all codes that occur between every hour for the= =20day, ie</FONT></P>

<P><FONT SIZE=3D2>5 counts of code type a, 6 of type b etc, between 01h00=
=20and 02h00</FONT>
<BR><FONT SIZE=3D2>7 counts of type a, 8 of b etc, between 02h00 and 03h0=
0 etc etc etc</FONT>
</P>

<P><FONT SIZE=3D2>Any ideas anybody ?</FONT>
<BR><FONT SIZE=3D2>Thanx</FONT>
<BR><FONT SIZE=3D2>Kevin N</FONT>
</P>

<DIV>
<DIR><FONT color=3D#0000ff size=3D1>
<P>______________________________________________</FONT><FONT face=3DAria=
l size=3D1><B><FONT face=3DArial=20
size=3D2></FONT></B></FONT></P>
<P><FONT face=3DArial size=3D1><B><FONT face=3DArial size=3D2>Disclaimer =
and=20
confidentiality note</B></FONT></FONT></P>
<P><FONT face=3DArial size=3D1><FONT face=3DArial size=3D2>Everything in =
this e-mail and=20
any attachments relating to the official business of Standard Bank Invest= ment=20
Corporation</FONT><FONT color=3D#0000ff face=3DArial size=3D2> </FONT><FO= NT face=3DArial=20
size=3D2>(Stanbic) is proprietary to the company. It is confidential, leg= ally=20
privileged and protected by law. Stanbic</FONT><FONT color=3D#0000ff face= =3DArial=20
size=3D2> </FONT><FONT face=3DArial size=3D2>does not own and endorse any= =20other=20
content. Views and opinions are those of the sender unless clearly stated= =20as=20
being that of Stanbic. </FONT></FONT></P>
<P><FONT face=3DArial size=3D1><FONT face=3DArial size=3D2>The person add=
ressed in the=20
e-mail is the sole authorised recipient. Please notify the sender immedia= tely if=20
it has unintentionally reached you and do not read, disclose or use the c= ontent=20
in any way.</P>
<P align=3Djustify></P>
<P>Stanbic can not assure that the integrity of this communication has be=
en=20
maintained nor that it is free of errors, virus, interception or=20 interference.</P></FONT></FONT><FONT color=3D#0000ff></DIR>
<P><FONT=20

size=3D1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=

p;&nbsp;&nbsp;_______________________________________________</FONT></P><=
Received on Fri Jan 12 2001 - 00:50:57 CST

Original text of this message

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