reduce (.orders[] | select(any(.cartItems[]?; .promo == $promo))) as $o ({orderCount: 0, totalCents: 0}; .orderCount += 1 | .totalCents += $o.totalCents)