how to substract two sums based on different field values in one table (view)
- by user1749640
example: i need the numbers of which the sum of the amount where id = 1 is not equal of the sum of the amount where id < 1, together with the id's and difference.
The table (view in this case) may look like this:
NUMBER AMOUNT ID
0001 500 1
0001 500 2
0002 400 3
0003 299 1
0003 300 3
0003 300 3
Many thanks for your help on this one.