Suma Soft interview question

aggregate function