How to build a sales dashboard without writing SQL
Build a complete sales dashboard — pipeline, win rate, MRR, churn, cohort analysis — using plain English. No SQL, no BI training, no data team required.
By The iDBQuery Team
A useful sales dashboard answers four things: how much is in the pipeline, how fast it's closing, where revenue is coming from, and where it's leaking. Getting those answers usually requires a data analyst, a BI tool, and at least a week of back-and-forth. This tutorial shows you how to build the same thing in 30 minutes, without writing a single line of SQL.
What we'll build
A 10-widget sales dashboard covering:
- Total pipeline value and count by stage
- Win rate (won / total closed this period)
- MRR trend (for subscription businesses)
- Top 10 accounts by lifetime value
- Average deal cycle (lead to close)
- Lost-deal breakdown by reason
- Cohort retention (for SaaS)
- Deals at risk (no activity in 14+ days)
- Rep performance leaderboard
- Pipeline change week-over-week
Prerequisites
- iDBQuery account (free at idbquery.com)
- Your CRM data in one of: Postgres, MySQL, a Salesforce/HubSpot CSV export, or a raw Excel file
This tutorial uses a Postgres database with tables named deals, accounts, contacts, and activities. Adapt the questions for your schema — iDBQuery reads your actual column names, so the exact phrasing doesn't need to match.
Step 1: Connect your data source (3 minutes)
- Open iDBQuery → Projects → New project
- Click Add source → select your database type (Postgres, MySQL, Excel, etc.)
- Paste your connection string or upload your file
- Wait for schema introspection (usually 10–30 seconds)
You'll see your tables appear in the source sidebar. iDBQuery reads column names, data types, and row counts — that's the context it uses to generate accurate queries.
If you're using an Excel export from Salesforce or HubSpot: upload the file directly. iDBQuery treats it like a database table — same AI, same query generation, same charts.
Step 2: Ask the first question — pipeline by stage
Type in the chat:
"Show me the total pipeline value and count of deals by stage, for open deals only"
iDBQuery will write a SQL GROUP BY query against your deals table, run it, and return a table. Click the bar chart icon to switch to a chart view. Click Pin to report and name it "Pipeline by stage."
Step 3: Win rate
"What's our win rate this quarter — deals won divided by all closed deals (won + lost)?"
The AI handles the conditional aggregation (COUNT CASE WHEN). You'll get a single percentage. Pin it as a stat card: Pin → Stat card.
Step 4: MRR trend
"Show me monthly recurring revenue by month for the last 12 months"
If your deals table has a monthly_value column, the AI uses it directly. If you have a total_value and a contract_months column, it derives MRR. Pin as a line chart.
Tip: If iDBQuery asks for clarification (e.g., "which column is the recurring amount?"), just answer in the chat. It updates the query and re-runs.
Step 5: Top 10 accounts by lifetime value
"Top 10 accounts by total closed-won revenue, all time"
This joins your deals and accounts tables. Pin as a table widget with account name and revenue columns.
Step 6: Average deal cycle
"What's the average number of days between deal creation and close date for won deals this year?"
The AI uses a DATEDIFF (or your database's equivalent) between the created_at and closed_at columns. Pin as a stat card — "Avg days to close."
Step 7: Lost-deal breakdown
"Break down lost deals by loss reason for this quarter, as a percentage of total lost"
If your CRM exports a close_reason or lost_reason column, this works immediately. Pin as a pie chart or bar chart.
Step 8: Deals at risk
"Show me all open deals with no activity in the last 14 days, ordered by deal value descending"
This joins deals and activities tables and uses a NOT EXISTS or a MAX(activity_date) filter. Pin as a table widget — actionable, not just informational.
Step 9: Rep performance leaderboard
"Show me total won revenue and win rate per sales rep for this quarter, ranked by revenue"
Pin as a bar chart sorted descending by revenue. You'll immediately see top performers and outliers.
Step 10: Pipeline change week-over-week
"Compare this week's pipeline value by stage to last week's, show the delta"
This is a slightly complex query (two CTEs with date windows and a JOIN). iDBQuery handles it. Pin as a table widget with color-coded delta columns.
Assembling the dashboard
After pinning 10 widgets, go to Reports → [your report name].
You'll see all 10 widgets on a grid. Drag to reorder them: put the most important metrics (pipeline, win rate, MRR) at the top; supporting tables (deals at risk, rep leaderboard) below.
Resize widgets: stat cards should be small (2 columns wide); trend charts should be wide (4–6 columns).
Add a filter bar widget: click + Add widget → Filter → Date range. This adds a global date filter that updates all compatible widgets simultaneously.
Sharing the dashboard
Click Share → Public link. Everyone you send this to sees a live, read-only version of the dashboard — updated whenever you refresh. No login required for viewers.
Add password protection if the data is sensitive: Share → Enable password.
Keeping it current
iDBQuery dashboards query your live database every time they load. There's no manual "refresh data" step — tomorrow's numbers appear automatically when someone opens the link.
Common questions during the build
"The AI is using the wrong table."
Clarify in the chat: "use the deals table, not the opportunities table." iDBQuery updates the query and re-runs.
"The numbers don't match what I see in the CRM." Common cause: the CRM applies additional filters (territory, team, fiscal year) that aren't in the exported data. Ask: "what filters are currently applied to this query?" — iDBQuery shows the full SQL, which you can inspect.
"I want a cohort retention chart." Type: "Show me monthly cohort retention for customers acquired in the last 6 months." This is one of the more complex queries — the AI may ask a clarifying question about how you define retention (paid subscription, login activity, etc.).
What to build next
Once you have the sales dashboard working, the natural next steps are:
- A finance overview (revenue by category, AR aging, cash position)
- A customer health dashboard (churn risk scores, support tickets per account, NPS by segment)
- A pipeline forecast (current pipeline × win rate by stage × average cycle time = predicted close)
All of these follow the same pattern: connect the relevant data source, ask questions in plain English, pin the results, assemble the report.
FAQ
Do I need to know SQL to use iDBQuery? No. You type questions in plain English. iDBQuery writes the SQL, runs it, and shows you the result. The generated SQL is shown in a side panel if you want to inspect or learn from it.
What if my data is in Salesforce directly, not a database? Export to CSV or Excel from Salesforce Reports, then upload the file to iDBQuery. The AI treats it like a database table. For a live Salesforce connection, contact sales — direct CRM connectors are on the roadmap.
Can I build a dashboard from multiple sources — e.g., Postgres CRM and Excel budget? Yes. Add both as sources to the same project. Ask questions that reference both. iDBQuery federates the data in-process.
How do I add the dashboard to a weekly email? iDBQuery supports scheduled PDF exports and email notifications. From the report, click Share → Schedule → set the cadence and recipients.
Can my whole team see the dashboard? Yes. Share a public link (no login required) or invite team members to the project (they get a login with viewer access).