I have a table that looks approximately like this:<br>
ArtNbr ArtType Revision NbrManufactured<br>
1-1 type 1 0 52<br>
1-2 type 1 1 123<br>
1-3 type 1 2 32<br>
2-1 type 2 0 121<br>
2-2 type 2 1 42<br>
2-3 type 2 2 21<br>
2-4 type 2 3 11<br>
. . . .<br>
. . . .<br>
<br>
What I want to do is to sum the nbr of manufactured units<br>
for each article type, and also get the ArtNbr of the last revision.<br>
<br>
For the example above that would be:<br>
1-3 (doesn't matter)(doesn't matter) 207<br>
2-4 (doesn't matter)(doesn't matter) 195<br>
<br>
I'm having trouble getting the last ArtNbr to "tuple up" with the sums. Can this be done with an SQL-query?<br>
<br>
Grateful for _any_ tips,<br>
tar<br>
ArtNbr ArtType Revision NbrManufactured<br>
1-1 type 1 0 52<br>
1-2 type 1 1 123<br>
1-3 type 1 2 32<br>
2-1 type 2 0 121<br>
2-2 type 2 1 42<br>
2-3 type 2 2 21<br>
2-4 type 2 3 11<br>
. . . .<br>
. . . .<br>
<br>
What I want to do is to sum the nbr of manufactured units<br>
for each article type, and also get the ArtNbr of the last revision.<br>
<br>
For the example above that would be:<br>
1-3 (doesn't matter)(doesn't matter) 207<br>
2-4 (doesn't matter)(doesn't matter) 195<br>
<br>
I'm having trouble getting the last ArtNbr to "tuple up" with the sums. Can this be done with an SQL-query?<br>
<br>
Grateful for _any_ tips,<br>
tar<br>