SQL or PL/SQL

From: <vigi98_at_my-deja.com>
Date: Thu, 02 Dec 1999 11:56:07 GMT
Message-ID: <825mom$3g7$1_at_nnrp1.deja.com>



[Quoted] Hi all,

[Quoted] [Quoted] I'm not very good at doing SQL requests or PL/SQL scripts. Could you solve the following problem :

I've got three fields in a table : alarm_id,date-hour and severity. Severity is an integer between 1 and 3.

What I would like to obtain is what follows : for each period of 12h (from 6AM to 6PM, then from 6PM to 6AM) I would have the number of alarms per severity number.

Typically, it would give a table with the following fields :

date of the first part of the 12h period ; flag to indicate if the hour [Quoted] of the alarm is between 6AM and 6PM or not ; number of alarms of severity 1 ; number of alarms of severity 2 ; number of alarms of severity 3

Thank you very much for your answers

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Dec 02 1999 - 12:56:07 CET

Original text of this message