SQL what aggregation logic makes different results

welcome to shbcf.ru