reduce inputs as $o ({orderCount: 0, totalCents: 0}; if any($o.cartItems[]?; .promo == $promo) then .orderCount += 1 | .totalCents += $o.totalCents else . end)