I want to write a query that returns the sum of two multiplied cells, where the name is equal to a person's name. Let's say I say I have:
| Name | score | days|
|---------|------|------|
| Suzie | 5.0 | 3
| Jonny | 5.0 | 1
| Suzie | 4.0 | 1
| Suzie | 5.0 | 7
| Jonny | 4.0 | 1
basically, I want to know Suzie's average score. Some rows represent multiple days though. The arithmetic would be
(5.0 * 3) + (4.0 * 1) + (5.0 * 7)
I want to write a query:
=(index(query({a1:c3}, "Select Sum(Col2 * Col3) where Col1 = '" & D22 & "'"),2))
However, it doesn't like the part that says "Sum(Col2 * Col3)"
Is it possible to do the sum of two columns multiplied?
Thank you in advance!