=QUERY({
QUERY('Лист6'!A:G;
"Select A, B, sum(F)
Where (C contains 'Фрукты' OR C contains 'Fruits')
Group by B, A
LABEL A'', B'', sum(F)''")
;
QUERY('Лист6'!A:G;
"Select F, '', ''
Where (B = '"&B2&"')
AND (C contains 'Яблоки' OR C contains 'Apple')
LABEL F''")
};"select Col1 where Col1<>''";0)