Back to Writing

Turn Claude into Your Personal SQL Expert

Four steps to set up Claude Projects so it remembers your database, your queries, and your logic - every time you need to pull data.

David Merry2 min read

4 steps to turn Claude into your personal SQL expert.

If you work in finance and have ever had to pull data from a database, there's a good chance you've hit this wall - the data you need is there, but you don't know how to get it out.

You may need a new field. A different date range. A more granular breakdown. But SQL is like a foreign language.

Claude Projects fixes that. You set it up once and it remembers your database, your queries and your logic, every time.

Here's how.

The solution

Build a dedicated SQL knowledge base using Claude Projects

Step 1: Create a Claude Project

Open Claude and select Projects in the sidebar

Click "+New Project" and name it "Finance SQL Expert"

Step 2: Add Project Instructions

Click on the plus sign beside "Instructions" within the Project

Paste in your SQL instructions

Copy this into Claude:

YOU ARE MY SQL EXPERT. ANALYSE MY UPLOADED
QUERIES AND RESULTS TO UNDERSTAND TABLE
RELATIONSHIPS AND CONNECTIONS. USE THIS TO HELP
ME BUILD NEW QUERIES. OPTIMISE MY EXISTING QUERIES
WHERE POSSIBLE AND SUGGEST IMPROVEMENTS.
EXPLAIN EACH QUERY IN PLAIN ENGLISH.

Step 3: Upload your files to the Project

Click on the plus sign beside "Files" within the Project

Upload your existing TXT files or paste in your queries directly

Upload sample query results as CSV or Excel files

(The more queries and results you can provide the better)

Step 4: Start prompting Claude

Example prompts to use:

  • Explain the [query name] query to me
  • Create a query based on [query name] but add transaction date / [insert required field]
  • My [query name] takes a long time to run. How can I optimise this?
  • Why is the [query name] giving me an error?

How to Turn Claude into Your Personal SQL Expert

Read the original step-by-step guide (PDF)