I need to create a bar chart from a MySQL database where I have the following columns to track expenses:
ID, YEAR, MONTH, DAY, CURRENCY, TYPE, AMOUNT, GENRE, INFO, ACCOUNT.
I’m trying something like:
SELECT MONTH, SUM(AMOUNT) as “Monthly Expense Total”
WHERE TYPE = “EXPENSE” AND YEAR = 2022
GROUP BY MONTH
This looks OK in a table visualization but I cannot create a bar-chart.
My aim is to show in the sum of expenses of each month of 2022 in a bar-chart.
Axis X = Month
Axis Y = Sum of expenses amount
Is extremely simple, but I couldn’t get it done so far.
Thanks in advance.