KRAN interview question

Sql join query, sql select query with distint, orderby and groupby