Report question

Question: Sum of multiplication of columns for rows with similar IDs in MySQL