Here is my Stored Data. I need the sum of "total". basically I need to fetch overall my sales.
here is my query which returns 0. I have read about how to use sum function but it's not working
USE pharmacy_db;
SELECT SUM(JSON_EXTRACT(Invoice, "$[*].total")) AS sales
FROM sales;

