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 -> Help with SQL Statement & Subtraction/Minus

Help with SQL Statement & Subtraction/Minus

From: ct witter <norcold1_at_yahoo.com>
Date: 16 May 2006 10:11:28 -0700
Message-ID: <1147799488.427917.217950@j55g2000cwa.googlegroups.com>


Looking for help coding this SQL statement

Table1

has
ID, ID_DESCRIPTION, SERVICE_DATE, SUB_CODE sample data

ID, ID_DESCRIPTION, SERVICE_DATE, SUB_CODE

1, 1234, 4/1/2005,
2, 1234, 4/1/2005, X
3, 1234, 4/1/2005,
4, 1111, 7/1/2005,
5, 1111, 7/1/2005, X

What I want to do is get a count of Unique items per day.

However, if there is a SUB_CODE (X) then that should be subtracted.

So the final table should be

ID_DESCRIPTION, SERVICE_DATE
 1234, 4/1/2005,

Thanks! Received on Tue May 16 2006 - 12:11:28 CDT

Original text of this message

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