Embedding
Embed a SQL query result
Run a query against your PostgreSQL database and embed the live result on any website. Show a user count, revenue total, active subscriptions, or any metric your database holds, updating automatically.
Use cases
- Live user count on a SaaS landing page
- Revenue or MRR counter on a public dashboard
- Active session count on an internal ops board
- Error rate from your database logs
How to embed
- Create a free account on 7di.
- Add a SQL query widget.
- Write a query that returns the value you want (first column, first row).
- Enable Public embed and copy the iframe code.
<iframe
src="https://7di.vision/embed/{your-token}?theme=dark"
width="320" height="180" frameborder="0"
style="border-radius:12px;overflow:hidden"
></iframe>Full widget details: SQL query widget.
Theme
Table
| user | plan | mrr |
|---|---|---|
| alice@acme.com | Pro | $420 |
| bob@corp.io | Enterprise | $1,200 |
| carol@startup.co | Pro | $420 |
| dan@agency.dev | Free | $0 |
09:18 PM · 1h · Top users by revenue
SQL Query
Stacked bar
Signups by plan
Pro
Pro43%
Free43%
Enterprise13%
09:18 PM · 1h
SQL QueryChart
Active users
1420
09:18 PM · 1h
SQL QueryValue
Active users
1,420
09:18 PM · 1h
SQL Query