A normal query like this is fragile and opaque, if we insert a column we have to update all our references, and without column names it's really hard to tell what it's doing.
=QUERY('My Data'!A4:AAC, "
select Col5, sum(Col4), sum(Col10)
where Col3 = FALSE
and Col5 is not null
and Col2 <> 'Head Office'