How to group data together in SQL

welcome to shbcf.ru