Where My Money Goes: Expense and Revenue Insights with SQL & Python
In April 2024, I moved out and started living on my own, really on my own this time. It was not the first time I had lived away from home. During my university years and while on Erasmus, I had already experienced living alone in a practical sense. But back then, I always had the support of my parents in the background, emotionally, logistically, and often financially.
This time is different. After graduating and starting my first full-time job, I am fully responsible for myself. This is my first real experience of financial and personal independence, and one of the first things I realized was: I need to keep track of my money.
To do that, I started using an app called Money Manager. It is simple, intuitive, and helps me log both my expenses and income in one place. But after a while, I started to get curious: Where does all this data go? Can I use it to understand my habits better? Could this even become a small data project?
That’s how this personal finance tracker became something more, a way to explore business and data analysis, using my own life as the dataset.
*Note: For privacy reasons, I will not be sharing raw data from my personal finances. Instead, this post focuses on trends, observations, and insights based on the data I collected over the past months using SQLite and Python. You can still take a look at the full code on Github.
About the App: Money Manager
Money Manager is a finance tracking app that lets you log your transactions and visualize your financial activity on a daily, weekly, or monthly basis. Each entry includes:
- Transaction type: Expense or income
- Date of the transaction
- Amount
- Category, with full customization (e.g., Food, Housing, Transportation, Entertainment, Personal care, Health, Travel), and subcategory, if needed (e.g., “groceries” or “dinner” under “food”)
- Payment method: Cash, bank transfer, specific cards, vouchers, or platforms like Vinted
- Notes (optional): Helpful for clarifying the purpose of a transaction
The app is simple but powerful, and great for someone who wants to track finances in a structured, low-effort way.
Data Exploration
I started wondering what was going on behind the scenes of the app. Where is this information stored? Can I access it in a more structured format?
Since I am currently learning how to automate analyses and improve my programming skills, I saw this as the perfect opportunity to apply what I have learned and turn it into a real project.
Step 1: Accessing the Data
First, I enabled daily automatic backups to my Google Drive through the app’s settings. This generated a folder containing daily backup files, all with a .mmbak
extension. A bit of online research revealed that these are Money Manager Backup Archive files, a format commonly used by the app to save your data securely. The filename also included the creation date, which got me thinking that I could eventually build a script that runs on a schedule, downloads the latest backup, and automatically updates the visualizations. Definitely an idea for a future project you might see here on the blog!
Step 2: Making the Data Usable
Out of curiosity, I renamed one of these .mmbak
files to .db
to see whether it could be opened as an SQLite database. To my surprise, it worked! I could now access the database using DB Browser for SQLite, a free and user-friendly tool that I started using during my university years.
However, this was my first time working directly with an SQLite database outside of class projects.
Step 3: Understanding the Database Structure
Upon opening the file, I found that the database contained 20 tables. To make sense of it all, I manually explored each one to identify what kind of data it held and which tables were actually relevant to my use of the app.
Only a few tables contained useful data:
ASSETS
: Information about accounts and payment methodsINOUTCOME
: All the transaction records, including amount, date, category, subcategory, and notesZCATEGORY
: The hierarchy of categories and subcategories used in the app
The rest of the tables appeared to be empty, likely tied to app features I have not interacted with yet. However, the ASSETS
, INOUTCOME
and ZCATEGORY
tables contained all the essential information I needed. Here’s a breakdown of each table and its key fields:
ASSETS
This table lists the different payment methods I have used, such as bank cards, cash, or vouchers. The main fields are:
- uid: the Primary Key, uniquely identifying each payment method
- NIC_NAME: Custom name I gave to each method (e.g., “Cash”, “Revolut”, “Meal Vouchers”)
- ORDERSEQ: Order of creation
- A_UTIME: Timestamp for creation or update
INOUTCOME
This is the core transactions table, containing all my income and expense records. The main fields are:
- uid: the Primary Key, uniquely identifying each transaction
- assetUid: links to ASSETS.UID
- ctgUid: links to ZCATEGORY.UID
- ZCONTENT: Optional notes for context
- WDATE: Date of the transaction
- DO_TYPE: Type of transaction (1 = expense, 0 = income)
- ZMONEY: Amount of the transaction
- currencyUid: Currency used (always EUR in my case)
ZCATEGORY
This table defines all the categories and subcategories I have used to classify transactions. The main fields are:
- uid: the Primary Key, uniquely identifying each category or subcategory
- NAME: Name of the category (e.g., “Groceries”, “Salary”, “Transport”)
- TYPE: Category type (1 = expense, 0 = income)
- pUid: Parent category ID (if it’s a subcategory); 0 if it’s a main category
Understanding the primary and foreign key relationships allowed me to start building JOIN queries between the tables and extract meaningful insights. For example, I could easily see how much I spent on food in a certain month, or how different payment methods were used over time.
At this point, it was time to start practicing and write some queries. This helped me to understand the patterns of my behavior, financially speaking.
Data Analysis
While exploring the database with DB Browser for SQLite helped me understand the structure and run some basic queries, I soon realized I wanted to do more, especially when it came to creating visual summaries.
That’s why I decided to integrate SQLite with Python. Using Python allowed me to write scripts that not only ran my queries, but also turned the results into clear visualizations, like monthly spending charts, category breakdowns, or comparisons between income and expenses over time. I used libraries like pandas to organize the data and matplotlib or seaborn to visualize it.
Most importantly, working with my own data made the learning process feel natural and relevant. This project has been one of the most effective ways for me to deepen my understanding of both SQL and Python, while also developing habits that help me manage my finances better.
Monthly Revenue and Expense Trends
The first thing I noticed looking at some graphical representations I built with seaborn and matplotlib is that, over the past year, my expenses remained relatively stable, with a few notable spikes. Specifically, I spent more in August 2024, January–February 2025, and April 2025. These correspond, respectively, to holidays, booking trips, and starting a gym membership. In contrast, income has shown more variability. I observed some peaks in July 2024 (my birthday) and December 2024, fluctuations connected, respectively, to birthday presents and an end-of-year bonus at work. I also noticed a noticeable increase in income from November 2024, the result of a promotion, and which has continued into the new year. As a result, my monthly revenue (income minus expenses) has generally been positive.Exceptions include May and September 2024, when my spending temporarily exceeded income,likely tied to travel or large one-off purchases.
One thing that really stood out from this analysis is how my spending tends to spike around holidays and travel, not just when I am actually travelling, but also in the months leading up to a trip, when I am booking flights or accommodation. It is a good reminder that travel does not just cost money while you are on the move, but that a lot of it happens ahead of time. When it comes to income, the biggest jumps usually come from special occasions, like birthday gifts or work bonuses. These moments are great, but they are also one-offs, so I can’t really count on them when planning my regular monthyl budget. What I am especially glad to see is that, even after getting a promotion and earning more, I have managed to keep my monthly expenses fairly steady. That feels like a small but meaningful win when it comes to managing money more intentionally. Going forward, I might try to build in some seasonal “cushions”, a little extra savings for months when I know I will be spending more.
Monthly Expenses and Income by Main Category
My analysis also focused on breaking down my expenses and income by main category, in order to provide more context. This is what I saw.
Expenses:
- Home expenses were always the highest, especially in April 2024, due to my apartment move. Monthly rent and utility payments keep this category consistently at the top.
- Food remained relatively steady. However, it nearly doubled during travel months like August 2024 and January 2025, due to dining out and holiday-related meals.
- Travel expenses were irregular, with spikes in September 2024, November 2024, and January 2025. These reflect both trips taken and holidays booked in advance.
- Health began increasing around February 2025, when I signed up for a gym. This has added a recurring cost to my monthly budget.
- Other categories like Clothes, Entertainment, Presents, Transport, and Personal Care stayed low and stable, rarely exceeding €50/month, making up a smaller part of my financial footprint.
Income:
- The main source of income was my salary, which, as mentioned earlier, saw a notable increase starting in November 2024 due to a promotion. From that point on, it remained stable and predictable.
- Bonuses, including financial gifts from family, showed a highly irregular pattern. These peaked in July and December 2024, corresponding to birthday and holiday presents, respectively. In general, this type of income was more common between spring and early autumn, but started decreasing once my full-time salary increased, because I became more financially independent.
- I have a small income stream from Vinted, where I sell second-hand clothes and books, but that does not make a big impact on my income.
Overall, my expense data highlights the presence of some consistent costs, namely housing, food, and health, which reflect essential and important aspects of my daily life. These are non-negotiable expenses that form the foundation of my budget. Travel, on the other hand, represents a more variable but still significant category. I have always believed that traveling is worth investing in, and my spending patterns clearly reflect that. On the income side, there has been a notable shift over time. I moved from relying on fluctuating sources, like occasional gifts or family support, to a more stable and predictable income stream represented by my salary. This transition has given me more financial independence and confidence in planning. Also, while Vinted does not contribute a meaningful amount to my income, it plays a different kind of role. I do not use it to make money per se, but rather as a way to extend the life of items I no longer use. It is a small gesture toward more sustainable habits, and I find satisfaction in seeing my old belongings find new homes.
Expense and Income by Payment Method
I also took some time to look into how I paid for things and how I received income, essentially, the movement of money in and out of my accounts. One interesting pattern that I noticed is that I almost never use cash for expenses. Most of my spending happens digitally, which not only makes tracking easier but also reflects how digital payments have become part of my routine.
Among payment methods, bank transfers were mostly used for high-value transactions like rent. My MPS account, being my oldest one, was where I routed most of my core day-to-day expenses, especially groceries and food, one of my biggest spending categories. PayPal and Revolut, on the other hand, were often used for online purchases and splitting costs with friends, like when we go out for dinner or plan trips together.
As for income, bank transfers and Fineco, my newer main account, were the primary channels. They reflect my salaried income and regular compensation. Cash, which I occasionally receive from family, played a smaller role and gradually faded as my income stabilized. Meal vouchers, which are part of my work benefits, also appear regularly in my income sources, they don’t hit my wallet directly, but they cover everyday expenses like lunch.
This breakdown confirms how much I rely on digital financial tools for both spending and earning, with bank transfers and MPS on one side, and (mainly) Fineco on the other.
Final Considerations
This past year brought meaningful changes to my financial life: moving house, getting a promotion, and investing in both my health and travel experiences. While expenses stayed mostly predictable, my income increased over time, which helped improve my overall revenue trends. Tracking everything through categorized transactions has helped me see the bigger picture and feel much more in control of my finances.
One of the most valuable parts of this project has been simply turning raw data into visuals, which helped me to notice things I would have likely overlooked otherwise. It also gave me a clearer understanding of where my money goes each month and how much I am actually saving. Over time, I developed a habit: at the start of each month, I set a budget (excluding rent) that I try to stick to. It is not a big deal if I go over, especially during holidays or busy summer months when social plans pick up, but what matters most to me is being intentional with my spending and avoiding wasting money on things that do not really add value to my life.
If you are thinking about doing something similar, I highly recommend using SQLite to store your data and Python for analysis and visualization. It is not only a great way to gain insight into your financial habits, it is also a practical and rewarding learning experience.