Re: Select query for sum of hours

From: Pratap <pratap_fin_at_rediffmail.com>
Date: 10 Aug 2004 22:43:24 -0700
Message-ID: <830861d2.0408102143.78ffead8_at_posting.google.com>


select	sum ( sum_hours ),
	note_group
from	(
	select	decode
		(
			note,

'ACT', 'ACT-CHG',
'CHG', 'ACT-CHG',
null ) note_group, decode ( note,
'EXT', 'EXT-INT',
'INT', 'EXT-INT',
null ) note_group, sum_hours from ( SELECT note,SUM(hours) sum_hours FROM WW_REC_1 where trans_date between last_DAY(ADD_MONTHS(SYSDATE, -2))+1 and LAST_DAY(ADD_MONTHS(SYSDATE,-1)) GROUP BY NOTE ) ) group by note_group;

Pratap
Cognizant Technology Solutions, India Received on Wed Aug 11 2004 - 07:43:24 CEST

Original text of this message