I have a table with, among other things, these columns: `DateTransferred, ComputedQuantity, StoreID, ItemID`

I have two goals. My simpler goal is to write a query where I feel in the ItemID and it sums up the ComputedQuantity where it matches that ItemID, only using the most recent DateTransferred for each StoreID. So with the following example data:

```
DateTransferred | StoreID | ItemID | ComputedQuantity
11/10/17        | 1       | 1      | 3 <
10/10/17        | 1       | 1      | 4
09/10/17        | 2       | 1      | 9 <
08/10/17        | 3       | 1      | 1 <
07/10/17        | 3       | 1      | 10

```

I would want it to pull every row with `<` next to it, as that's the most recent Date for that StoreID, and sum up to 13

My more complicated goal is that I would like to include the above-calculated value into a 'join' where I'm dealing with the Item table, so that I can pull all the items and join them with a new column which has the summed up ComputedQuantity

This is on SQL Server 10 on Windows Server 2008, if that matters