- Home
- Skills
- Data & Databases
- Company DB Analyst
Works with the AI Agents you already use
Company DB Analyst
Ask your database questions in plain English. Your agent explores the schema, writes safe read-only SQL and answers with checked numbers.
Free
Company DB Analyst
Example session with this skill installed
Show me the top 3 product categories by revenue.
- Read your context and instructions
- Compiled the company db analyst
Wearables is your highest-earning category: $51,967.00 from 203 paid orders, just ahead of Peripherals.
Top 3 categories by revenue (paid orders, 1 Jan to 28 Oct 2026)
| Category | Revenue | Paid orders | Avg order value |
|---|---|---|---|
| Wearables | $51,967.00 | 203 | $256.00 |
| Peripherals | $51,403.00 | 256 | $200.79 |
| Audio | $47,506.00 | 186 | $255.41 |
Assumptions
- Period: all data available, 2026-01-01 to 2026-10-28 (latest order in the database).
- Only orders with
status = 'paid'are counted; refunded and pending orders are excluded. - Revenue uses the price stored on each order line, converted from cents.
Insight: Peripherals has the most orders but a lower average order value, so Wearables edges it on revenue.
SELECT p.category,
ROUND(SUM(oi.quantity * oi.unit_price_cents) / 100.0, 2) AS revenue,
COUNT(DISTINCT o.id) AS paid_orders
FROM orders o
JOIN order_items oi ON oi.order_id = o.id
JOIN products p ON p.id = oi.product_id
WHERE o.status = 'paid'
GROUP BY p.category
ORDER BY revenue DESC
LIMIT 3;
Next steps: ask for a month-by-month trend for Wearables, or a breakdown by country.
Connects securely to your tools. The creator never sees your data.
About this skill
Turn your AI agent into a careful data analyst. Ask "What was revenue by category last quarter?" or "Who are our top 5 customers?" and get a direct answer, a small table and the SQL behind it.
This skill pairs with the open-source mcp-database-server (https://github.com/saadrupai/mcp-database-server). It teaches the agent to:
- Use the built-in sales report first, then explore the schema before writing SQL, never guessing column names
- Count only paid orders as revenue and convert cents to currency
- Aggregate in SQL instead of summing raw rows by hand
- Sanity-check results for double-counting, wrong date ranges and empty results
- Keep customer personal data out of answers unless asked
Safe by design: the server is read-only in three layers (SQL guard, read-only connection, row cap), so the agent cannot change or delete anything.
Setup: run claude mcp add company-db -- node /path/to/mcp-database-server/src/index.ts and set DB_PATH to your SQLite database. Works with Claude Code, Cursor and other MCP clients. Zero npm dependencies.
Read-only: it cannot insert, update or delete data. Works with SQLite databases through mcp-database-server. Each query returns at most 200 rows, so large exports aren't possible. Keeping personal data out of answers is an instruction to the agent, not something the server enforces.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed today
- Free with an Agensi account
Requires