Demandbase interview question

how to write groupby and hashcode questions