MySql with rollup - not giving the total. What am I doing wrong? I'm a student and I just learned about the mysql GROUP BY and ROLLUP commands. But my WITH ROLLUP query isn't returning a total. Can someone please tell me what I'm doing wrong here?

Just like it's supposed to, it returns the total amount ordered for each product. But the last column called "GRAND TOTAL" doesn't have the total amount ordered. 

Here is a screenshot -
Your query is not actually aggregating anything (there is not any aggregation funcion).  You should just try:

SELECT
    IFNULL(product_name, 'GRAND TOTAL') AS product,
    -- Need an aggregate function on the SELECT
    -- I think you just want to SUM all your revenue
    SUM((oi.item_price - oi.discount_amount) * oi.quantity) AS total_amount
FROM
    order_items oi
    JOIN products p ON p.product_id = oi.product_id
GROUP BY
    product_name
    WITH ROLLUP ;


... which I think is what you're trying to do.

This strange behaviour arises from the fact that MySQL (and MariaDB, for that matter) allows, in versions previous to the current one, for a GROUP BY to use unaggregated columns that are not part of the GROUP BY list. (See Why does MySQL allow “group by” queries WITHOUT aggregate functions?). This is not standard SQL and should best be avoided. This is handled in current version with ONLY_FULL_GROUP_BY.

Check it at dbfiddle here