How can I find the sum of the marks from below table with multiple conditions like class = A && grade =6 & etc.?