I have a table that looks like this:
artno | row | abt | pp
------+-----+-----+-----
507 | 2 | C60 | 1.23
507 | 4 | E45 | 0.59
509 | 1 | F00 | 2.89
509 | 2 | E45 | 0.00
509 | 3 | C60 | 0.59
510 | 2 | C60 | 1.55
510 | 3 | F00 | 0.05
I am trying to get the total production time (pp) for all article numbers (artno) where the department is C60, but only when the C60 department occupies the lowest row number for all records of that article number...
That is:
artno | row | abt | pp
------+-----+-----+-----
507 | 2 | C60 | 1.23
510 | 2 | C60 | 1.55
And then the total pp for these results: 2.78.
I hope it this makes some sense, and I would greatly appreciate any help i suggestions.