SET @date = '2025-10-10';

SELECT orderid
FROM custopayted.trackingnumbers
WHERE shipdate >= @date
AND shipdate < @date + INTERVAL 1 DAY
AND shipment_cost > 0
GROUP BY orderid
HAVING COUNT(DISTINCT trackingnumber) > 1;