Report question

Question: SQL query with distinct and sum