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 -> How to compare values within a table - SQL

How to compare values within a table - SQL

From: <suisum_at_ecn.ab.ca>
Date: 26 Jun 99 16:39:11 GMT
Message-ID: <3775022f.0@ecn.ab.ca>


MyTable


id year month amount

1    1999    3      10
1    1999    4      10
1    1999    5      10
2    1999    3      10
2    1999    4      25
3    1999    3      10
3    1999    5      10


How to list out the IDs when (the amount of month 3 - the amount of month 4) > 50%?

With the above data, I want to have the following output:

   id
   ==
   2
   3

--
Best regards, Received on Sat Jun 26 1999 - 11:39:11 CDT

Original text of this message

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