Why SQL When You Have Excel: SQLite, AtlasParts, First Query | SQL for Finance Ep1
0views
C
CelesteAI
Description
๐ Download AtlasParts and the prebuilt atlasparts.db:
https://github.com/GoCelesteAI/excel-powerbi-for-finance
Source code: https://github.com/GoCelesteAI/sql-for-finance
Episode 1 of SQL for Finance. The bridge from spreadsheets to queries.
If you finished the Excel & Power BI for Finance series, you can already build the dashboard. But the moment your CFO asks a question that spans six tables and thirty thousand rows, Excel hits a wall and Power BI takes a meeting to model. SQL is the language for those questions โ and SQLite is the right database to learn it on, because the whole "set up a database" problem disappears when the database is one file.
What You'll Build:
- A working atlasparts.db containing all eight AtlasParts CSVs (chart of accounts, customers, vendors, products, sales orders, sales order lines, AP invoices, GL journal โ 32,000 rows total).
- Your first SELECT โ five rows from the customers table, formatted with .headers on and .mode column.
- The first aggregate โ SELECT COUNT(*) FROM gl_journal against 22,027 GL entries, returning in 12 milliseconds.
- A preview of the six-line CTE pipeline that produces a real P&L by Episode 5.
Timestamps:
0:00 - Intro โ The bridge
0:53 - Preview โ what we'll ship
1:43 - Why SQL when you have Excel
3:13 - SQL is a language, not a tool
4:38 - Why SQLite specifically
5:38 - Loading 8 CSVs into one database
7:08 - Your first SELECT
8:13 - 22,027 rows. 12 milliseconds.
9:48 - Recap and what's next
10:58 - End screen
Key Takeaways:
1. SQL is a language, not a tool. The way Excel formulas are a syntax for a sheet, SQL is a syntax for a database โ and it's designed to read like English. SELECT what FROM where, ordered by something โ that sentence shape handles most of finance work. Power BI's DAX exists because finance people needed something that wasn't SQL; the rest of the data team already speaks this.
2. SQLite removes the whole class of database setup horror stories. The entire database lives in one .db file. There is no server to install, no port to open, no admin to ask. You install the sqlite3 binary once and you can query for the rest of your career. The 95% of SQL that's identical across SQLite, Postgres, MySQL, and Snowflake is the 95% that finance work actually uses.
3. Dot commands and SQL queries are different things. Anything starting with a dot โ .mode csv, .headers on, .import, .tables โ is a command to the SQLite shell itself. Everything else is SQL. Most beginners conflate the two and get confused; once you separate them, the shell stops feeling weird.
4. The moment SQL pays for itself in finance work is the first aggregate query. SELECT COUNT(*) FROM gl_journal against 22,027 rows returns in 12 milliseconds. The same join-and-group that takes two hours of VLOOKUPs in Excel takes six lines and runs in under twenty milliseconds. Once you've felt that latency, going back to a spreadsheet for analytical work feels slow.
5. Same dataset across both finance series. AtlasParts โ the eight CSVs we used across twelve episodes of Excel and Power BI โ is now a single SQLite database file. Drop atlasparts.db next to your queries and you have a runnable copy of a real GL/AP/AR shape for the rest of the series. Continuity matters; you're not learning a new dataset, you're learning a new tool.
#SQL #SQLite #FinanceAnalytics #DataAnalytics #SQLforFinance #BeginnerSQL #FinancialReporting #ERPdata #Database #LearnSQL
---
Generated by GoCelesteAI ยท part of the SQL for Finance series