DeveloperBreeze

Json_Unquote Development Tutorials, Guides & Insights

Unlock 1+ expert-curated json_unquote tutorials, real-world code snippets, and modern dev strategies. From fundamentals to advanced topics, boost your json_unquote skills on DeveloperBreeze.

Selecting the Sum of a JSON Property in MySQL

Tutorial August 17, 2024
json mysql

Similarly, if you wanted to calculate the total revenue generated by summing the price field in the JSON column, you could write:

SELECT SUM(CAST(JSON_UNQUOTE(JSON_EXTRACT(order_details, '$.price')) AS DECIMAL(10,2))) AS total_revenue
FROM orders;