Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Help with SQL Statement & Subtraction/Minus
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