I’m sorry if this has already been answered or if this is the wrong place to ask it, but I’ve done some searching and had no luck.
I’m new to SQL/Databases but I’m trying to generate a query to calculate changes to my budget in LibreOffice Base. Right now I’m tracking changes to my income like below:
chart
I have an SQL query set up via the LibreOffice editor to show the total amount I earned/lost and the reason for it below:
result
Now I’d like to be able to filter it by month (e.g. all changes from December but none from any other month). How do I go about doing that?
The raw SQL code I’ve got so far is:
SELECT “ChangeReason” AS “Change Reason”, SUM( “ChangeAmount” ) AS “Total Change” FROM “Dummy Budget” GROUP BY “ChangeReason”
However I am using the “edit” function, and my changes to it are here:
**UPDATE:
Thanks for the answer @Ratslinger, however, I’ve entered the changes but I’m only getting an error. It’s probably that I’m very new to SQL and messed something up, so if you could explain what I’m doing wrong that’d be great.