1

I have Creating more than 10000 lines Using SQL Server.I inserted Many values.Now i want sum of Total based Expensive type value .

   ExpenseTypeCode      ExpenseType
    700300              Meals - FBR Only
    700450              Taxis/Parking/Tolls
    700450              Taxis/Parking/Tolls
    700300              Meals - FBR Only
    700300              Meals - FBR Only

i have this two fields and values.Now i want Sum of total using Expense type value .I want separate Total Like Taxis/Parking/Tolls total .how can calculate total based column value ?

1 Answer 1

1

simply you can do like this

select ExpenseType,Total=Sum(ExpenseTypeCode) from YourTable
group by ExpenseType
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.