Check in chain

Report a typo

CREATE FUNCTION shopping( total_sum DOUBLE), that RETURNS TEXT

Let's insert IF...ELSE construction into block BEGIN ... END;

Sort the code lines in the right order.

Put the items in the correct order
IF total_sum >= 100 THEN
SET amount = FLOOR(total_sum / 100.00);
END IF;
ELSEIF total_sum >= 50 THEN
SET amount = FLOOR (total_sum / 50.00);
ELSE
SET result_text = 'Add some more money.';
___

Create a free account to access the full topic