(
select array_agg(tag_id)
from order_tags as ot
where ot.order_id = o.id
) as order_tags
.whereRaw(EXCLUDED_ORDER_TAGS.map(tag => `not(${tag} = any(order_tags))`).join(' and '))
// -> where not(473 = any(order_tags)) and not(1 = any(order_tags))