The code for Create_GetOrderCountByStatus.sql is: DROP PROCEDURE IF EXISTS GetOrderCountByStatus; DELIMITER $$ CREATE PROCEDURE GetOrderCountByStatus ( IN orderStatus VARCHAR(25), OUT total INT ) BEGIN SELECT COUNT(orderNumber) INTO total FROM orders WHERE status = orderStatus; END$$ DELIMITER ; CALL GetOrderCountByStatus('Shipped',@total); SELECT @total; CALL GetOrderCountByStatus('Disputed',@total); SELECT @total;