SQL Sum with MAX condition I have two tables named Claim 

EmployeeClaimId
      1144
      3481
      3452
      5760
      7296


and ClaimStatus

EmployeeClaimId   Amount   Version
       7            0.00      1
       7          300.00      3
       7          150.00      3
       7          400.00      1
       7          300.00      7
      14         1860.00      1
      14          541.00      7
      14          530.00      1
      14         2490.00      1


I want the sum of amount from second table where version is max for each claimid.

Can someone help?
What is the Claim table used for?

Well, you can try that:

select EmployeeClaimId, sum(Amount)
from ClaimStatus cs
join (
    select EmployeeClaimId, max(version) as version
    from ClaimStatus 
    group by EmployeeClaimId
    ) c on cs.EmployeeClaimId = c.EmployeeClaimId
        and cs.version = c.version