sql group by with multiple columns

join shbcf.ru