Sql partition by. Count sql. count distinct sql. сумма двух столбцов sql. select distinct для чего.