sum using partition by in sql server